mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-25 20:05:46 -06:00
test: remove duplicate Anthropic Vertex policy cases (#129180)
Amp-Thread-ID: https://ampcode.com/threads/T-01a037b5-3918-749f-90bd-5c9ac1dced16 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
committed by
GitHub
parent
251197b95d
commit
d647a9b6a7
@@ -3,26 +3,7 @@ import { describe, expect, it } from "vitest";
|
||||
import { resolveThinkingProfile } from "./provider-policy-api.js";
|
||||
|
||||
describe("anthropic-vertex provider-policy-api", () => {
|
||||
it("leaves Claude Opus 4.8 thinking off by default with max effort support", () => {
|
||||
const profile = resolveThinkingProfile({
|
||||
provider: "anthropic-vertex",
|
||||
modelId: "claude-opus-4-8",
|
||||
});
|
||||
|
||||
expect(profile?.defaultLevel).toBe("off");
|
||||
expect(profile?.levels.map((level) => level.id)).toContain("max");
|
||||
});
|
||||
|
||||
it("keeps Claude Opus 4.7 thinking off by default", () => {
|
||||
const profile = resolveThinkingProfile({
|
||||
provider: "anthropic-vertex",
|
||||
modelId: "claude-opus-4-7",
|
||||
});
|
||||
|
||||
expect(profile?.defaultLevel).toBe("off");
|
||||
});
|
||||
|
||||
it("exposes native max without xhigh for Claude Sonnet 4.6", () => {
|
||||
it("adds Vertex-native max without xhigh for Claude Sonnet 4.6", () => {
|
||||
const profile = resolveThinkingProfile({
|
||||
provider: "anthropic-vertex",
|
||||
modelId: "claude-sonnet-4-6",
|
||||
@@ -32,31 +13,6 @@ describe("anthropic-vertex provider-policy-api", () => {
|
||||
expect(profile?.levels.map((level) => level.id)).not.toContain("xhigh");
|
||||
});
|
||||
|
||||
it.each(["claude-fable-5", "claude-mythos-5"])(
|
||||
"inherits %s's provider-agnostic thinking contract",
|
||||
(modelId) => {
|
||||
const profile = resolveThinkingProfile({
|
||||
provider: "anthropic-vertex",
|
||||
modelId,
|
||||
});
|
||||
|
||||
expect(profile?.defaultLevel).toBe("high");
|
||||
expect(profile?.preserveWhenCatalogReasoningFalse).toBe(true);
|
||||
expect(profile?.levels.map((level) => level.id)).toContain("max");
|
||||
},
|
||||
);
|
||||
|
||||
it("resolves deployment aliases from canonical model metadata", () => {
|
||||
const profile = resolveThinkingProfile({
|
||||
provider: "anthropic-vertex",
|
||||
modelId: "production-claude",
|
||||
params: { canonicalModelId: "claude-fable-5" },
|
||||
});
|
||||
|
||||
expect(profile?.defaultLevel).toBe("high");
|
||||
expect(profile?.preserveWhenCatalogReasoningFalse).toBe(true);
|
||||
});
|
||||
|
||||
it("ignores other providers", () => {
|
||||
expect(resolveThinkingProfile({ provider: "anthropic", modelId: "claude-opus-4-8" })).toBe(
|
||||
null,
|
||||
|
||||
Reference in New Issue
Block a user