|
1 | 1 | import { z } from 'zod' |
2 | 2 |
|
3 | | -export type ByokProviderId = 'openai' | 'anthropic' | 'deepseek' | 'custom' |
| 3 | +export type ByokProviderId = 'openai' | 'anthropic' | 'deepseek' | 'google' | 'mistral' | 'custom' |
4 | 4 | type UnsupportedProviderId = 'azure' | 'bedrock' |
5 | 5 |
|
6 | 6 | export type ByokModel = { |
@@ -43,7 +43,7 @@ const CustomInstructionsSchema: z.ZodType<CustomInstructions> = z.object({ |
43 | 43 | // this schema. |
44 | 44 | export const ByokConfigSchema: z.ZodType<ByokConfig> = z.discriminatedUnion('provider', [ |
45 | 45 | z.object({ |
46 | | - provider: z.enum(['openai', 'anthropic', 'deepseek']), |
| 46 | + provider: z.enum(['openai', 'anthropic', 'deepseek', 'google', 'mistral']), |
47 | 47 | model: z.string().min(1), |
48 | 48 | apiKey: z.string(), |
49 | 49 | customInstructions: CustomInstructionsSchema.nullable(), |
@@ -146,6 +146,46 @@ export const PROVIDER_ENTRIES: ProviderEntry[] = [ |
146 | 146 | }, |
147 | 147 | ], |
148 | 148 | }, |
| 149 | + { |
| 150 | + id: 'google', |
| 151 | + kind: 'catalog', |
| 152 | + labelKey: 'chat.modelPicker.providerGoogle', |
| 153 | + supported: true, |
| 154 | + models: [ |
| 155 | + { |
| 156 | + id: 'gemini-2.5-flash', |
| 157 | + label: 'Gemini 2.5 Flash', |
| 158 | + description: 'Fast and inexpensive. Fine for most form-filling.', |
| 159 | + recommended: true, |
| 160 | + }, |
| 161 | + { |
| 162 | + id: 'gemini-2.5-pro', |
| 163 | + label: 'Gemini 2.5 Pro', |
| 164 | + description: 'Higher reasoning for tricky forms', |
| 165 | + recommended: false, |
| 166 | + }, |
| 167 | + ], |
| 168 | + }, |
| 169 | + { |
| 170 | + id: 'mistral', |
| 171 | + kind: 'catalog', |
| 172 | + labelKey: 'chat.modelPicker.providerMistral', |
| 173 | + supported: true, |
| 174 | + models: [ |
| 175 | + { |
| 176 | + id: 'mistral-small-latest', |
| 177 | + label: 'Mistral Small', |
| 178 | + description: 'Fast and inexpensive. Fine for most form-filling.', |
| 179 | + recommended: true, |
| 180 | + }, |
| 181 | + { |
| 182 | + id: 'mistral-large-latest', |
| 183 | + label: 'Mistral Large', |
| 184 | + description: 'Higher reasoning for tricky forms', |
| 185 | + recommended: false, |
| 186 | + }, |
| 187 | + ], |
| 188 | + }, |
149 | 189 | { |
150 | 190 | id: 'custom', |
151 | 191 | kind: 'custom', |
|
0 commit comments