refactor(backend): extract LLM transport into llm_service (#134) #216
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/134-llm-service-extraction"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First foundational item of v3.10.0 GM Workbench. Targets the integration branch
feat/v3.10-gm-workbench.Closes #134.
What
A purely mechanical extraction of the LLM transport layer out of the overgrown
audio_service.pyinto a newservices/llm_service.py— the stable import target every Workbench tool (#136+) will sit on.llm_service.py:generate_structured_text(dispatcher), the four_structured_*provider adapters (Ollama / llama.cpp / Anthropic / OpenAI),extract_json_object, and the constants they own (_LLM_TIMEOUT,_is_ollama_url,_LORE_PROPOSAL_SYSTEM_PROMPT).audio_service.pyre-exports them, so every call site keeps working unchanged —reminder_tasks,lore_service,audio_service's own domain functions (summarise / statblock / convert / names / …), and the LLM-mocking tests thatpatch("…audio_service.generate_structured_text")(verified: domain functions resolve the bare name fromaudio_service's namespace at call time, so the patch still lands).llm_servicenever importsaudio_service; identity check confirmsaudio_service.generate_structured_text is llm_service.generate_structured_text. Domain functions (transcription, summarisation, lore/name/stat generation) stay inaudio_service.Verification (Docker, py3.12)
ruff check+ruff format --checkclean (0.4.4). No migration, no new endpoints/schemas/prompts; no bot API change.🤖 Generated with Claude Code