mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 09:10:45 +00:00
test(opencode-go): lock pi catalog coverage
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { getModels } from "@mariozechner/pi-ai";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { registerSingleProviderPlugin } from "../../test/helpers/plugins/plugin-registration.js";
|
||||
import { expectPassthroughReplayPolicy } from "../../test/helpers/provider-replay-policy.ts";
|
||||
@@ -21,6 +22,55 @@ describe("opencode-go provider plugin", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("leaves OpenCode Go models to Pi's built-in registry", async () => {
|
||||
const provider = await registerSingleProviderPlugin(plugin);
|
||||
expect(provider.catalog).toBeUndefined();
|
||||
|
||||
const models = new Map(getModels("opencode-go").map((model) => [model.id, model]));
|
||||
expect([...models.keys()]).toEqual([
|
||||
"glm-5",
|
||||
"glm-5.1",
|
||||
"kimi-k2.5",
|
||||
"kimi-k2.6",
|
||||
"mimo-v2-omni",
|
||||
"mimo-v2-pro",
|
||||
"minimax-m2.5",
|
||||
"minimax-m2.7",
|
||||
"qwen3.5-plus",
|
||||
"qwen3.6-plus",
|
||||
]);
|
||||
|
||||
expect(models.get("kimi-k2.6")).toMatchObject({
|
||||
api: "openai-completions",
|
||||
baseUrl: "https://opencode.ai/zen/go/v1",
|
||||
input: ["text", "image"],
|
||||
reasoning: true,
|
||||
contextWindow: 262_144,
|
||||
maxTokens: 65_536,
|
||||
});
|
||||
expect(models.get("minimax-m2.7")).toMatchObject({
|
||||
api: "anthropic-messages",
|
||||
baseUrl: "https://opencode.ai/zen/go",
|
||||
reasoning: true,
|
||||
contextWindow: 204_800,
|
||||
maxTokens: 131_072,
|
||||
});
|
||||
expect(models.get("mimo-v2-pro")).toMatchObject({
|
||||
api: "openai-completions",
|
||||
baseUrl: "https://opencode.ai/zen/go/v1",
|
||||
input: ["text"],
|
||||
reasoning: true,
|
||||
contextWindow: 1_048_576,
|
||||
maxTokens: 64_000,
|
||||
});
|
||||
expect(models.get("mimo-v2-omni")).toMatchObject({
|
||||
input: ["text", "image"],
|
||||
reasoning: true,
|
||||
contextWindow: 262_144,
|
||||
maxTokens: 64_000,
|
||||
});
|
||||
});
|
||||
|
||||
it("canonicalizes stale OpenCode Go base URLs", async () => {
|
||||
const provider = await registerSingleProviderPlugin(plugin);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user