[cross-feature coupling] model_routes imports 6 private functions from llm_core internals #703
Labels
No labels
area:chat
area:core
area:llm
area:routes
area:tools
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
refactor
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sleepy/odysseus#703
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
AGENTS.md rule: Features communicate through narrow, typed interfaces. Never import another feature's internals directly.
routes/model_routes.pydirectly imports private internals fromsrc.llm_core:These are all underscore-prefixed (private) functions.
model_routes.pyshould call through the public API (llm_call,llm_call_async,stream_llm) or the public functions inendpoint_resolver.py.Additionally,
model_routes.pyre-implements 4 helper functions that already exist inllm_core.pyandendpoint_resolver.py:_anthropic_api_root(line 25) — duplicate ofendpoint_resolver._anthropic_api_root(line 110) andllm_core._anthropic_api_rootconcept_ollama_api_root(line 34) — duplicate ofendpoint_resolver._ollama_api_root(line 119)_provider_headers(line 59) — duplicate ofendpoint_resolver.build_headers(line 157) andllm_core._provider_headers(line 229)_models_url(line 48) — duplicate ofendpoint_resolver.build_models_url(line 145)Fix: Remove duplicated helpers from
model_routes.pyand import the public versions fromendpoint_resolver.py. Expose any needed internal functions through a proper public interface inllm_core.Fixed via PR #874 — removed 4 duplicated helpers from model_routes.py, using public API from endpoint_resolver.