Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit 4eabd91

Browse files
committed
feat(types): add firmware provider type definitions
- Add 'firmware' to dynamicProviders array - Create firmwareSchema with firmwareApiKey and firmwareModelId - Add firmware to providerSettingsSchemaDiscriminated union - Add firmwareModelId to modelIdKeys - Add firmware to modelIdKeysByProvider mapping - Add firmware entry to MODELS_BY_PROVIDER
1 parent c28478e commit 4eabd91

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

packages/types/src/provider-settings.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export const dynamicProviders = [
5050
"unbound",
5151
"roo",
5252
"chutes",
53+
"firmware",
5354
] as const
5455

5556
export type DynamicProvider = (typeof dynamicProviders)[number]
@@ -417,6 +418,11 @@ const basetenSchema = apiModelIdProviderModelSchema.extend({
417418
basetenApiKey: z.string().optional(),
418419
})
419420

421+
const firmwareSchema = baseProviderSettingsSchema.extend({
422+
firmwareApiKey: z.string().optional(),
423+
firmwareModelId: z.string().optional(),
424+
})
425+
420426
const defaultSchema = z.object({
421427
apiProvider: z.undefined(),
422428
})
@@ -458,6 +464,7 @@ export const providerSettingsSchemaDiscriminated = z.discriminatedUnion("apiProv
458464
qwenCodeSchema.merge(z.object({ apiProvider: z.literal("qwen-code") })),
459465
rooSchema.merge(z.object({ apiProvider: z.literal("roo") })),
460466
vercelAiGatewaySchema.merge(z.object({ apiProvider: z.literal("vercel-ai-gateway") })),
467+
firmwareSchema.merge(z.object({ apiProvider: z.literal("firmware") })),
461468
defaultSchema,
462469
])
463470

@@ -499,6 +506,7 @@ export const providerSettingsSchema = z.object({
499506
...qwenCodeSchema.shape,
500507
...rooSchema.shape,
501508
...vercelAiGatewaySchema.shape,
509+
...firmwareSchema.shape,
502510
...codebaseIndexProviderSchema.shape,
503511
})
504512

@@ -532,6 +540,7 @@ export const modelIdKeys = [
532540
"ioIntelligenceModelId",
533541
"vercelAiGatewayModelId",
534542
"deepInfraModelId",
543+
"firmwareModelId",
535544
] as const satisfies readonly (keyof ProviderSettings)[]
536545

537546
export type ModelIdKey = (typeof modelIdKeys)[number]
@@ -584,6 +593,7 @@ export const modelIdKeysByProvider: Record<TypicalProvider, ModelIdKey> = {
584593
"io-intelligence": "ioIntelligenceModelId",
585594
roo: "apiModelId",
586595
"vercel-ai-gateway": "vercelAiGatewayModelId",
596+
firmware: "firmwareModelId",
587597
}
588598

589599
/**
@@ -720,6 +730,7 @@ export const MODELS_BY_PROVIDER: Record<
720730
deepinfra: { id: "deepinfra", label: "DeepInfra", models: [] },
721731
"vercel-ai-gateway": { id: "vercel-ai-gateway", label: "Vercel AI Gateway", models: [] },
722732
chutes: { id: "chutes", label: "Chutes AI", models: [] },
733+
firmware: { id: "firmware", label: "Firmware", models: [] },
723734

724735
// Local providers; models discovered from localhost endpoints.
725736
lmstudio: { id: "lmstudio", label: "LM Studio", models: [] },

0 commit comments

Comments
 (0)