This page documents the live model registry endpoint exposed by the Python LLM service and how to override models for specific workflow stages.
- Inspect which models are currently available per provider (OpenAI, Anthropic).
- Verify dynamic discovery (OpenAI) and configured defaults.
- Quickly debug environment issues (e.g., API keys, connectivity).
- URL:
/providers/models - Method:
GET - Optional query:
tier=small|medium|largeto filter results by logical tier.
Example:
# All providers and models
curl http://localhost:8000/providers/models | jq
# Filter by tier
curl "http://localhost:8000/providers/models?tier=small" | jqResponse (shape):
{
"openai": [
{
"id": "gpt-4o-mini",
"name": "gpt-4o-mini",
"tier": "small",
"context_window": 128000,
"cost_per_1k_prompt_tokens": 0.0,
"cost_per_1k_completion_tokens": 0.0,
"supports_tools": true,
"supports_streaming": true,
"available": true
}
],
"anthropic": [
{
"id": "claude-3-5-haiku-latest",
"name": "claude-3-5-haiku-latest",
"tier": "small",
"context_window": 200000,
"cost_per_1k_prompt_tokens": 0.0,
"cost_per_1k_completion_tokens": 0.0,
"supports_tools": true,
"supports_streaming": true,
"available": true
}
]
}Notes:
- OpenAI models include both seeded entries and dynamically discovered IDs from
models.list()at startup (requiresOPENAI_API_KEY). - Anthropic models use known modern IDs (Claude 3.5 family).
- Costs are placeholders unless explicitly updated.
Set these in the repo root .env to override stage‑specific models in the Python service:
# Provider API keys
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=...
# Stage‑specific overrides
COMPLEXITY_MODEL_ID=gpt-4o-mini
DECOMPOSITION_MODEL_ID=gpt-4oCOMPLEXITY_MODEL_ID: used by/complexity/analyzeDECOMPOSITION_MODEL_ID: used by/agent/decompose
If unset, the service selects models by tier.
- Run the Python service:
cd python/llm-service
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload- Ensure relevant API keys are present in
.envbefore starting.
- Empty
openairesults: likely missing/invalidOPENAI_API_KEY, or network egress blocked. - Only seed models shown: dynamic discovery failed; check logs for
OpenAI dynamic model discovery skipped. - Anthropic missing: set
ANTHROPIC_API_KEY.