


























@@ -15,6 +15,24 @@ function collectLegacyExtendedLevelIds(levels: readonly { id: string }[] | undef
1515return ids;
1616}
171718+const OPENAI_XHIGH_LEVELS = [
19+{ id: "off" },
20+{ id: "minimal" },
21+{ id: "low" },
22+{ id: "medium" },
23+{ id: "high" },
24+{ id: "xhigh" },
25+];
26+27+const CLAUDE_ADAPTIVE_LEVELS = [
28+{ id: "off" },
29+{ id: "minimal" },
30+{ id: "low" },
31+{ id: "medium" },
32+{ id: "high" },
33+{ id: "adaptive" },
34+];
35+1836describe("vercel ai gateway thinking profile", () => {
1937async function getProvider() {
2038const { providers } = await registerProviderPlugin({
@@ -33,7 +51,7 @@ describe("vercel ai gateway thinking profile", () => {
3351modelId: "openai/gpt-5.4",
3452});
355336-expect(profile?.levels).toEqual(expect.arrayContaining([{ id: "xhigh" }]));
54+expect(profile).toStrictEqual({ levels: OPENAI_XHIGH_LEVELS });
3755});
38563957it("exposes Codex xhigh through the OpenAI upstream prefix", async () => {
@@ -44,7 +62,7 @@ describe("vercel ai gateway thinking profile", () => {
4462modelId: "openai/gpt-5.3-codex-spark",
4563});
466447-expect(profile?.levels).toEqual(expect.arrayContaining([{ id: "xhigh" }]));
65+expect(profile).toStrictEqual({ levels: OPENAI_XHIGH_LEVELS });
4866});
49675068it("reuses Claude thinking defaults for trusted Anthropic upstream refs", async () => {
@@ -55,8 +73,8 @@ describe("vercel ai gateway thinking profile", () => {
5573modelId: "anthropic/claude-opus-4.6",
5674});
577558-expect(profile).toMatchObject({
59-levels: expect.arrayContaining([{ id: "adaptive" }]),
76+expect(profile).toStrictEqual({
77+levels: CLAUDE_ADAPTIVE_LEVELS,
6078defaultLevel: "adaptive",
6179});
6280expect(collectLegacyExtendedLevelIds(profile?.levels)).toStrictEqual([]);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。