()
| 358 | } as const |
| 359 | |
| 360 | function getStaticModelOptionsForVFS(): StaticModelOption[] { |
| 361 | const hostedProviders = new Set(['openai', 'anthropic', 'google']) |
| 362 | const dynamicProviders = new Set<string>(DYNAMIC_MODEL_PROVIDERS) |
| 363 | |
| 364 | const models: StaticModelOption[] = [] |
| 365 | |
| 366 | for (const [providerId, def] of Object.entries(PROVIDER_DEFINITIONS)) { |
| 367 | if (dynamicProviders.has(providerId)) continue |
| 368 | for (const model of def.models) { |
| 369 | const option: StaticModelOption = { |
| 370 | id: model.id, |
| 371 | provider: providerId, |
| 372 | hosted: hostedProviders.has(providerId), |
| 373 | } |
| 374 | if (model.recommended) option.recommended = true |
| 375 | if (model.speedOptimized) option.speedOptimized = true |
| 376 | if (model.deprecated) option.deprecated = true |
| 377 | models.push(option) |
| 378 | } |
| 379 | } |
| 380 | |
| 381 | return models |
| 382 | } |
| 383 | |
| 384 | /** |
| 385 | * Serialize a SubBlockConfig for the VFS component schema. |
no test coverage detected