feat(ai): derive generated model types from JSON
This commit is contained in:
@@ -39,7 +39,45 @@ import { XIAOMI_TOKEN_PLAN_SGP_MODELS } from "./providers/xiaomi-token-plan-sgp.
|
||||
import { ZAI_MODELS } from "./providers/zai.models.ts";
|
||||
import { ZAI_CODING_CN_MODELS } from "./providers/zai-coding-cn.models.ts";
|
||||
|
||||
export const MODELS = {
|
||||
export const MODELS: {
|
||||
readonly "amazon-bedrock": typeof AMAZON_BEDROCK_MODELS;
|
||||
readonly "ant-ling": typeof ANT_LING_MODELS;
|
||||
readonly "anthropic": typeof ANTHROPIC_MODELS;
|
||||
readonly "azure-openai-responses": typeof AZURE_OPENAI_RESPONSES_MODELS;
|
||||
readonly "cerebras": typeof CEREBRAS_MODELS;
|
||||
readonly "cloudflare-ai-gateway": typeof CLOUDFLARE_AI_GATEWAY_MODELS;
|
||||
readonly "cloudflare-workers-ai": typeof CLOUDFLARE_WORKERS_AI_MODELS;
|
||||
readonly "deepseek": typeof DEEPSEEK_MODELS;
|
||||
readonly "fireworks": typeof FIREWORKS_MODELS;
|
||||
readonly "github-copilot": typeof GITHUB_COPILOT_MODELS;
|
||||
readonly "google": typeof GOOGLE_MODELS;
|
||||
readonly "google-vertex": typeof GOOGLE_VERTEX_MODELS;
|
||||
readonly "groq": typeof GROQ_MODELS;
|
||||
readonly "huggingface": typeof HUGGINGFACE_MODELS;
|
||||
readonly "kimi-coding": typeof KIMI_CODING_MODELS;
|
||||
readonly "minimax": typeof MINIMAX_MODELS;
|
||||
readonly "minimax-cn": typeof MINIMAX_CN_MODELS;
|
||||
readonly "mistral": typeof MISTRAL_MODELS;
|
||||
readonly "moonshotai": typeof MOONSHOTAI_MODELS;
|
||||
readonly "moonshotai-cn": typeof MOONSHOTAI_CN_MODELS;
|
||||
readonly "nvidia": typeof NVIDIA_MODELS;
|
||||
readonly "openai": typeof OPENAI_MODELS;
|
||||
readonly "openai-codex": typeof OPENAI_CODEX_MODELS;
|
||||
readonly "opencode": typeof OPENCODE_MODELS;
|
||||
readonly "opencode-go": typeof OPENCODE_GO_MODELS;
|
||||
readonly "openrouter": typeof OPENROUTER_MODELS;
|
||||
readonly "qwen-token-plan": typeof QWEN_TOKEN_PLAN_MODELS;
|
||||
readonly "qwen-token-plan-cn": typeof QWEN_TOKEN_PLAN_CN_MODELS;
|
||||
readonly "together": typeof TOGETHER_MODELS;
|
||||
readonly "vercel-ai-gateway": typeof VERCEL_AI_GATEWAY_MODELS;
|
||||
readonly "xai": typeof XAI_MODELS;
|
||||
readonly "xiaomi": typeof XIAOMI_MODELS;
|
||||
readonly "xiaomi-token-plan-ams": typeof XIAOMI_TOKEN_PLAN_AMS_MODELS;
|
||||
readonly "xiaomi-token-plan-cn": typeof XIAOMI_TOKEN_PLAN_CN_MODELS;
|
||||
readonly "xiaomi-token-plan-sgp": typeof XIAOMI_TOKEN_PLAN_SGP_MODELS;
|
||||
readonly "zai": typeof ZAI_MODELS;
|
||||
readonly "zai-coding-cn": typeof ZAI_CODING_CN_MODELS;
|
||||
} = {
|
||||
"amazon-bedrock": AMAZON_BEDROCK_MODELS,
|
||||
"ant-ling": ANT_LING_MODELS,
|
||||
"anthropic": ANTHROPIC_MODELS,
|
||||
@@ -77,4 +115,4 @@ export const MODELS = {
|
||||
"xiaomi-token-plan-sgp": XIAOMI_TOKEN_PLAN_SGP_MODELS,
|
||||
"zai": ZAI_MODELS,
|
||||
"zai-coding-cn": ZAI_CODING_CN_MODELS,
|
||||
} as const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user