refactor(llm): route all tiers via OpenRouter, drop Anthropic SDK
Tutti i tier (S/A/B/C/D) ora passano per OpenRouter via OpenAI SDK.
Modelli Anthropic raggiungibili via prefisso `anthropic/...`.
- pyproject: rimosso `anthropic>=0.39` da deps + uv.lock
- config: rimosso `anthropic_api_key` field
- LLMClient: dispatch unico, single client OpenAI con base_url OpenRouter
- defaults S/A/B → `anthropic/claude-{opus-4-7,sonnet-4-6}`
- retry exceptions: solo openai.* (drop anthropic.*)
- test rinominati e adattati: tier S/A/B mockano OpenAI con prefisso `anthropic/`
- rimosso test `tier_S_without_anthropic_key_raises` (non più rilevante)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -24,11 +24,10 @@ class Settings(BaseSettings):
|
||||
cerbero_bot_tag: str = "swarm-poc-phase1"
|
||||
|
||||
openrouter_api_key: SecretStr
|
||||
anthropic_api_key: SecretStr | None = None
|
||||
|
||||
llm_model_tier_s: str = "claude-opus-4-7"
|
||||
llm_model_tier_a: str = "claude-sonnet-4-6"
|
||||
llm_model_tier_b: str = "claude-sonnet-4-6"
|
||||
llm_model_tier_s: str = "anthropic/claude-opus-4-7"
|
||||
llm_model_tier_a: str = "anthropic/claude-sonnet-4-6"
|
||||
llm_model_tier_b: str = "anthropic/claude-sonnet-4-6"
|
||||
llm_model_tier_c: str = "qwen/qwen-2.5-72b-instruct"
|
||||
llm_model_tier_d: str = "meta-llama/llama-3.3-70b-instruct"
|
||||
openrouter_base_url: str = "https://openrouter.ai/api/v1"
|
||||
|
||||
Reference in New Issue
Block a user