fix(#583): add Google (Gemini) to model provider selection
The model-config provider dropdown in the Providers settings screen (also shown in the in-chat Providers dialog) only offered Custom, OpenRouter, Anthropic, and OpenAI. Despite docker-compose exposing GOOGLE_API_KEY, users could not select Google/Gemini as a provider without hand-editing config. Add 'google' to ModelProviderOption and MODEL_PROVIDER_OPTIONS (label 'Google (Gemini)'), and register 'google' as a known provider prefix so google/* model ids strip correctly.
This commit is contained in:
@@ -57,6 +57,7 @@ const KNOWN_PROVIDER_PREFIXES = [
|
|||||||
'anthropic',
|
'anthropic',
|
||||||
'openai',
|
'openai',
|
||||||
'openai-codex',
|
'openai-codex',
|
||||||
|
'google',
|
||||||
'nous',
|
'nous',
|
||||||
'ollama',
|
'ollama',
|
||||||
'atomic-chat',
|
'atomic-chat',
|
||||||
@@ -767,7 +768,12 @@ function SettingCard(props: {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
type ModelProviderOption = 'custom' | 'openrouter' | 'anthropic' | 'openai'
|
type ModelProviderOption =
|
||||||
|
| 'custom'
|
||||||
|
| 'openrouter'
|
||||||
|
| 'anthropic'
|
||||||
|
| 'openai'
|
||||||
|
| 'google'
|
||||||
|
|
||||||
type ModelConfigDraft = {
|
type ModelConfigDraft = {
|
||||||
provider: ModelProviderOption
|
provider: ModelProviderOption
|
||||||
@@ -785,6 +791,7 @@ const MODEL_PROVIDER_OPTIONS: Array<SelectOption> = [
|
|||||||
{ label: 'OpenRouter', value: 'openrouter' },
|
{ label: 'OpenRouter', value: 'openrouter' },
|
||||||
{ label: 'Anthropic', value: 'anthropic' },
|
{ label: 'Anthropic', value: 'anthropic' },
|
||||||
{ label: 'OpenAI', value: 'openai' },
|
{ label: 'OpenAI', value: 'openai' },
|
||||||
|
{ label: 'Google (Gemini)', value: 'google' },
|
||||||
]
|
]
|
||||||
|
|
||||||
const MODEL_PRESETS = [
|
const MODEL_PRESETS = [
|
||||||
|
|||||||
Reference in New Issue
Block a user