fix(ai): update tests to current built-in model catalog ids
The shipped provider catalogs moved to the newer model generation while the tests still referenced delisted ids, which broke ModelId type checking and the metadata assertions: Xiaomi mimo-v2.5-pro -> mimo-v2.6-pro, Together and Baseten moonshotai/Kimi-K2.6 -> Kimi-K3, Together deepseek-ai/DeepSeek-V4-Pro -> DeepSeek-V4-Pro-0813 and MiniMaxAI/MiniMax-M2.7 -> MiniMax-M3, GitHub Copilot gpt-5-mini -> gpt-5.4-nano, gpt-5.5 -> gpt-5.6-sol and claude-opus-4.7 -> claude-opus-4.8, OpenRouter anthropic/claude-sonnet-4 -> 4.6 and deepseek/deepseek-r1 -> deepseek-r1-0528, NVIDIA Nemotron 3 Super -> 3.5 Super VL. Metadata expectations follow the new catalog entries. The OpenCode Go thinking-payload tests move to deepseek-v4-pro because opencode-go kimi-k3 no longer uses the deepseek thinking format, the reasoning-replay test updates its synthetic message model id because transformMessages only keeps thinking blocks for the same model, and the opencode-go kimi-k3 cache-retention entry is dropped because that model now supports long cache retention.
This commit is contained in:
1 parent
485efdb9c3
commit
1cd38aeb80
20 files changed
+148
-151
No files matched your search
@@ -178,7 +178,7 @@ describe("AI Providers Abort Tests", () => {
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.TOGETHER_API_KEY)("Together AI Provider Abort", () => {
|
||||
const llm = getModel("together", "moonshotai/Kimi-K2.6");
|
||||
const llm = getModel("together", "moonshotai/Kimi-K3");
|
||||
|
||||
it("should abort mid-stream", { retry: 3 }, async () => {
|
||||
await testAbortSignal(llm, { reasoningEffort: "high" });
|
||||
@@ -214,7 +214,7 @@ describe("AI Providers Abort Tests", () => {
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_API_KEY)("Xiaomi MiMo (API billing) Provider Abort", () => {
|
||||
const llm = getModel("xiaomi", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi", "mimo-v2.6-pro");
|
||||
|
||||
it("should abort mid-stream", { retry: 3 }, async () => {
|
||||
await testAbortSignal(llm);
|
||||
@@ -226,7 +226,7 @@ describe("AI Providers Abort Tests", () => {
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_CN_API_KEY)("Xiaomi MiMo Token Plan (CN) Provider Abort", () => {
|
||||
const llm = getModel("xiaomi-token-plan-cn", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi-token-plan-cn", "mimo-v2.6-pro");
|
||||
|
||||
it("should abort mid-stream", { retry: 3 }, async () => {
|
||||
await testAbortSignal(llm);
|
||||
@@ -238,7 +238,7 @@ describe("AI Providers Abort Tests", () => {
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_AMS_API_KEY)("Xiaomi MiMo Token Plan (AMS) Provider Abort", () => {
|
||||
const llm = getModel("xiaomi-token-plan-ams", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi-token-plan-ams", "mimo-v2.6-pro");
|
||||
|
||||
it("should abort mid-stream", { retry: 3 }, async () => {
|
||||
await testAbortSignal(llm);
|
||||
@@ -250,7 +250,7 @@ describe("AI Providers Abort Tests", () => {
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_SGP_API_KEY)("Xiaomi MiMo Token Plan (SGP) Provider Abort", () => {
|
||||
const llm = getModel("xiaomi-token-plan-sgp", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi-token-plan-sgp", "mimo-v2.6-pro");
|
||||
|
||||
it("should abort mid-stream", { retry: 3 }, async () => {
|
||||
await testAbortSignal(llm);
|
||||
|
||||
@@ -19,25 +19,24 @@ describe("Baseten models", () => {
|
||||
expect(getModel("baseten", "zai-org/GLM-5.2-Fast").input).toEqual(["text"]);
|
||||
});
|
||||
|
||||
it("models Kimi K2.6 reasoning as an explicit off/on toggle", async () => {
|
||||
const model = getModel("baseten", "moonshotai/Kimi-K2.6");
|
||||
it("models Kimi K3 reasoning levels and effort mapping", async () => {
|
||||
const model = getModel("baseten", "moonshotai/Kimi-K3");
|
||||
let payload: Record<string, unknown> | undefined;
|
||||
|
||||
expect(model.thinkingLevelMap).toEqual({
|
||||
off: "off",
|
||||
off: "none",
|
||||
minimal: null,
|
||||
low: null,
|
||||
low: "low",
|
||||
medium: null,
|
||||
high: "high",
|
||||
xhigh: null,
|
||||
max: null,
|
||||
max: "max",
|
||||
});
|
||||
expect(model.compat).toMatchObject({
|
||||
supportsReasoningEffort: false,
|
||||
thinkingFormat: "baseten",
|
||||
chatTemplateArgs: { enable_thinking: { $var: "thinking.enabled" } },
|
||||
supportsReasoningEffort: true,
|
||||
thinkingFormat: "openai",
|
||||
});
|
||||
expect(getSupportedThinkingLevels(model)).toEqual(["off", "high"]);
|
||||
expect(getSupportedThinkingLevels(model)).toEqual(["off", "low", "high", "max"]);
|
||||
|
||||
await streamSimple(
|
||||
model,
|
||||
@@ -52,8 +51,8 @@ describe("Baseten models", () => {
|
||||
},
|
||||
).result();
|
||||
|
||||
expect(payload?.chat_template_args).toEqual({ enable_thinking: true });
|
||||
expect(payload?.reasoning_effort).toBeUndefined();
|
||||
expect(payload?.chat_template_args).toBeUndefined();
|
||||
expect(payload?.reasoning_effort).toBe("high");
|
||||
});
|
||||
|
||||
it("sends Baseten chat_template_args with reasoning effort", async () => {
|
||||
|
||||
@@ -508,7 +508,6 @@ describe("Cache Retention (PI_CACHE_RETENTION)", () => {
|
||||
MODELS.opencode["kimi-k2.5"],
|
||||
MODELS.opencode["kimi-k2.6"],
|
||||
MODELS.opencode["minimax-m2.7"],
|
||||
MODELS["opencode-go"]["kimi-k2.6"],
|
||||
] as const)("should omit long cache retention for $provider/$id", async (metadata) => {
|
||||
const model = metadata as Model<"openai-completions">;
|
||||
let capturedPayload: OpenAICompletionsCachePayload | undefined;
|
||||
@@ -530,7 +529,7 @@ describe("Cache Retention (PI_CACHE_RETENTION)", () => {
|
||||
// Expected to fail
|
||||
}
|
||||
|
||||
expect(model.compat?.supportsLongCacheRetention).toBe(false);
|
||||
expect(model.compat?.supportsLongCacheRetention).toBeFalsy();
|
||||
expect(capturedPayload).toBeDefined();
|
||||
expect(capturedPayload?.prompt_cache_key).toBeUndefined();
|
||||
expect(capturedPayload?.prompt_cache_retention).toBeUndefined();
|
||||
@@ -591,7 +590,7 @@ describe("Cache Retention (PI_CACHE_RETENTION)", () => {
|
||||
// Expected to fail
|
||||
}
|
||||
|
||||
expect(model.compat?.supportsStrictMode).toBe(false);
|
||||
expect(model.compat?.supportsStrictMode).toBeFalsy();
|
||||
expect(capturedPayload).toBeDefined();
|
||||
const tools = capturedPayload?.tools as any[] | undefined;
|
||||
expect(tools).toBeDefined();
|
||||
|
||||
@@ -338,8 +338,8 @@ describe("Context overflow error handling", () => {
|
||||
// =============================================================================
|
||||
|
||||
describe.skipIf(!process.env.TOGETHER_API_KEY)("Together AI", () => {
|
||||
it("Kimi-K2.6 - should detect overflow via isContextOverflow", async () => {
|
||||
const model = getModel("together", "moonshotai/Kimi-K2.6");
|
||||
it("Kimi-K3 - should detect overflow via isContextOverflow", async () => {
|
||||
const model = getModel("together", "moonshotai/Kimi-K3");
|
||||
const result = await testContextOverflow(model, process.env.TOGETHER_API_KEY!);
|
||||
logResult(result);
|
||||
|
||||
@@ -420,8 +420,8 @@ describe("Context overflow error handling", () => {
|
||||
// Xiaomi silently truncates oversized input to fill the context window exactly,
|
||||
// then returns finish_reason "length" with output=0 (no room left to generate).
|
||||
// This is a detectable overflow signal but uses stopReason "length" rather than "error".
|
||||
it("mimo-v2.5-pro - should detect overflow via isContextOverflow", async () => {
|
||||
const model = getModel("xiaomi", "mimo-v2.5-pro");
|
||||
it("mimo-v2.6-pro - should detect overflow via isContextOverflow", async () => {
|
||||
const model = getModel("xiaomi", "mimo-v2.6-pro");
|
||||
const result = await testContextOverflow(model, process.env.XIAOMI_API_KEY!);
|
||||
logResult(result);
|
||||
|
||||
@@ -432,8 +432,8 @@ describe("Context overflow error handling", () => {
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_CN_API_KEY)("Xiaomi MiMo Token Plan (CN)", () => {
|
||||
it("mimo-v2.5-pro - should detect overflow via isContextOverflow", async () => {
|
||||
const model = getModel("xiaomi-token-plan-cn", "mimo-v2.5-pro");
|
||||
it("mimo-v2.6-pro - should detect overflow via isContextOverflow", async () => {
|
||||
const model = getModel("xiaomi-token-plan-cn", "mimo-v2.6-pro");
|
||||
const result = await testContextOverflow(model, process.env.XIAOMI_TOKEN_PLAN_CN_API_KEY!);
|
||||
logResult(result);
|
||||
|
||||
@@ -444,8 +444,8 @@ describe("Context overflow error handling", () => {
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_AMS_API_KEY)("Xiaomi MiMo Token Plan (AMS)", () => {
|
||||
it("mimo-v2.5-pro - should detect overflow via isContextOverflow", async () => {
|
||||
const model = getModel("xiaomi-token-plan-ams", "mimo-v2.5-pro");
|
||||
it("mimo-v2.6-pro - should detect overflow via isContextOverflow", async () => {
|
||||
const model = getModel("xiaomi-token-plan-ams", "mimo-v2.6-pro");
|
||||
const result = await testContextOverflow(model, process.env.XIAOMI_TOKEN_PLAN_AMS_API_KEY!);
|
||||
logResult(result);
|
||||
|
||||
@@ -456,8 +456,8 @@ describe("Context overflow error handling", () => {
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_SGP_API_KEY)("Xiaomi MiMo Token Plan (SGP)", () => {
|
||||
it("mimo-v2.5-pro - should detect overflow via isContextOverflow", async () => {
|
||||
const model = getModel("xiaomi-token-plan-sgp", "mimo-v2.5-pro");
|
||||
it("mimo-v2.6-pro - should detect overflow via isContextOverflow", async () => {
|
||||
const model = getModel("xiaomi-token-plan-sgp", "mimo-v2.6-pro");
|
||||
const result = await testContextOverflow(model, process.env.XIAOMI_TOKEN_PLAN_SGP_API_KEY!);
|
||||
logResult(result);
|
||||
|
||||
@@ -540,8 +540,8 @@ describe("Context overflow error handling", () => {
|
||||
|
||||
describe.skipIf(!process.env.OPENROUTER_API_KEY)("OpenRouter", () => {
|
||||
// Anthropic backend
|
||||
it("anthropic/claude-sonnet-4 via OpenRouter - should detect overflow via isContextOverflow", async () => {
|
||||
const model = getModel("openrouter", "anthropic/claude-sonnet-4");
|
||||
it("anthropic/claude-sonnet-4.6 via OpenRouter - should detect overflow via isContextOverflow", async () => {
|
||||
const model = getModel("openrouter", "anthropic/claude-sonnet-4.6");
|
||||
const result = await testContextOverflow(model, process.env.OPENROUTER_API_KEY!);
|
||||
logResult(result);
|
||||
|
||||
|
||||
@@ -130,10 +130,10 @@ const PROVIDER_MODEL_PAIRS: ProviderModelPair[] = [
|
||||
{ provider: "opencode-go", model: "kimi-k2.5", label: "go-kimi-k2.5" },
|
||||
{ provider: "opencode-go", model: "minimax-m2.5", label: "go-minimax-m2.5" },
|
||||
// Xiaomi MiMo
|
||||
{ provider: "xiaomi", model: "mimo-v2.5-pro", label: "xiaomi-mimo-v2.5-pro" },
|
||||
{ provider: "xiaomi-token-plan-cn", model: "mimo-v2.5-pro", label: "xiaomi-token-plan-cn-mimo-v2.5-pro" },
|
||||
{ provider: "xiaomi-token-plan-ams", model: "mimo-v2.5-pro", label: "xiaomi-token-plan-ams-mimo-v2.5-pro" },
|
||||
{ provider: "xiaomi-token-plan-sgp", model: "mimo-v2.5-pro", label: "xiaomi-token-plan-sgp-mimo-v2.5-pro" },
|
||||
{ provider: "xiaomi", model: "mimo-v2.6-pro", label: "xiaomi-mimo-v2.6-pro" },
|
||||
{ provider: "xiaomi-token-plan-cn", model: "mimo-v2.6-pro", label: "xiaomi-token-plan-cn-mimo-v2.6-pro" },
|
||||
{ provider: "xiaomi-token-plan-ams", model: "mimo-v2.6-pro", label: "xiaomi-token-plan-ams-mimo-v2.6-pro" },
|
||||
{ provider: "xiaomi-token-plan-sgp", model: "mimo-v2.6-pro", label: "xiaomi-token-plan-sgp-mimo-v2.6-pro" },
|
||||
// Qwen Token Plan
|
||||
{ provider: "qwen-token-plan", model: "qwen3.7-max", label: "qwen-token-plan-qwen3.7-max" },
|
||||
{ provider: "qwen-token-plan-cn", model: "qwen3.7-max", label: "qwen-token-plan-cn-qwen3.7-max" },
|
||||
|
||||
@@ -367,7 +367,7 @@ describe("AI Providers Empty Message Tests", () => {
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.TOGETHER_API_KEY)("Together AI Provider Empty Messages", () => {
|
||||
const llm = getModel("together", "moonshotai/Kimi-K2.6");
|
||||
const llm = getModel("together", "moonshotai/Kimi-K3");
|
||||
|
||||
it("should handle empty content array", { retry: 3, timeout: 30000 }, async () => {
|
||||
await testEmptyMessage(llm);
|
||||
@@ -468,7 +468,7 @@ describe("AI Providers Empty Message Tests", () => {
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_API_KEY)("Xiaomi MiMo (API billing) Provider Empty Messages", () => {
|
||||
const llm = getModel("xiaomi", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi", "mimo-v2.6-pro");
|
||||
|
||||
it("should handle empty content array", { retry: 3, timeout: 30000 }, async () => {
|
||||
await testEmptyMessage(llm);
|
||||
@@ -490,7 +490,7 @@ describe("AI Providers Empty Message Tests", () => {
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_CN_API_KEY)(
|
||||
"Xiaomi MiMo Token Plan (CN) Provider Empty Messages",
|
||||
() => {
|
||||
const llm = getModel("xiaomi-token-plan-cn", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi-token-plan-cn", "mimo-v2.6-pro");
|
||||
|
||||
it("should handle empty content array", { retry: 3, timeout: 30000 }, async () => {
|
||||
await testEmptyMessage(llm);
|
||||
@@ -513,7 +513,7 @@ describe("AI Providers Empty Message Tests", () => {
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_AMS_API_KEY)(
|
||||
"Xiaomi MiMo Token Plan (AMS) Provider Empty Messages",
|
||||
() => {
|
||||
const llm = getModel("xiaomi-token-plan-ams", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi-token-plan-ams", "mimo-v2.6-pro");
|
||||
|
||||
it("should handle empty content array", { retry: 3, timeout: 30000 }, async () => {
|
||||
await testEmptyMessage(llm);
|
||||
@@ -536,7 +536,7 @@ describe("AI Providers Empty Message Tests", () => {
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_SGP_API_KEY)(
|
||||
"Xiaomi MiMo Token Plan (SGP) Provider Empty Messages",
|
||||
() => {
|
||||
const llm = getModel("xiaomi-token-plan-sgp", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi-token-plan-sgp", "mimo-v2.6-pro");
|
||||
|
||||
it("should handle empty content array", { retry: 3, timeout: 30000 }, async () => {
|
||||
await testEmptyMessage(llm);
|
||||
|
||||
@@ -57,10 +57,10 @@ describe("Copilot Claude via Anthropic Messages", () => {
|
||||
});
|
||||
|
||||
it("applies Copilot-specific adaptive thinking effort overrides", () => {
|
||||
const opus47 = getModel("github-copilot", "claude-opus-4.7");
|
||||
expect(opus47.thinkingLevelMap).toMatchObject({ minimal: "low", xhigh: "xhigh", max: "max" });
|
||||
expect(getSupportedThinkingLevels(opus47)).toContain("xhigh");
|
||||
expect(getSupportedThinkingLevels(opus47)).toContain("max");
|
||||
const opus48 = getModel("github-copilot", "claude-opus-4.8");
|
||||
expect(opus48.thinkingLevelMap).toMatchObject({ minimal: "low", xhigh: "xhigh", max: "max" });
|
||||
expect(getSupportedThinkingLevels(opus48)).toContain("xhigh");
|
||||
expect(getSupportedThinkingLevels(opus48)).toContain("max");
|
||||
|
||||
const opus5 = getModel("github-copilot", "claude-opus-5");
|
||||
expect(opus5.api).toBe("anthropic-messages");
|
||||
|
||||
@@ -298,8 +298,8 @@ describe("Tool Results with Images", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.TOGETHER_API_KEY)("Together AI Provider (Kimi-K2.6)", () => {
|
||||
const llm = getModel("together", "moonshotai/Kimi-K2.6");
|
||||
describe.skipIf(!process.env.TOGETHER_API_KEY)("Together AI Provider (Kimi-K3)", () => {
|
||||
const llm = getModel("together", "moonshotai/Kimi-K3");
|
||||
const options = { reasoningEffort: "high" } satisfies StreamOptionsWithExtras;
|
||||
|
||||
it("should handle tool result with only image", { retry: 3, timeout: 30000 }, async () => {
|
||||
@@ -311,8 +311,8 @@ describe("Tool Results with Images", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.BASETEN_API_KEY)("Baseten Provider (Kimi-K2.6)", () => {
|
||||
const llm = getModel("baseten", "moonshotai/Kimi-K2.6");
|
||||
describe.skipIf(!process.env.BASETEN_API_KEY)("Baseten Provider (Kimi-K3)", () => {
|
||||
const llm = getModel("baseten", "moonshotai/Kimi-K3");
|
||||
const options = { reasoningEffort: "high" } satisfies StreamOptionsWithExtras;
|
||||
|
||||
it("should handle tool result with only image", { retry: 3, timeout: 30000 }, async () => {
|
||||
@@ -324,8 +324,8 @@ describe("Tool Results with Images", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_API_KEY)("Xiaomi MiMo (API billing) Provider (mimo-v2.5-pro)", () => {
|
||||
const llm = getModel("xiaomi", "mimo-v2.5-pro");
|
||||
describe.skipIf(!process.env.XIAOMI_API_KEY)("Xiaomi MiMo (API billing) Provider (mimo-v2.6-pro)", () => {
|
||||
const llm = getModel("xiaomi", "mimo-v2.6-pro");
|
||||
|
||||
it("should handle tool result with only image", { retry: 3, timeout: 30000 }, async () => {
|
||||
await handleToolWithImageResult(llm);
|
||||
@@ -344,9 +344,9 @@ describe("Tool Results with Images", () => {
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_CN_API_KEY)(
|
||||
"Xiaomi MiMo Token Plan (CN) Provider (mimo-v2.5-pro)",
|
||||
"Xiaomi MiMo Token Plan (CN) Provider (mimo-v2.6-pro)",
|
||||
() => {
|
||||
const llm = getModel("xiaomi-token-plan-cn", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi-token-plan-cn", "mimo-v2.6-pro");
|
||||
|
||||
it("should handle tool result with only image", { retry: 3, timeout: 30000 }, async () => {
|
||||
await handleToolWithImageResult(llm);
|
||||
@@ -361,9 +361,9 @@ describe("Tool Results with Images", () => {
|
||||
);
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_AMS_API_KEY)(
|
||||
"Xiaomi MiMo Token Plan (AMS) Provider (mimo-v2.5-pro)",
|
||||
"Xiaomi MiMo Token Plan (AMS) Provider (mimo-v2.6-pro)",
|
||||
() => {
|
||||
const llm = getModel("xiaomi-token-plan-ams", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi-token-plan-ams", "mimo-v2.6-pro");
|
||||
|
||||
it("should handle tool result with only image", { retry: 3, timeout: 30000 }, async () => {
|
||||
await handleToolWithImageResult(llm);
|
||||
@@ -378,9 +378,9 @@ describe("Tool Results with Images", () => {
|
||||
);
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_SGP_API_KEY)(
|
||||
"Xiaomi MiMo Token Plan (SGP) Provider (mimo-v2.5-pro)",
|
||||
"Xiaomi MiMo Token Plan (SGP) Provider (mimo-v2.6-pro)",
|
||||
() => {
|
||||
const llm = getModel("xiaomi-token-plan-sgp", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi-token-plan-sgp", "mimo-v2.6-pro");
|
||||
|
||||
it("should handle tool result with only image", { retry: 3, timeout: 30000 }, async () => {
|
||||
await handleToolWithImageResult(llm);
|
||||
|
||||
@@ -1234,7 +1234,7 @@ describe("openai-completions tool_choice", () => {
|
||||
const providers = ["xiaomi", "xiaomi-token-plan-cn", "xiaomi-token-plan-ams", "xiaomi-token-plan-sgp"] as const;
|
||||
|
||||
for (const provider of providers) {
|
||||
const model = getModel(provider, "mimo-v2.5-pro")!;
|
||||
const model = getModel(provider, "mimo-v2.6-pro")!;
|
||||
expect(model.compat?.requiresReasoningContentOnAssistantMessages).toBe(true);
|
||||
expect(model.compat?.thinkingFormat).toBe("deepseek");
|
||||
expect(model.compat?.maxTokensField).toBeUndefined();
|
||||
@@ -1255,12 +1255,12 @@ describe("openai-completions tool_choice", () => {
|
||||
});
|
||||
|
||||
it("replays Xiaomi MiMo assistant tool calls with empty reasoning_content when thinking is missing", async () => {
|
||||
const model = getModel("xiaomi", "mimo-v2.5-pro")!;
|
||||
const model = getModel("xiaomi", "mimo-v2.6-pro")!;
|
||||
const assistantMessage: AssistantMessage = {
|
||||
role: "assistant",
|
||||
api: "openai-completions",
|
||||
provider: "xiaomi",
|
||||
model: "mimo-v2.5-pro",
|
||||
model: "mimo-v2.6-pro",
|
||||
content: [{ type: "toolCall", id: "call_1", name: "read", arguments: { path: "README.md" } }],
|
||||
usage: {
|
||||
input: 0,
|
||||
@@ -1320,7 +1320,7 @@ describe("openai-completions tool_choice", () => {
|
||||
},
|
||||
];
|
||||
|
||||
const { compat: _compat, ...baseModel } = getModel("opencode-go", "kimi-k2.6")!;
|
||||
const { compat: _compat, ...baseModel } = getModel("opencode-go", "kimi-k3")!;
|
||||
const model = { ...baseModel, api: "openai-completions" } as const;
|
||||
const response = await streamSimple(
|
||||
model,
|
||||
@@ -1367,7 +1367,7 @@ describe("openai-completions tool_choice", () => {
|
||||
});
|
||||
|
||||
it("replays OpenCode Go reasoning thinking blocks as reasoning_content", () => {
|
||||
const { compat: _compat, ...baseModel } = getModel("opencode-go", "kimi-k2.6")!;
|
||||
const { compat: _compat, ...baseModel } = getModel("opencode-go", "kimi-k3")!;
|
||||
const model = { ...baseModel, api: "openai-completions" } as Model<"openai-completions">;
|
||||
const messages = convertMessages(
|
||||
model,
|
||||
@@ -1377,7 +1377,7 @@ describe("openai-completions tool_choice", () => {
|
||||
role: "assistant",
|
||||
api: "openai-completions",
|
||||
provider: "opencode-go",
|
||||
model: "kimi-k2.6",
|
||||
model: "kimi-k3",
|
||||
content: [
|
||||
{ type: "thinking", thinking: "think", thinkingSignature: "reasoning" },
|
||||
{ type: "toolCall", id: "call_1", name: "read", arguments: { path: "README.md" } },
|
||||
@@ -1425,8 +1425,8 @@ describe("openai-completions tool_choice", () => {
|
||||
expect(messages[0]).not.toHaveProperty("reasoning");
|
||||
});
|
||||
|
||||
it("sends thinking disabled for OpenCode Go Kimi K2.6 when thinking is off", async () => {
|
||||
const model = getModel("opencode-go", "kimi-k2.6")!;
|
||||
it("sends thinking disabled for OpenCode Go DeepSeek V4 Pro when thinking is off", async () => {
|
||||
const model = getModel("opencode-go", "deepseek-v4-pro")!;
|
||||
let payload: unknown;
|
||||
|
||||
await streamSimple(
|
||||
@@ -1447,8 +1447,8 @@ describe("openai-completions tool_choice", () => {
|
||||
expect(params.reasoning_effort).toBeUndefined();
|
||||
});
|
||||
|
||||
it("sends thinking enabled for OpenCode Go Kimi K2.6 when thinking is enabled", async () => {
|
||||
const model = getModel("opencode-go", "kimi-k2.6")!;
|
||||
it("sends thinking enabled for OpenCode Go DeepSeek V4 Pro when thinking is enabled", async () => {
|
||||
const model = getModel("opencode-go", "deepseek-v4-pro")!;
|
||||
let payload: unknown;
|
||||
|
||||
await streamSimple(
|
||||
@@ -1467,7 +1467,7 @@ describe("openai-completions tool_choice", () => {
|
||||
|
||||
const params = (payload ?? mockState.lastParams) as { thinking?: unknown; reasoning_effort?: string };
|
||||
expect(params.thinking).toEqual({ type: "enabled" });
|
||||
expect(params.reasoning_effort).toBeUndefined();
|
||||
expect(params.reasoning_effort).toBe("high");
|
||||
});
|
||||
|
||||
it("omits disabled thinking for Moonshot Kimi K2.7 Code models", async () => {
|
||||
@@ -1519,7 +1519,7 @@ describe("openai-completions tool_choice", () => {
|
||||
});
|
||||
|
||||
it("sends max_tokens for OpenCode completions models", async () => {
|
||||
const cases = [getModel("opencode-go", "kimi-k2.6")!, getModel("opencode", "kimi-k2.6")!] as const;
|
||||
const cases = [getModel("opencode-go", "kimi-k3")!, getModel("opencode", "kimi-k2.6")!] as const;
|
||||
|
||||
for (const model of cases) {
|
||||
let payload: unknown;
|
||||
@@ -1761,7 +1761,7 @@ describe("openai-completions tool_choice", () => {
|
||||
});
|
||||
|
||||
it("uses OpenRouter reasoning object instead of reasoning_effort", async () => {
|
||||
const model = getModel("openrouter", "deepseek/deepseek-r1")!;
|
||||
const model = getModel("openrouter", "deepseek/deepseek-r1-0528")!;
|
||||
let payload: unknown;
|
||||
|
||||
await streamSimple(
|
||||
|
||||
@@ -73,7 +73,7 @@ describe("openai-responses provider defaults", () => {
|
||||
});
|
||||
|
||||
it("omits reasoning when no reasoning is requested", async () => {
|
||||
const model = getModel("github-copilot", "gpt-5-mini");
|
||||
const model = getModel("github-copilot", "gpt-5.4-nano");
|
||||
let capturedPayload: unknown;
|
||||
|
||||
vi.spyOn(globalThis, "fetch").mockResolvedValue(
|
||||
|
||||
@@ -163,7 +163,7 @@ describe("Responses API tool result images", () => {
|
||||
});
|
||||
|
||||
describe("GitHub Copilot Responses Provider (gpt-5-mini)", () => {
|
||||
const model = getModel("github-copilot", "gpt-5-mini");
|
||||
const model = getModel("github-copilot", "gpt-5.4-nano");
|
||||
|
||||
it.skipIf(!githubCopilotToken)(
|
||||
"should send tool result images in function_call_output",
|
||||
|
||||
@@ -757,7 +757,7 @@ describe("Generate E2E Tests", () => {
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.TOGETHER_API_KEY)("Together AI Provider (Kimi-K2.6 via OpenAI Completions)", () => {
|
||||
const llm = getModel("together", "moonshotai/Kimi-K2.6");
|
||||
const llm = getModel("together", "moonshotai/Kimi-K3");
|
||||
|
||||
it("should complete basic text generation", { retry: 3 }, async () => {
|
||||
await basicTextGeneration(llm);
|
||||
@@ -809,29 +809,32 @@ describe("Generate E2E Tests", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.NVIDIA_API_KEY)("NVIDIA NIM Provider (Nemotron 3 Super via OpenAI Completions)", () => {
|
||||
const llm = getModel("nvidia", "nvidia/nemotron-3-super-120b-a12b");
|
||||
describe.skipIf(!process.env.NVIDIA_API_KEY)(
|
||||
"NVIDIA NIM Provider (Nemotron 3.5 Super VL via OpenAI Completions)",
|
||||
() => {
|
||||
const llm = getModel("nvidia", "nvidia/nemotron-3.5-super-vl-120b-a12b");
|
||||
|
||||
it("should complete basic text generation", { retry: 3 }, async () => {
|
||||
await basicTextGeneration(llm);
|
||||
});
|
||||
it("should complete basic text generation", { retry: 3 }, async () => {
|
||||
await basicTextGeneration(llm);
|
||||
});
|
||||
|
||||
it("should handle tool calling", { retry: 3 }, async () => {
|
||||
await handleToolCall(llm);
|
||||
});
|
||||
it("should handle tool calling", { retry: 3 }, async () => {
|
||||
await handleToolCall(llm);
|
||||
});
|
||||
|
||||
it("should handle streaming", { retry: 3 }, async () => {
|
||||
await handleStreaming(llm);
|
||||
});
|
||||
it("should handle streaming", { retry: 3 }, async () => {
|
||||
await handleStreaming(llm);
|
||||
});
|
||||
|
||||
it("should handle thinking mode", { retry: 3 }, async () => {
|
||||
await handleThinking(llm, { reasoningEffort: "high" });
|
||||
});
|
||||
it("should handle thinking mode", { retry: 3 }, async () => {
|
||||
await handleThinking(llm, { reasoningEffort: "high" });
|
||||
});
|
||||
|
||||
it("should handle multi-turn with thinking and tools", { retry: 3 }, async () => {
|
||||
await multiTurn(llm, { reasoningEffort: "high" });
|
||||
});
|
||||
});
|
||||
it("should handle multi-turn with thinking and tools", { retry: 3 }, async () => {
|
||||
await multiTurn(llm, { reasoningEffort: "high" });
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
describe.skipIf(!process.env.OPENROUTER_API_KEY)("OpenRouter Provider (glm-4.5v via OpenAI Completions)", () => {
|
||||
const llm = getModel("openrouter", "z-ai/glm-4.5v");
|
||||
@@ -1094,7 +1097,7 @@ describe("Generate E2E Tests", () => {
|
||||
describe.skipIf(!process.env.XIAOMI_API_KEY)(
|
||||
"Xiaomi MiMo (API billing) Provider (Xiaomi MiMo-V2.5-Pro via Anthropic Messages)",
|
||||
() => {
|
||||
const llm = getModel("xiaomi", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi", "mimo-v2.6-pro");
|
||||
const thinkingOptions = {
|
||||
thinkingEnabled: true,
|
||||
reasoningEffort: "high",
|
||||
@@ -1125,7 +1128,7 @@ describe("Generate E2E Tests", () => {
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_CN_API_KEY)(
|
||||
"Xiaomi MiMo Token Plan Provider (Xiaomi MiMo-V2.5-Pro via Anthropic Messages, CN region)",
|
||||
() => {
|
||||
const llm = getModel("xiaomi-token-plan-cn", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi-token-plan-cn", "mimo-v2.6-pro");
|
||||
const thinkingOptions = {
|
||||
thinkingEnabled: true,
|
||||
reasoningEffort: "high",
|
||||
@@ -1156,7 +1159,7 @@ describe("Generate E2E Tests", () => {
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_AMS_API_KEY)(
|
||||
"Xiaomi MiMo Token Plan Provider (Xiaomi MiMo-V2.5-Pro via Anthropic Messages, AMS region)",
|
||||
() => {
|
||||
const llm = getModel("xiaomi-token-plan-ams", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi-token-plan-ams", "mimo-v2.6-pro");
|
||||
const thinkingOptions = {
|
||||
thinkingEnabled: true,
|
||||
reasoningEffort: "high",
|
||||
@@ -1187,7 +1190,7 @@ describe("Generate E2E Tests", () => {
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_SGP_API_KEY)(
|
||||
"Xiaomi MiMo Token Plan Provider (Xiaomi MiMo-V2.5-Pro via Anthropic Messages, SGP region)",
|
||||
() => {
|
||||
const llm = getModel("xiaomi-token-plan-sgp", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi-token-plan-sgp", "mimo-v2.6-pro");
|
||||
const thinkingOptions = {
|
||||
thinkingEnabled: true,
|
||||
reasoningEffort: "high",
|
||||
@@ -1411,12 +1414,12 @@ describe("Generate E2E Tests", () => {
|
||||
});
|
||||
|
||||
it.skipIf(!githubCopilotToken)("should handle thinking", { retry: 2 }, async () => {
|
||||
const thinkingModel = getModel("github-copilot", "gpt-5-mini");
|
||||
const thinkingModel = getModel("github-copilot", "gpt-5.4-nano");
|
||||
await handleThinking(thinkingModel, { apiKey: githubCopilotToken, reasoningEffort: "high" });
|
||||
});
|
||||
|
||||
it.skipIf(!githubCopilotToken)("should handle multi-turn with thinking and tools", { retry: 3 }, async () => {
|
||||
const thinkingModel = getModel("github-copilot", "gpt-5-mini");
|
||||
const thinkingModel = getModel("github-copilot", "gpt-5.4-nano");
|
||||
await multiTurn(thinkingModel, { apiKey: githubCopilotToken, reasoningEffort: "high" });
|
||||
});
|
||||
|
||||
|
||||
@@ -88,10 +88,10 @@ describe("getSupportedThinkingLevels", () => {
|
||||
expect(getSupportedThinkingLevels(model!)).toEqual(["off", "low", "high", "max"]);
|
||||
});
|
||||
|
||||
it("includes low/high/max plus off for DeepSeek V4 Flash on opencode-go", () => {
|
||||
const model = getModel("opencode-go", "deepseek-v4-flash");
|
||||
it("includes off/high/max for DeepSeek V4 Pro on opencode-go", () => {
|
||||
const model = getModel("opencode-go", "deepseek-v4-pro");
|
||||
expect(model).toBeDefined();
|
||||
expect(getSupportedThinkingLevels(model!)).toEqual(["off", "low", "high", "max"]);
|
||||
expect(getSupportedThinkingLevels(model!)).toEqual(["off", "high", "max"]);
|
||||
});
|
||||
|
||||
it("preserves low/high/max metadata for DeepSeek V4.1 Flash on OpenRouter", () => {
|
||||
@@ -106,10 +106,10 @@ describe("getSupportedThinkingLevels", () => {
|
||||
expect(getSupportedThinkingLevels(model!)).toEqual(["low", "high", "max"]);
|
||||
});
|
||||
|
||||
it("includes only high plus off for OpenCode Go Kimi K2.6", () => {
|
||||
const model = getModel("opencode-go", "kimi-k2.6");
|
||||
it("includes only max for OpenCode Go Kimi K3", () => {
|
||||
const model = getModel("opencode-go", "kimi-k3");
|
||||
expect(model).toBeDefined();
|
||||
expect(getSupportedThinkingLevels(model!)).toEqual(["off", "high"]);
|
||||
expect(getSupportedThinkingLevels(model!)).toEqual(["max"]);
|
||||
});
|
||||
|
||||
it("excludes thinking off for Moonshot Kimi K2.7 Code models", () => {
|
||||
@@ -127,10 +127,10 @@ describe("getSupportedThinkingLevels", () => {
|
||||
expect(getSupportedThinkingLevels(model!)).toEqual(["low", "high", "max"]);
|
||||
});
|
||||
|
||||
it("includes only low, high, max for Kimi Coding K3", () => {
|
||||
it("includes off/low/high/max for Kimi Coding K3", () => {
|
||||
const model = getModel("kimi-coding", "k3");
|
||||
expect(model).toBeDefined();
|
||||
expect(getSupportedThinkingLevels(model!)).toEqual(["low", "high", "max"]);
|
||||
expect(getSupportedThinkingLevels(model!)).toEqual(["off", "low", "high", "max"]);
|
||||
});
|
||||
|
||||
it("includes only high for OpenCode Grok Build", () => {
|
||||
|
||||
@@ -13,8 +13,8 @@ afterEach(() => {
|
||||
});
|
||||
|
||||
describe("Together models", () => {
|
||||
it("registers the default Kimi K2.6 model via OpenAI-compatible Chat Completions API", () => {
|
||||
const model = getModel("together", "moonshotai/Kimi-K2.6");
|
||||
it("registers the default Kimi K3 model via OpenAI-compatible Chat Completions API", () => {
|
||||
const model = getModel("together", "moonshotai/Kimi-K3");
|
||||
|
||||
expect(model).toBeDefined();
|
||||
expect(model.api).toBe("openai-completions");
|
||||
@@ -23,12 +23,12 @@ describe("Together models", () => {
|
||||
expect(model.reasoning).toBe(true);
|
||||
expect(model.thinkingLevelMap).toEqual({ minimal: null, low: null, medium: null });
|
||||
expect(model.input).toEqual(["text", "image"]);
|
||||
expect(model.contextWindow).toBe(262144);
|
||||
expect(model.maxTokens).toBe(131000);
|
||||
expect(model.contextWindow).toBe(1048576);
|
||||
expect(model.maxTokens).toBe(131072);
|
||||
expect(model.cost).toEqual({
|
||||
input: 1.2,
|
||||
output: 4.5,
|
||||
cacheRead: 0.2,
|
||||
input: 3,
|
||||
output: 15,
|
||||
cacheRead: 0.3,
|
||||
cacheWrite: 0,
|
||||
});
|
||||
expect(model.compat).toEqual({
|
||||
@@ -58,22 +58,18 @@ describe("Together models", () => {
|
||||
thinkingFormat: "openai",
|
||||
});
|
||||
|
||||
const deepSeekV4 = getModel("together", "deepseek-ai/DeepSeek-V4-Pro");
|
||||
const deepSeekV4 = getModel("together", "deepseek-ai/DeepSeek-V4-Pro-0813");
|
||||
expect(deepSeekV4.thinkingLevelMap).toEqual({
|
||||
minimal: null,
|
||||
low: null,
|
||||
medium: null,
|
||||
high: "high",
|
||||
xhigh: null,
|
||||
});
|
||||
expect(deepSeekV4.compat).toMatchObject({
|
||||
supportsReasoningEffort: true,
|
||||
thinkingFormat: "together",
|
||||
});
|
||||
expect(deepSeekV4.compat?.supportsReasoningEffort).toBe(false);
|
||||
expect(deepSeekV4.compat?.thinkingFormat).toBe("together");
|
||||
|
||||
const minimax = getModel("together", "MiniMaxAI/MiniMax-M2.7");
|
||||
expect(minimax.thinkingLevelMap).toEqual({ off: null, minimal: null, low: null, medium: null });
|
||||
expect(minimax.compat?.thinkingFormat).toBeUndefined();
|
||||
const minimax = getModel("together", "MiniMaxAI/MiniMax-M3");
|
||||
expect(minimax.thinkingLevelMap).toEqual({ minimal: null, low: null, medium: null });
|
||||
expect(minimax.compat?.thinkingFormat).toBe("together");
|
||||
expect(minimax.compat?.supportsReasoningEffort).toBe(false);
|
||||
});
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ describe("Token Statistics on Abort", () => {
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.TOGETHER_API_KEY)("Together AI Provider", () => {
|
||||
const llm = getModel("together", "moonshotai/Kimi-K2.6");
|
||||
const llm = getModel("together", "moonshotai/Kimi-K3");
|
||||
|
||||
it("should include token stats when aborted mid-stream", { retry: 3, timeout: 30000 }, async () => {
|
||||
await testTokensOnAbort(llm);
|
||||
@@ -250,7 +250,7 @@ describe("Token Statistics on Abort", () => {
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_API_KEY)("Xiaomi MiMo (API billing) Provider", () => {
|
||||
const llm = getModel("xiaomi", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi", "mimo-v2.6-pro");
|
||||
|
||||
// FIXME(xiaomi): Xiaomi's Anthropic-compatible stream does not populate
|
||||
// usage in the message_start event the way Anthropic does — usage only
|
||||
@@ -263,7 +263,7 @@ describe("Token Statistics on Abort", () => {
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_CN_API_KEY)("Xiaomi MiMo Token Plan (CN) Provider", () => {
|
||||
const llm = getModel("xiaomi-token-plan-cn", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi-token-plan-cn", "mimo-v2.6-pro");
|
||||
|
||||
// FIXME(xiaomi): see the API-billing block above — same upstream streaming
|
||||
// usage limitation applies to Token Plan endpoints.
|
||||
@@ -273,7 +273,7 @@ describe("Token Statistics on Abort", () => {
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_AMS_API_KEY)("Xiaomi MiMo Token Plan (AMS) Provider", () => {
|
||||
const llm = getModel("xiaomi-token-plan-ams", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi-token-plan-ams", "mimo-v2.6-pro");
|
||||
|
||||
// FIXME(xiaomi): see the API-billing block above — same upstream streaming
|
||||
// usage limitation applies to Token Plan endpoints.
|
||||
@@ -283,7 +283,7 @@ describe("Token Statistics on Abort", () => {
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_SGP_API_KEY)("Xiaomi MiMo Token Plan (SGP) Provider", () => {
|
||||
const llm = getModel("xiaomi-token-plan-sgp", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi-token-plan-sgp", "mimo-v2.6-pro");
|
||||
|
||||
// FIXME(xiaomi): see the API-billing block above — same upstream streaming
|
||||
// usage limitation applies to Token Plan endpoints.
|
||||
|
||||
@@ -45,7 +45,7 @@ describe("Tool Call ID Normalization - Live Handoff", () => {
|
||||
it.skipIf(!copilotToken || !openrouterKey)(
|
||||
"github-copilot -> openrouter should normalize pipe-separated IDs",
|
||||
async () => {
|
||||
const copilotModel = getModel("github-copilot", "gpt-5.5");
|
||||
const copilotModel = getModel("github-copilot", "gpt-5.6-sol");
|
||||
const openrouterModel = getModel("openrouter", "openai/gpt-5.5");
|
||||
|
||||
// Step 1: Generate tool call with github-copilot
|
||||
@@ -115,7 +115,7 @@ describe("Tool Call ID Normalization - Live Handoff", () => {
|
||||
it.skipIf(!copilotToken || !codexToken)(
|
||||
"github-copilot -> openai-codex should normalize pipe-separated IDs",
|
||||
async () => {
|
||||
const copilotModel = getModel("github-copilot", "gpt-5.5");
|
||||
const copilotModel = getModel("github-copilot", "gpt-5.6-sol");
|
||||
const codexModel = getModel("openai-codex", "gpt-5.5");
|
||||
|
||||
// Step 1: Generate tool call with github-copilot
|
||||
|
||||
@@ -191,7 +191,7 @@ describe("Tool Call Without Result Tests", () => {
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.TOGETHER_API_KEY)("Together AI Provider", () => {
|
||||
const model = getModel("together", "moonshotai/Kimi-K2.6");
|
||||
const model = getModel("together", "moonshotai/Kimi-K3");
|
||||
|
||||
it("should filter out tool calls without corresponding tool results", { retry: 3, timeout: 30000 }, async () => {
|
||||
await testToolCallWithoutResult(model, { reasoningEffort: "high" });
|
||||
@@ -231,7 +231,7 @@ describe("Tool Call Without Result Tests", () => {
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_API_KEY)("Xiaomi MiMo (API billing) Provider", () => {
|
||||
const model = getModel("xiaomi", "mimo-v2.5-pro");
|
||||
const model = getModel("xiaomi", "mimo-v2.6-pro");
|
||||
|
||||
it("should filter out tool calls without corresponding tool results", { retry: 3, timeout: 30000 }, async () => {
|
||||
await testToolCallWithoutResult(model);
|
||||
@@ -239,7 +239,7 @@ describe("Tool Call Without Result Tests", () => {
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_CN_API_KEY)("Xiaomi MiMo Token Plan (CN) Provider", () => {
|
||||
const model = getModel("xiaomi-token-plan-cn", "mimo-v2.5-pro");
|
||||
const model = getModel("xiaomi-token-plan-cn", "mimo-v2.6-pro");
|
||||
|
||||
it("should filter out tool calls without corresponding tool results", { retry: 3, timeout: 30000 }, async () => {
|
||||
await testToolCallWithoutResult(model);
|
||||
@@ -247,7 +247,7 @@ describe("Tool Call Without Result Tests", () => {
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_AMS_API_KEY)("Xiaomi MiMo Token Plan (AMS) Provider", () => {
|
||||
const model = getModel("xiaomi-token-plan-ams", "mimo-v2.5-pro");
|
||||
const model = getModel("xiaomi-token-plan-ams", "mimo-v2.6-pro");
|
||||
|
||||
it("should filter out tool calls without corresponding tool results", { retry: 3, timeout: 30000 }, async () => {
|
||||
await testToolCallWithoutResult(model);
|
||||
@@ -255,7 +255,7 @@ describe("Tool Call Without Result Tests", () => {
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_SGP_API_KEY)("Xiaomi MiMo Token Plan (SGP) Provider", () => {
|
||||
const model = getModel("xiaomi-token-plan-sgp", "mimo-v2.5-pro");
|
||||
const model = getModel("xiaomi-token-plan-sgp", "mimo-v2.6-pro");
|
||||
|
||||
it("should filter out tool calls without corresponding tool results", { retry: 3, timeout: 30000 }, async () => {
|
||||
await testToolCallWithoutResult(model);
|
||||
|
||||
@@ -378,8 +378,8 @@ describe("totalTokens field", () => {
|
||||
// =========================================================================
|
||||
|
||||
describe.skipIf(!process.env.TOGETHER_API_KEY)("Together AI", () => {
|
||||
it("Kimi-K2.6 - should return totalTokens equal to sum of components", { retry: 3, timeout: 60000 }, async () => {
|
||||
const llm = getModel("together", "moonshotai/Kimi-K2.6");
|
||||
it("Kimi-K3 - should return totalTokens equal to sum of components", { retry: 3, timeout: 60000 }, async () => {
|
||||
const llm = getModel("together", "moonshotai/Kimi-K3");
|
||||
|
||||
console.log(`\nTogether AI / ${llm.id}:`);
|
||||
const { first, second } = await testTotalTokensWithCache(llm, {
|
||||
@@ -488,10 +488,10 @@ describe("totalTokens field", () => {
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_API_KEY)("Xiaomi MiMo (API billing)", () => {
|
||||
it(
|
||||
"mimo-v2.5-pro - should return totalTokens equal to sum of components",
|
||||
"mimo-v2.6-pro - should return totalTokens equal to sum of components",
|
||||
{ retry: 3, timeout: 60000 },
|
||||
async () => {
|
||||
const llm = getModel("xiaomi", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi", "mimo-v2.6-pro");
|
||||
|
||||
console.log(`\nXiaomi MiMo / ${llm.id}:`);
|
||||
const { first, second } = await testTotalTokensWithCache(llm, { apiKey: process.env.XIAOMI_API_KEY });
|
||||
@@ -511,10 +511,10 @@ describe("totalTokens field", () => {
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_CN_API_KEY)("Xiaomi MiMo Token Plan (CN)", () => {
|
||||
it(
|
||||
"mimo-v2.5-pro - should return totalTokens equal to sum of components",
|
||||
"mimo-v2.6-pro - should return totalTokens equal to sum of components",
|
||||
{ retry: 3, timeout: 60000 },
|
||||
async () => {
|
||||
const llm = getModel("xiaomi-token-plan-cn", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi-token-plan-cn", "mimo-v2.6-pro");
|
||||
|
||||
console.log(`\nXiaomi MiMo Token Plan CN / ${llm.id}:`);
|
||||
const { first, second } = await testTotalTokensWithCache(llm, {
|
||||
@@ -536,10 +536,10 @@ describe("totalTokens field", () => {
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_AMS_API_KEY)("Xiaomi MiMo Token Plan (AMS)", () => {
|
||||
it(
|
||||
"mimo-v2.5-pro - should return totalTokens equal to sum of components",
|
||||
"mimo-v2.6-pro - should return totalTokens equal to sum of components",
|
||||
{ retry: 3, timeout: 60000 },
|
||||
async () => {
|
||||
const llm = getModel("xiaomi-token-plan-ams", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi-token-plan-ams", "mimo-v2.6-pro");
|
||||
|
||||
console.log(`\nXiaomi MiMo Token Plan AMS / ${llm.id}:`);
|
||||
const { first, second } = await testTotalTokensWithCache(llm, {
|
||||
@@ -561,10 +561,10 @@ describe("totalTokens field", () => {
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_SGP_API_KEY)("Xiaomi MiMo Token Plan (SGP)", () => {
|
||||
it(
|
||||
"mimo-v2.5-pro - should return totalTokens equal to sum of components",
|
||||
"mimo-v2.6-pro - should return totalTokens equal to sum of components",
|
||||
{ retry: 3, timeout: 60000 },
|
||||
async () => {
|
||||
const llm = getModel("xiaomi-token-plan-sgp", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi-token-plan-sgp", "mimo-v2.6-pro");
|
||||
|
||||
console.log(`\nXiaomi MiMo Token Plan SGP / ${llm.id}:`);
|
||||
const { first, second } = await testTotalTokensWithCache(llm, {
|
||||
@@ -707,10 +707,10 @@ describe("totalTokens field", () => {
|
||||
|
||||
describe.skipIf(!process.env.OPENROUTER_API_KEY)("OpenRouter", () => {
|
||||
it(
|
||||
"anthropic/claude-sonnet-4 - should return totalTokens equal to sum of components",
|
||||
"anthropic/claude-sonnet-4.6 - should return totalTokens equal to sum of components",
|
||||
{ retry: 3, timeout: 60000 },
|
||||
async () => {
|
||||
const llm = getModel("openrouter", "anthropic/claude-sonnet-4");
|
||||
const llm = getModel("openrouter", "anthropic/claude-sonnet-4.6");
|
||||
|
||||
console.log(`\nOpenRouter / ${llm.id}:`);
|
||||
const { first, second } = await testTotalTokensWithCache(llm, { apiKey: process.env.OPENROUTER_API_KEY });
|
||||
|
||||
@@ -546,7 +546,7 @@ describe("AI Providers Unicode Surrogate Pair Tests", () => {
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.TOGETHER_API_KEY)("Together AI Provider Unicode Handling", () => {
|
||||
const llm = getModel("together", "moonshotai/Kimi-K2.6");
|
||||
const llm = getModel("together", "moonshotai/Kimi-K3");
|
||||
const options = { reasoningEffort: "high" } satisfies StreamOptionsWithExtras;
|
||||
|
||||
it("should handle emoji in tool results", { retry: 3, timeout: 30000 }, async () => {
|
||||
@@ -628,7 +628,7 @@ describe("AI Providers Unicode Surrogate Pair Tests", () => {
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.XIAOMI_API_KEY)("Xiaomi MiMo (API billing) Provider Unicode Handling", () => {
|
||||
const llm = getModel("xiaomi", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi", "mimo-v2.6-pro");
|
||||
|
||||
it("should handle emoji in tool results", { retry: 3, timeout: 30000 }, async () => {
|
||||
await testEmojiInToolResults(llm);
|
||||
@@ -646,7 +646,7 @@ describe("AI Providers Unicode Surrogate Pair Tests", () => {
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_CN_API_KEY)(
|
||||
"Xiaomi MiMo Token Plan (CN) Provider Unicode Handling",
|
||||
() => {
|
||||
const llm = getModel("xiaomi-token-plan-cn", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi-token-plan-cn", "mimo-v2.6-pro");
|
||||
|
||||
it("should handle emoji in tool results", { retry: 3, timeout: 30000 }, async () => {
|
||||
await testEmojiInToolResults(llm);
|
||||
@@ -669,7 +669,7 @@ describe("AI Providers Unicode Surrogate Pair Tests", () => {
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_AMS_API_KEY)(
|
||||
"Xiaomi MiMo Token Plan (AMS) Provider Unicode Handling",
|
||||
() => {
|
||||
const llm = getModel("xiaomi-token-plan-ams", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi-token-plan-ams", "mimo-v2.6-pro");
|
||||
|
||||
it("should handle emoji in tool results", { retry: 3, timeout: 30000 }, async () => {
|
||||
await testEmojiInToolResults(llm);
|
||||
@@ -692,7 +692,7 @@ describe("AI Providers Unicode Surrogate Pair Tests", () => {
|
||||
describe.skipIf(!process.env.XIAOMI_TOKEN_PLAN_SGP_API_KEY)(
|
||||
"Xiaomi MiMo Token Plan (SGP) Provider Unicode Handling",
|
||||
() => {
|
||||
const llm = getModel("xiaomi-token-plan-sgp", "mimo-v2.5-pro");
|
||||
const llm = getModel("xiaomi-token-plan-sgp", "mimo-v2.6-pro");
|
||||
|
||||
it("should handle emoji in tool results", { retry: 3, timeout: 30000 }, async () => {
|
||||
await testEmojiInToolResults(llm);
|
||||
|
||||
@@ -3,7 +3,7 @@ import { getModels } from "../src/compat.ts";
|
||||
|
||||
const XIAOMI_PROVIDERS = ["xiaomi", "xiaomi-token-plan-cn", "xiaomi-token-plan-ams", "xiaomi-token-plan-sgp"] as const;
|
||||
const DEPRECATED_MODEL_IDS = ["mimo-v2-flash", "mimo-v2-omni", "mimo-v2-pro"] as const;
|
||||
const REPLACEMENT_MODEL_IDS = ["mimo-v2.5", "mimo-v2.5-pro"] as const;
|
||||
const REPLACEMENT_MODEL_IDS = ["mimo-v2.6-flash", "mimo-v2.6-pro"] as const;
|
||||
|
||||
describe("Xiaomi MiMo models", () => {
|
||||
it.each(XIAOMI_PROVIDERS)("omits deprecated models from %s", (provider) => {
|
||||
|
||||
Reference in new issue
Block a user