feat(models): add Vercel AI Gateway provider
This commit is contained in:
@@ -190,6 +190,12 @@ export function createClientFromConfig(cfg: ModelConfig): ModelClient {
|
||||
apiKey: requireApiKey(cfg, 'OPENROUTER_API_KEY'),
|
||||
baseURL: cfg.endpoint ?? 'https://openrouter.ai/api/v1',
|
||||
});
|
||||
case 'vercel':
|
||||
return new OpenAIClient({
|
||||
model: cfg.model,
|
||||
apiKey: requireApiKey(cfg, 'AI_GATEWAY_API_KEY'),
|
||||
baseURL: cfg.endpoint ?? 'https://ai-gateway.vercel.sh/v1',
|
||||
});
|
||||
case 'zhipuai':
|
||||
if (cfg.use_oauth) {
|
||||
const apiKey = getZaiApiKey();
|
||||
|
||||
Reference in New Issue
Block a user