



























@@ -5,36 +5,35 @@ import {
55buildVercelAiGatewayProvider,
66} from "./provider-catalog.js";
778+const STATIC_MODEL_IDS = [
9+"anthropic/claude-opus-4.6",
10+"openai/gpt-5.4",
11+"openai/gpt-5.4-pro",
12+"moonshotai/kimi-k2.6",
13+];
14+815describe("vercel ai gateway provider catalog", () => {
916it("builds the bundled Vercel AI Gateway defaults", async () => {
1017const provider = await buildVercelAiGatewayProvider();
111812-expect(provider.baseUrl).toBe(VERCEL_AI_GATEWAY_BASE_URL);
13-expect(provider.api).toBe("anthropic-messages");
14-expect(provider.models?.map((model) => model.id)).toEqual(
15-expect.arrayContaining([
16-"anthropic/claude-opus-4.6",
17-"openai/gpt-5.4",
18-"openai/gpt-5.4-pro",
19-"moonshotai/kimi-k2.6",
20-]),
21-);
19+expect(provider).toStrictEqual({
20+baseUrl: VERCEL_AI_GATEWAY_BASE_URL,
21+api: "anthropic-messages",
22+models: getStaticVercelAiGatewayModelCatalog(),
23+});
2224});
23252426it("exposes the static fallback model catalog", () => {
25-expect(getStaticVercelAiGatewayModelCatalog().map((model) => model.id)).toEqual(
26-expect.arrayContaining([
27-"anthropic/claude-opus-4.6",
28-"openai/gpt-5.4",
29-"openai/gpt-5.4-pro",
30-"moonshotai/kimi-k2.6",
31-]),
27+expect(getStaticVercelAiGatewayModelCatalog().map((model) => model.id)).toStrictEqual(
28+STATIC_MODEL_IDS,
3229);
3330});
34313532it("builds an offline static provider catalog", () => {
36-expect(buildStaticVercelAiGatewayProvider().models?.map((model) => model.id)).toEqual(
37-expect.arrayContaining(["moonshotai/kimi-k2.6"]),
38-);
33+expect(buildStaticVercelAiGatewayProvider()).toStrictEqual({
34+baseUrl: VERCEL_AI_GATEWAY_BASE_URL,
35+api: "anthropic-messages",
36+models: getStaticVercelAiGatewayModelCatalog(),
37+});
3938});
4039});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。