mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-21 10:16:44 +00:00
* fix(opencode): add Zen GPT-5.6 models * test(opencode): narrow GPT-5.6 policy fixture * fix(opencode): align GPT-5.6 thinking levels Co-authored-by: 杨浩宇0668001029 <yang.haoyu@xydigit.com> --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
65 lines
1.5 KiB
TypeScript
65 lines
1.5 KiB
TypeScript
// Opencode tests cover provider policy api plugin behavior.
|
|
import { describe, expect, it } from "vitest";
|
|
import { resolveThinkingProfile } from "./provider-policy-api.js";
|
|
|
|
describe("opencode provider policy public artifact", () => {
|
|
it("exposes Claude Opus 4.7 thinking levels without loading the full provider plugin", () => {
|
|
expect(
|
|
resolveThinkingProfile({
|
|
provider: "opencode",
|
|
modelId: "claude-opus-4-7",
|
|
}),
|
|
).toEqual({
|
|
levels: [
|
|
{ id: "off" },
|
|
{ id: "minimal" },
|
|
{ id: "low" },
|
|
{ id: "medium" },
|
|
{ id: "high" },
|
|
{ id: "xhigh" },
|
|
{ id: "adaptive" },
|
|
{ id: "max" },
|
|
],
|
|
defaultLevel: "off",
|
|
});
|
|
});
|
|
|
|
it("keeps adaptive-only Claude profiles aligned with Anthropic", () => {
|
|
const profile = resolveThinkingProfile({
|
|
provider: "opencode",
|
|
modelId: "claude-opus-4-6",
|
|
});
|
|
|
|
expect(profile).toEqual({
|
|
levels: [
|
|
{ id: "off" },
|
|
{ id: "minimal" },
|
|
{ id: "low" },
|
|
{ id: "medium" },
|
|
{ id: "high" },
|
|
{ id: "adaptive" },
|
|
],
|
|
defaultLevel: "adaptive",
|
|
});
|
|
});
|
|
|
|
it("exposes the full GPT-5.6 reasoning profile", () => {
|
|
expect(
|
|
resolveThinkingProfile({
|
|
provider: "opencode",
|
|
modelId: "gpt-5.6-luna",
|
|
}),
|
|
).toEqual({
|
|
levels: [
|
|
{ id: "off" },
|
|
{ id: "low" },
|
|
{ id: "medium" },
|
|
{ id: "high" },
|
|
{ id: "xhigh" },
|
|
{ id: "max" },
|
|
],
|
|
defaultLevel: "medium",
|
|
});
|
|
});
|
|
});
|