mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
fix(ai): update tests for current model catalogs
This commit is contained in:
parent
46c9de402b
commit
ea9e093516
3 changed files with 18 additions and 28 deletions
|
|
@ -563,7 +563,7 @@ describe("Context overflow error handling", () => {
|
|||
|
||||
// Mistral backend
|
||||
it("mistralai/mistral-large-2512 via OpenRouter - should detect overflow via isContextOverflow", async () => {
|
||||
const model = getModel("openrouter", "mistralai/mistral-large-2512");
|
||||
const model = getModel("openrouter", "mistralai/mistral-large");
|
||||
const result = await testContextOverflow(model, process.env.OPENROUTER_API_KEY!);
|
||||
logResult(result);
|
||||
|
||||
|
|
|
|||
|
|
@ -320,21 +320,21 @@ describe("openai-completions tool_choice", () => {
|
|||
});
|
||||
|
||||
it("stores z.ai effort metadata", () => {
|
||||
for (const provider of ["zai", "zai-coding-cn"] as const) {
|
||||
for (const modelId of ["glm-5.2", "glm-5.2-highspeed"] as const) {
|
||||
const model = getModel(provider, modelId)!;
|
||||
expect(model.compat?.supportsReasoningEffort).toBe(true);
|
||||
expect(model.thinkingLevelMap).toEqual({
|
||||
off: "none",
|
||||
minimal: null,
|
||||
low: null,
|
||||
medium: null,
|
||||
high: "high",
|
||||
xhigh: null,
|
||||
max: "max",
|
||||
});
|
||||
}
|
||||
for (const modelId of ["glm-5.2", "glm-5.2-highspeed"] as const) {
|
||||
const model = getModel("zai", modelId)!;
|
||||
expect(model.compat?.supportsReasoningEffort).toBe(true);
|
||||
expect(model.thinkingLevelMap).toEqual({
|
||||
off: "none",
|
||||
minimal: null,
|
||||
low: null,
|
||||
medium: null,
|
||||
high: "high",
|
||||
xhigh: null,
|
||||
max: "max",
|
||||
});
|
||||
}
|
||||
|
||||
for (const provider of ["zai", "zai-coding-cn"] as const) {
|
||||
const glm53 = getModel(provider, "glm-5.3")!;
|
||||
expect(glm53.compat?.supportsReasoningEffort).toBe(true);
|
||||
expect(glm53.thinkingLevelMap).toEqual({
|
||||
|
|
|
|||
|
|
@ -29,18 +29,6 @@ it("uses API-equivalent reference costs for Coding Plan models", () => {
|
|||
cacheRead: 0.26,
|
||||
cacheWrite: 0,
|
||||
});
|
||||
expect(getBuiltinModel("zai-coding-cn", "glm-5.1").cost).toEqual({
|
||||
input: 1.4,
|
||||
output: 4.4,
|
||||
cacheRead: 0.26,
|
||||
cacheWrite: 0,
|
||||
});
|
||||
expect(getBuiltinModel("zai-coding-cn", "glm-5v-turbo").cost).toEqual({
|
||||
input: 1.2,
|
||||
output: 4,
|
||||
cacheRead: 0.24,
|
||||
cacheWrite: 0,
|
||||
});
|
||||
for (const provider of ["zai", "zai-coding-cn"] as const) {
|
||||
expect(getBuiltinModel(provider, "glm-5.3").cost).toEqual({
|
||||
input: 1.4,
|
||||
|
|
@ -54,7 +42,9 @@ it("uses API-equivalent reference costs for Coding Plan models", () => {
|
|||
it("keeps zero costs for Coding Plan models without a matching API price", () => {
|
||||
const zeroCost = { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 };
|
||||
|
||||
expect(getBuiltinModel("zai", "glm-5.2-highspeed").cost).toEqual(zeroCost);
|
||||
|
||||
for (const provider of ["zai", "zai-coding-cn"] as const) {
|
||||
expect(getBuiltinModel(provider, "glm-5.2-highspeed").cost).toEqual(zeroCost);
|
||||
expect(getBuiltinModel(provider, "glm-5.3-highspeed").cost).toEqual(zeroCost);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue