Loosen provider type to a string (#144)

This commit is contained in:
Will Chen
2025-05-12 22:29:36 -07:00
committed by GitHub
parent f628c81f4c
commit d1027622b4
3 changed files with 6 additions and 21 deletions

View File

@@ -35,26 +35,17 @@ const providers = [
"ollama",
"lmstudio",
] as const;
/**
* Zod schema for model provider
*/
export const ModelProviderSchema = z.enum(providers);
export const cloudProviders = providers.filter(
(provider) => provider !== "ollama" && provider !== "lmstudio",
);
/**
* Type derived from the ModelProviderSchema
*/
export type ModelProvider = z.infer<typeof ModelProviderSchema>;
/**
* Zod schema for large language model configuration
*/
export const LargeLanguageModelSchema = z.object({
name: z.string(),
provider: ModelProviderSchema,
provider: z.string(),
});
/**