mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-15 07:04:01 -06:00
46bdbe585f
Co-authored-by: Amp <amp@ampcode.com>
35 lines
998 B
TypeScript
35 lines
998 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { resolveUnifiedOpenAIThinkingProfile } from "./thinking-policy.js";
|
|
|
|
function levelIds(params: {
|
|
api: "openai-responses" | "openai-chatgpt-responses";
|
|
efforts: string[];
|
|
}) {
|
|
return resolveUnifiedOpenAIThinkingProfile(
|
|
"gpt-5.6-sol",
|
|
"codex",
|
|
{ supportedReasoningEfforts: params.efforts },
|
|
params.api,
|
|
).levels.map((level) => level.id);
|
|
}
|
|
|
|
describe("OpenAI thinking route provenance", () => {
|
|
it("keeps native fallback capabilities for a direct OpenAI route", () => {
|
|
expect(
|
|
levelIds({
|
|
api: "openai-responses",
|
|
efforts: ["low", "medium", "high", "xhigh", "max"],
|
|
}),
|
|
).toContain("ultra");
|
|
});
|
|
|
|
it("retains known native capabilities when ChatGPT metadata is incomplete", () => {
|
|
expect(
|
|
levelIds({
|
|
api: "openai-chatgpt-responses",
|
|
efforts: ["low", "high"],
|
|
}),
|
|
).toEqual(["off", "low", "medium", "high", "xhigh", "max", "ultra"]);
|
|
});
|
|
});
|