mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-21 10:16:44 +00:00
The live codex text provider was a redundant projection of the openai catalog (exclusive provider ownership; the openai plugin's ChatGPT OAuth discovery already serves gpt-5.6-* route-aware). Folding it: - extensions/codex no longer registers a text provider, catalog entry, or synthetic text auth; provider.ts/provider-catalog.ts/provider-discovery.ts and the route-blind model-name heuristics are deleted; the narrow post-harness reasoning fallback moves to an app-server-owned module - openai thinking policy keys on explicit selected-route provenance (api === openai-chatgpt-responses) instead of value-shape inference - models.list gains an optional additive agentRuntime field (configured intent); session agentHarnessId remains the execution proof - doctor --fix migrates the shipped codex/* config shape end to end: every model slot, provider-config merge with blocker-aware conflict handling, sessions, cron payloads (two-phase: runtime policy persists before cron refs rewrite), transcripts; migrated refs carry model-scoped agentRuntime.id=codex preserving the shipped wizard semantics; auto runtime policies normalize to codex with sibling fields preserved; blocked provider conflicts retain the whole legacy namespace fail-closed with an actionable warning - the stale openai:default profile cleanup (#91352) was deliberately deferred to a follow-up after review showed it needs per-agent identity proofs; doctor keeps warning about unusable profiles Fixes #105561 Fixes #84637 Fixes #90420
35 lines
960 B
TypeScript
35 lines
960 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("uses ChatGPT model/list metadata as authoritative", () => {
|
|
expect(
|
|
levelIds({
|
|
api: "openai-chatgpt-responses",
|
|
efforts: ["low", "medium", "high", "xhigh", "max"],
|
|
}),
|
|
).not.toContain("ultra");
|
|
});
|
|
});
|