Fetching metadata from the HF Docker repository...
-
refactor: split groq_service into focused modules + SSE streaming
Architecture improvements (fixes #1-#8 from ai_architecture_review):
New modules:
- services/groq_client.py - Groq SDK + retry w/ exp backoff + jitter (#7)
- services/prompts.py - Prompt composition by classification (#3)
- services/session.py - Session history w/ TTL eviction + write-trim (#6)
- services/tool_compressor.py - compress_tool_output + geocode handler
- services/tool_executor.py - Tool dispatch + normalize_assistant_message (#5)
- services/agent_loop.py - Agentic loop (max 4 rounds) + SSE streaming (#1)
- services/groq_service.py - Thin facade re-exporting public functions
Fixes:
- #1: True agentic tool loop (finish_reason=stop ends loop, not fixed 1-call)
- #2: Universal failed_generation recovery for any tool, not just exports
- #3: Prompt composition - PATH_A gets ~900 fewer tokens than monolith
- #4: Router now uses small fast model (llama-3.1-8b-instant) by default
- #5: normalize_assistant_message() strips reasoning field from history
- #6: Sessio…