| model_list: | |
| - model_name: gpt-4 | |
| litellm_params: | |
| model: openai/gpt-4 | |
| api_key: os.environ/OPENAI_API_KEY | |
| timeout: 600 # Model seviyesi timeout (saniye) | |
| max_retries: 3 # Model seviyesi retry | |
| - model_name: gpt-4-turbo | |
| litellm_params: | |
| model: openai/gpt-4-turbo-preview | |
| api_key: os.environ/OPENAI_API_KEY | |
| timeout: 600 | |
| max_retries: 3 | |
| - model_name: gpt-3.5-turbo | |
| litellm_params: | |
| model: openai/gpt-3.5-turbo | |
| api_key: os.environ/OPENAI_API_KEY | |
| timeout: 300 | |
| max_retries: 2 | |
| # Claude modelleri (isteğe bağlı) | |
| # - model_name: claude-3-opus | |
| # litellm_params: | |
| # model: anthropic/claude-3-opus-20240229 | |
| # api_key: os.environ/ANTHROPIC_API_KEY | |
| # timeout: 600 | |
| # max_retries: 3 | |
| # - model_name: claude-3-sonnet | |
| # litellm_params: | |
| # model: anthropic/claude-3-sonnet-20240229 | |
| # api_key: os.environ/ANTHROPIC_API_KEY | |
| # timeout: 300 | |
| # max_retries: 2 | |
| # Gemini modelleri (isteğe bağlı) | |
| # - model_name: gemini-pro | |
| # litellm_params: | |
| # model: gemini/gemini-pro | |
| # api_key: os.environ/GEMINI_API_KEY | |
| # timeout: 300 | |
| # max_retries: 2 | |
| # Router ayarları - load balancing ve fallback yönetimi | |
| router_settings: | |
| # Routing stratejisi | |
| routing_strategy: "simple-shuffle" # Seçenekler: simple-shuffle, least-busy, usage-based-routing, latency-based-routing | |
| # Retry ayarları | |
| num_retries: 3 # Router seviyesinde retry sayısı | |
| timeout: 600 # Router seviyesi global timeout (saniye) | |
| # Fallback ayarları - bir model başarısız olursa hangi modele geçilir | |
| fallbacks: [ | |
| {"gpt-4": ["gpt-4-turbo", "gpt-3.5-turbo"]}, | |
| {"gpt-4-turbo": ["gpt-3.5-turbo"]} | |
| ] | |
| # Allowed fails - bir model kaç kez başarısız olursa devre dışı bırakılır | |
| allowed_fails: 3 # 3 başarısızlıktan sonra modeli devre dışı bırak | |
| # Cooldown period - başarısız model ne kadar süre devre dışı kalır (saniye) | |
| cooldown_time: 60 # 60 saniye sonra tekrar aktifleştir | |
| # Retry policy - hata tipine göre retry sayısı | |
| retry_policy: | |
| TimeoutErrorRetries: 3 | |
| RateLimitErrorRetries: 3 | |
| InternalServerErrorRetries: 3 | |
| BadRequestErrorRetries: 0 # Bad request için retry yapma | |
| AuthenticationErrorRetries: 0 # Auth hatası için retry yapma | |
| litellm_settings: | |
| # Neon veritabanı bağlantısı | |
| database_url: "os.environ/DATABASE_URL" | |
| # Genel timeout ayarları | |
| request_timeout: 600 # Global request timeout (saniye) | |
| # Retry ayarları | |
| num_retries: 3 # Başarısız istekler için tekrar deneme sayısı | |
| # Telemetry kapalı (opsiyonel) | |
| telemetry: false | |
| # Drop unmapped params | |
| drop_params: true | |
| # Success/Failure callbacks | |
| success_callback: ["langfuse"] | |
| failure_callback: ["langfuse"] | |
| # Context window fallbacks - token limiti aşılırsa otomatik küçük model kullan | |
| context_window_fallbacks: [ | |
| {"gpt-4": ["gpt-4-turbo", "gpt-3.5-turbo"]}, | |
| {"gpt-4-turbo": ["gpt-3.5-turbo"]} | |
| ] | |
| # Content policy fallbacks - içerik politikası ihlali durumunda | |
| content_policy_fallbacks: [ | |
| {"gpt-4": ["gpt-3.5-turbo"]}, | |
| {"gpt-4-turbo": ["gpt-3.5-turbo"]} | |
| ] | |
| general_settings: | |
| # Master key - API istekleri için gerekli | |
| master_key: "os.environ/LITELLM_MASTER_KEY" | |
| # Database URL | |
| database_url: "os.environ/DATABASE_URL" | |
| # Admin UI için kullanıcı bilgileri | |
| ui_username: "os.environ/UI_USERNAME" | |
| ui_password: "os.environ/UI_PASSWORD" | |
| # Database connection pool settings | |
| database_connection_pool_limit: 10 # PostgreSQL connection pool size | |
| database_connection_timeout: 60 # Database connection timeout (saniye) | |
| # Allowed routes | |
| allowed_routes: ["*"] | |
| # Max parallel requests | |
| max_parallel_requests: 1000 |