mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
24 lines
741 B
TypeScript
24 lines
741 B
TypeScript
// Vercel Ai Gateway provider module implements model/runtime integration.
|
|
import type { ModelProviderConfig } from "openclaw/plugin-sdk/provider-model-shared";
|
|
import {
|
|
discoverVercelAiGatewayModels,
|
|
getStaticVercelAiGatewayModelCatalog,
|
|
VERCEL_AI_GATEWAY_BASE_URL,
|
|
} from "./models.js";
|
|
|
|
export function buildStaticVercelAiGatewayProvider(): ModelProviderConfig {
|
|
return {
|
|
baseUrl: VERCEL_AI_GATEWAY_BASE_URL,
|
|
api: "anthropic-messages",
|
|
models: getStaticVercelAiGatewayModelCatalog(),
|
|
};
|
|
}
|
|
|
|
export async function buildVercelAiGatewayProvider(): Promise<ModelProviderConfig> {
|
|
return {
|
|
baseUrl: VERCEL_AI_GATEWAY_BASE_URL,
|
|
api: "anthropic-messages",
|
|
models: await discoverVercelAiGatewayModels(),
|
|
};
|
|
}
|