chore: add config.yml

This commit is contained in:
mubashir1osmani 2026-06-18 22:50:14 -07:00
parent 76affd0165
commit bf275795bb
No known key found for this signature in database
GPG key ID: AB055FF67D0B4D9A
2 changed files with 159 additions and 0 deletions

View file

@ -0,0 +1,152 @@
#jThis default config file aims to support most popular model providers out of the box
#In general, the model name used by the client will be the same as the ones from the provider (For example, you will use "anthropic.claude-3-5-sonnet-20240620-v1:0" when you're calling LiteLLM just like you would when calling Amazon Bedrock directly)
#In the case where there are model name conflicts, a prefix will be used (For example, the Azure and the openAI model names conflict, so when you are using Azure, you will use "azure/gpt-4o-realtime-preview-2024-10-01")
#Some model providers require additional user-specific configuration (such as Azure which requires you to specify your own api_base with your resource name, and your api_version).
#In this case, the provider is commented out, and you should uncomment it and provide your specific info
#For more detailed information about each provider, refer to the docs: https://docs.litellm.ai/docs/providers
#If you are not interested in a particular provider, just remove it from your config.yaml, and redeploy, and it will no longer show up in your LiteLLM deployment
#If a particular provider is not working, double check your .env file, and make sure you have provided a valid api key for that provider, and then redeploy
#Full details on guardrails here: https://docs.litellm.ai/docs/proxy/guardrails/bedrock
general_settings:
store_prompts_in_spend_logs: true
master_key: "sk-1234"
proxy_batch_write_at: 60
database_connection_pool_limit: 10
# disable_error_logs: True
forward_client_headers_to_llm_api: false
maximum_spend_logs_retention_period: "60d" # GSE-13389: Cleanup logs older than 60 days
maximum_spend_logs_cleanup_cron: "0 1 * * *" # 01:00 UTC daily = 18:00 PDT
database_url: os.environ/DATABASE_URL
control_plane_url: os.environ/CONTROL_PLANE_URL
alerts: ["email"]
# fallbacks: [{"gpt-4": ["anthropic.claude-3-5-sonnet-20240620-v1:0"]}] #Configure fallbacks for context window exeeded errors (In this example, we will fall back to Claude Sonnet if over 8000 tokens, which is gpt-4's limit)
# default_fallbacks: ["anthropic.claude-3-haiku-20240307-v1:0"] #Configure fallbacks for any error for every model (the above fallback configurations override this one)
# environment_variables:
# STORE_MODEL_IN_DB: 'True'
# LITELLM_LOG: "DEBUG"
litellm_settings:
drop_params: True
request_timeout: 600
num_retries: 3
json_logs: true
store_audit_logs: True
cache: true
cache_params:
type: redis
host: redis
port: 6379
password: os.environ/REDIS_PASSWORD
namespace: litellm.caching
ttl: 16600
# max_budget: 1000000000.0 # (float) sets max budget in dollars across the entire proxy across all API keys. Note, the budget does not apply to the master key. That is the only exception.
# namespace: "litellm.caching.caching"
# ttl: 15
# budget_duration: 1mo # (str) frequency of budget reset - You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"), months ("1mo").
# max_internal_user_budget: 1000000000.0 # (float) sets default budget in dollars for each internal user. (Doesn't apply to Admins. Doesn't apply to Teams. Doesn't apply to master key)
# internal_user_budget_duration: "1mo" # (str) frequency of budget reset - You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"), months ("1mo").
# success_callback: ["s3_v2"]
# failure_callback: ["s3_v2"]
# service_callback: ["datadog"]
callbacks: ["arize_phoenix", "datadog", "smtp_email", "prometheus", "otel"]
require_auth_for_metrics_endpoint: false
cache: true
cache_params:
type: redis
host: redis
port: 6379
password: os.environ/REDIS_PASSWORD
namespace: litellm.caching
ttl: 16600
#type: redis-semantic
#similarity_threshold: 0.8 # similarity threshold for semantic cache
#redis_semantic_cache_embedding_model: text-embedding-ada-002 # only works with text-embedding-ada-002 for now... https://github.com/BerriAI/litellm/issues/4001
#ttl: Optional[float]
#default_in_memory_ttl: Optional[float]
#default_in_redis_ttl: Optional[float]
model_list:
- model_name: gpt-5.5
litellm_params:
model: openai/gpt-5.5
api_key: os.environ/OPENAI_API_KEY
- model_name: claude-haiku-4-5
litellm_params:
model: anthropic/claude-haiku-4-5
api_key: os.environ/ANTHROPIC_API_KEY
# Same underlying model via Vertex AI — distinct routing/auth path
# # (service-account JSON), so it gets its own model_name.
- model_name: gemini-2.5-flash-vertex
litellm_params:
model: vertex_ai/gemini-2.5-flash
vertex_project: os.environ/VERTEXAI_PROJECT
vertex_location: us-central1
vertex_credentials: os.environ/VERTEXAI_CREDENTIALS
- model_name: gemini-2.5-flash
litellm_params:
model: gemini/gemini-2.5-flash
api_key: os.environ/GEMINI_API_KEY
# load balancing to a different deployment, if gemini gets rate limited.
- model_name: gemini-2.5-flash
litellm_params:
model: gemini/gemini-2.5-flash
api_key: os.environ/GEMINI_API_KEY
# embedding models
- model_name: openai-text-embedding-3-small
litellm_params:
model: openai/text-embedding-3-small
api_key: os.environ/OPENAI_API_KEY
- model_name: gemini-2-embedding
litellm_params:
model: gemini/gemini-2-embedding
api_key: os.environ/GEMINI_API_KEY
# realtime models
- model_name: openai-realtime
litellm_params:
model: openai/realtime-2
api_key: os.environ/OPENAI_API_KEY
model_info:
mode: realtime
mcp_servers:
deepwiki_mcp:
url: "https://mcp.deepwiki.com/mcp"
auth_type: none
description: "just a test"
atlassian:
url: "https://mcp.atlassian.com/v1/mcp"
auth_type: oauth2
authorization_url: https://auth.atlassian.com/authorize
guardrails:
- guardrail_name: "presidio-pii"
litellm_params:
guardrail: presidio
mode: pre_call
presidio_analyzer_api_base: os.environ/PRESIDIO_ANALYZER_API_BASE
presidio_anonymizer_api_base: os.environ/PRESIDIO_ANONYMIZER_API_BASE
default_on: false
pii_entities_config:
EMAIL_ADDRESS: BLOCK
CREDIT_CARD: BLOCK
US_SSN: BLOCK
PHONE_NUMBER: BLOCK

7
tests/e2e/pytest.ini Normal file
View file

@ -0,0 +1,7 @@
[pytest]
# Config when any e2e suite under tests/e2e/ is run directly, e.g.
# uv run pytest tests/e2e/spend_tracking/ -v
# The e2e marker is also registered in conftest.py for runs rooted elsewhere.
addopts = --strict-markers --strict-config
markers =
e2e: live test that requires a running proxy and real provider keys