Skip to content

Instantly share code, notes, and snippets.

@Jaid
Created December 24, 2025 01:11
Show Gist options
  • Select an option

  • Save Jaid/34c5affd9422d7a7ae5f252e927fd766 to your computer and use it in GitHub Desktop.

Select an option

Save Jaid/34c5affd9422d7a7ae5f252e927fd766 to your computer and use it in GitHub Desktop.
LiteLLM JSONSchema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "LiteLLM Proxy Configuration",
"description": "JSON Schema for the LiteLLM Proxy configuration file (config.yaml equivalent)",
"type": "object",
"properties": {
"environment_variables": {
"description": "Environment variables to set within the proxy",
"type": "object",
"additionalProperties": { "type": ["string", "number", "boolean"] }
},
"model_list": {
"description": "List of models and their deployment parameters",
"type": "array",
"items": {
"type": "object",
"required": ["model_name", "litellm_params"],
"properties": {
"model_name": { "type": "string" },
"litellm_params": {
"type": "object",
"description": "Parameters passed to litellm for this model/deployment",
"properties": {
"model": { "type": "string" },
"api_key": { "type": "string" },
"api_base": { "type": "string" },
"temperature": { "type": "number" },
"max_tokens": { "type": "integer" }
// other litellm params are allowed
},
"additionalProperties": true
},
"model_info": {
"type": "object",
"properties": {
"id": { "type": "string" },
"mode": { "type": "string", "enum": ["embedding", "completion", "chat"] },
"input_cost_per_token": { "type": "number" },
"output_cost_per_token": { "type": "number" },
"max_tokens": { "type": "integer" },
"base_model": { "type": "string" }
},
"additionalProperties": true
}
},
"additionalProperties": true
}
},
"general_settings": {
"description": "General proxy server settings",
"type": "object",
"properties": {
"master_key": { "type": "string" },
"database_url": { "type": "string" },
"database_connection_pool_limit": { "type": "integer" },
"alerting": { "type": "array", "items": { "type": "string" } },
"disable_spend_logs": { "type": "boolean" },
"global_max_parallel_requests": { "type": "integer" }
// many more from docs
},
"additionalProperties": true
},
"litellm_settings": {
"description": "Settings directly related to litellm behavior",
"type": "object",
"properties": {
"success_callback": { "type": "array", "items": { "type": "string" } },
"failure_callback": { "type": "array", "items": { "type": "string" } },
"callbacks": { "type": "array", "items": { "type": "string" } },
"request_timeout": { "type": "integer" },
"cache": { "type": "boolean" },
"context_window_fallbacks": {
"type": "array",
"items": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } } }
},
"mcp_aliases": { "type": "object", "additionalProperties": { "type": "string" } }
},
"additionalProperties": true
},
"router_settings": {
"description": "Routing and load-balancing settings",
"type": "object",
"properties": {
"routing_strategy": { "type": "string" },
"model_group_alias": { "type": "object", "additionalProperties": { "type": "string" } },
"num_retries": { "type": "integer" },
"timeout": { "type": "number" }
},
"additionalProperties": true
},
"cache_params": {
"description": "Detailed cache configuration (e.g., Redis, S3)",
"type": "object",
"properties": {
"type": { "type": "string", "enum": ["redis", "s3", "qdrant"] },
"host": { "type": "string" },
"port": { "type": "integer" },
"password": { "type": "string" },
"s3_bucket_name": { "type": "string" }
// conditional properties based on type
},
"additionalProperties": true
}
},
"additionalProperties": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment