diff --git a/agent/.env.example b/agent/.env.example index db5d5854..41f6ef26 100644 --- a/agent/.env.example +++ b/agent/.env.example @@ -9,7 +9,6 @@ GROQ_API_KEY= MISTRAL_API_KEY= NOUS_API_KEY= NVIDIA_API_KEY= -NVIDIA_NIM_API_KEY= OPENCODE_ZEN_API_KEY= OPENROUTER_API_KEY= PARALLEL_API_KEY= diff --git a/agent/litellm/config.yaml b/agent/litellm/config.yaml index 69462f00..4b0f2c8b 100644 --- a/agent/litellm/config.yaml +++ b/agent/litellm/config.yaml @@ -1,12 +1,67 @@ general_settings: store_model_in_db: true + enable_health_check_routing: true + background_health_checks: true + health_check_interval: 60 + health_check_ignore_transient_errors: true + cancel_on_disconnect: true litellm_settings: - drop_params: true - request_timeout: 60 json_logs: true + request_timeout: 60 + drop_params: true + +router_settings: + cooldown_time: 60 + allowed_fails: 3 + ttft_timeout: 30 + enable_pre_call_checks: true + optional_pre_call_checks: [prompt_caching] + enable_anthropic_prompt_caching: true + default_litellm_params: + cache_control_injection_points: + - location: message + role: system + default_fallbacks: [complex, medium, simple] + fallbacks: + - reasoning: complex + - complex: medium + - medium: simple model_list: + - model_name: auto + litellm_params: + model: auto_router/complexity_router + complexity_router_config: + tiers: + SIMPLE: simple + MEDIUM: medium + COMPLEX: complex + REASONING: reasoning + adaptive: true + session_affinity: true + complexity_router_default_model: complex + + - model_name: simple + litellm_params: + model: openai/deepseek-v4-flash-free + litellm_credential_name: opencode_zen + + - model_name: medium + litellm_params: + model: openai/deepseek-v4-flash-free + litellm_credential_name: opencode_zen + + - model_name: complex + litellm_params: + model: openai/tencent/hy3:free + litellm_credential_name: nous + + - model_name: reasoning + litellm_params: + model: openai/tencent/hy3:free + litellm_credential_name: nous + - model_name: cerebras/gemma-4-31b litellm_params: model: cerebras/gemma-4-31b @@ -42,19 +97,6 @@ model_list: litellm_params: model: openrouter/openrouter/free - - model_name: smart-router - litellm_params: - model: auto_router/complexity_router - complexity_router_config: - tiers: - SIMPLE: opencode-zen/deepseek-v4-flash-free - MEDIUM: opencode-zen/deepseek-v4-flash-free - COMPLEX: nous/hy3:free - REASONING: nous/hy3:free - adaptive: true - session_affinity: true - complexity_router_default_model: nous/hy3:free - credential_list: - credential_name: nous credential_values: