feat(llm): full multi-tier S/A/B/C/D with routing + pricing

Estende ModelTier a 5 livelli (S/A/B/C/D) con routing automatico:
S/A/B via Anthropic SDK, C/D via OpenRouter (OpenAI SDK). Aggiunge
prezzi per tier S (Opus), A (Sonnet placeholder) e D (Llama). Refactor
LLMClient.complete con dispatch tramite tier_models map e helper
_call_anthropic / _call_openrouter. Settings esposte per tutti e 5
i modelli env-configurabili.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-10 09:18:57 +02:00
parent 7482600146
commit 33d8e275e7
10 changed files with 241 additions and 36 deletions
+4 -1
View File
@@ -9,8 +9,11 @@ OPENROUTER_API_KEY=
ANTHROPIC_API_KEY=
# LLM models (override Phase 1 defaults if needed)
LLM_MODEL_TIER_C=qwen/qwen-2.5-72b-instruct
LLM_MODEL_TIER_S=claude-opus-4-7
LLM_MODEL_TIER_A=claude-sonnet-4-6
LLM_MODEL_TIER_B=claude-sonnet-4-6
LLM_MODEL_TIER_C=qwen/qwen-2.5-72b-instruct
LLM_MODEL_TIER_D=meta-llama/llama-3.3-70b-instruct
OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
# Run config