agent_settings: Fix schema validation rejecting custom llm providers (#38248)

Closes https://github.com/zed-industries/zed/issues/37989

Release Notes:

- N/A
This commit is contained in:
Lukas Wirth
2025-09-16 10:23:49 +00:00
committed by GitHub
parent c0710fa8ca
commit c6472fd7a8
+23 -14
View File
@@ -364,21 +364,30 @@ impl JsonSchema for LanguageModelProviderSetting {
}
fn json_schema(_: &mut schemars::SchemaGenerator) -> schemars::Schema {
// list the builtin providers as a subset so that we still auto complete them in the settings
json_schema!({
"enum": [
"amazon-bedrock",
"anthropic",
"copilot_chat",
"deepseek",
"google",
"lmstudio",
"mistral",
"ollama",
"openai",
"openrouter",
"vercel",
"x_ai",
"zed.dev"
"anyOf": [
{
"type": "string",
"enum": [
"amazon-bedrock",
"anthropic",
"copilot_chat",
"deepseek",
"google",
"lmstudio",
"mistral",
"ollama",
"openai",
"openrouter",
"vercel",
"x_ai",
"zed.dev"
]
},
{
"type": "string",
}
]
})
}