User Report
Calling /api/settings/llm/models returns a 500 error:
{
"error": "litellm_admin_request_failed",
"status": 500,
"details": {
"error": {
"message": "{'error': \"Set `'STORE_MODEL_IN_DB='True'` in your env to enable this feature.\"}",
"type": "auth_error",
"param": "None",
"code": "500"
}
}
}
Root Cause
The LiteLLM proxy config in stacks/platform/main.tf is missing store_model_in_db: true in general_settings. Without this, LiteLLM refuses admin API calls for model management (/model/new, /model/delete, /model/update, etc.), which is what the platform's /api/settings/llm/models endpoint relies on.
Specification
Current Config (line ~449 of stacks/platform/main.tf)
general_settings = {
master_key = "os.environ/LITELLM_MASTER_KEY"
}
Required Change
Add store_model_in_db = true to the general_settings block:
general_settings = {
master_key = "os.environ/LITELLM_MASTER_KEY"
store_model_in_db = true
}
Details
- LiteLLM resolves
store_model_in_db from config YAML general_settings (lowest priority), then env var STORE_MODEL_IN_DB (medium), then DB override (highest).
- Setting it in the proxy config (
general_settings) is the cleanest approach for our Helm-based deployment since it keeps configuration declarative.
- All prerequisites are already in place:
DATABASE_URL is set, Prisma auto-initializes, LITELLM_MASTER_KEY is configured, and LITELLM_SALT_KEY is present.
- No other
general_settings changes are required.
File to Change
stacks/platform/main.tf — the litellm_values local, inside proxy_config.general_settings
User Report
Calling
/api/settings/llm/modelsreturns a 500 error:{ "error": "litellm_admin_request_failed", "status": 500, "details": { "error": { "message": "{'error': \"Set `'STORE_MODEL_IN_DB='True'` in your env to enable this feature.\"}", "type": "auth_error", "param": "None", "code": "500" } } }Root Cause
The LiteLLM proxy config in
stacks/platform/main.tfis missingstore_model_in_db: trueingeneral_settings. Without this, LiteLLM refuses admin API calls for model management (/model/new,/model/delete,/model/update, etc.), which is what the platform's/api/settings/llm/modelsendpoint relies on.Specification
Current Config (line ~449 of
stacks/platform/main.tf)Required Change
Add
store_model_in_db = trueto thegeneral_settingsblock:Details
store_model_in_dbfrom config YAMLgeneral_settings(lowest priority), then env varSTORE_MODEL_IN_DB(medium), then DB override (highest).general_settings) is the cleanest approach for our Helm-based deployment since it keeps configuration declarative.DATABASE_URLis set, Prisma auto-initializes,LITELLM_MASTER_KEYis configured, andLITELLM_SALT_KEYis present.general_settingschanges are required.File to Change
stacks/platform/main.tf— thelitellm_valueslocal, insideproxy_config.general_settings