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:
@@ -364,21 +364,30 @@ impl JsonSchema for LanguageModelProviderSetting {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn json_schema(_: &mut schemars::SchemaGenerator) -> schemars::Schema {
|
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!({
|
json_schema!({
|
||||||
"enum": [
|
"anyOf": [
|
||||||
"amazon-bedrock",
|
{
|
||||||
"anthropic",
|
"type": "string",
|
||||||
"copilot_chat",
|
"enum": [
|
||||||
"deepseek",
|
"amazon-bedrock",
|
||||||
"google",
|
"anthropic",
|
||||||
"lmstudio",
|
"copilot_chat",
|
||||||
"mistral",
|
"deepseek",
|
||||||
"ollama",
|
"google",
|
||||||
"openai",
|
"lmstudio",
|
||||||
"openrouter",
|
"mistral",
|
||||||
"vercel",
|
"ollama",
|
||||||
"x_ai",
|
"openai",
|
||||||
"zed.dev"
|
"openrouter",
|
||||||
|
"vercel",
|
||||||
|
"x_ai",
|
||||||
|
"zed.dev"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user