Repository navigation
fix(openai): honor provider thinking profiles - #84902
NianJiuZst wants to merge 2 commits into
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close: the branch is no longer a good landing candidate because current main already has the canonical provider-profile override contract, and the linked OpenAI/Codex bug was later verified as an incomplete user-config metadata issue rather than stale bundled catalog metadata. Canonical path: Keep current main's So I’m closing this here because the remaining work is already tracked in the canonical issue. Review detailsBest possible solution: Keep current main's Do we have a high-confidence way to reproduce the issue? No for this PR's claimed bundled OpenAI stale-catalog root cause: current bundled OpenAI GPT-5 rows are Is this the best way to solve the issue? No. The branch was a plausible early mitigation, but current main already has the generic opt-in under a different name and later verification showed the OpenAI-specific override is the wrong layer. Security review: Security review cleared: No dependency, workflow, install, credential, permission, or supply-chain changes were found in the PR diff. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against cae64ee360a8. |
|
ClawSweeper PR egg 🥚 Incubating: this PR egg is tucked into the review nest. Hatch commandComment Hatchability rules:
What is this egg doing here?
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Thanks @NianJiuZst for carrying this provider thinking-profile work forward. I am closing #84902 because the covered path is already on main through the merged maintainer fix in #74273. Clownfish is keeping the landed fix as the canonical validation path here: #74273 preserves the configured xhigh/thinking compat behavior on main, and the later review on this PR found the remaining OpenAI/Codex reports should be handled through config-merge-specific follow-up rather than this stale parallel flag. Your investigation and source PR remain part of the record and attribution for this cleanup. If a different reproduction still fails on current main, please reply with that path and we can reopen or split it back out. |
Summary
Fixes #84880.
OpenAI/Codex GPT-5 thinking validation was still able to collapse to off-only when the model catalog contained a stale
reasoning: falserow. That madesessions_spawn(...thinking: "high")reject supported models such asopenai/gpt-5.4andopenai-codex/gpt-5.5, even though the OpenAI provider policy advertises non-off reasoning levels.This patch makes provider thinking profiles explicitly authoritative only when the provider opts in via
overridesCatalogReasoning. The shared resolver consults that provider profile before honoring catalogreasoning: false, while preserving off-only catalog behavior for non-authoritative providers and non-reasoning OpenAI rows such asgpt-5-chat-latest/gpt-5.3-chat-latest.Follow-up review feedback is addressed by including the base
gpt-5.3family in the authoritative OpenAI reasoning classifier while keeping explicit non-reasoning chat-latest rows off-only.It also updates the public provider thinking profile type, SDK docs, and API baseline so plugin authors have the contract documented.
Verification
git diff --checknode scripts/run-vitest.mjs src/auto-reply/thinking.test.ts extensions/openai/openai-provider.test.ts --reporter=dotnode scripts/run-vitest.mjs src/auto-reply/thinking.test.ts src/agents/openclaw-tools.subagents.sessions-spawn.model.test.ts src/gateway/sessions-patch.test.ts src/auto-reply/reply/directive-handling.model.test.ts --reporter=dotPNPM_CONFIG_PM_ON_FAIL=ignore PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false pnpm plugin-sdk:api:checkReal behavior proof
Behavior addressed:
sessions_spawn//thinkshared thinking validation no longer lets stale OpenAI/Codex catalogreasoning: falsemetadata force supported GPT-5 reasoning models tooffonly.Real environment tested: local Codex worktree on macOS using the repo Vitest wrapper, SDK API baseline check, and a local registry-backed runtime policy probe that registers the bundled OpenAI plugin and calls the shared thinking resolver with stale catalog metadata.
Exact steps or command run after this patch:
node scripts/run-vitest.mjs src/auto-reply/thinking.test.ts src/agents/openclaw-tools.subagents.sessions-spawn.model.test.ts src/gateway/sessions-patch.test.ts src/auto-reply/reply/directive-handling.model.test.ts --reporter=dot, plus the local registry-backed OpenAI thinking policy probe shown above.Evidence after fix: regression coverage now proves
openai/gpt-5.3andopenai/gpt-5.4accepthigh,openai-codex/gpt-5.5acceptshigh/xhigh, and non-reasoning OpenAI chat-latest rows stay off-only under stale catalog metadata.Observed result after fix: the acceptance suite passed with 6 files and 231 tests, the focused OpenAI/thinking suite passed with 2 files and 61 tests, the SDK API baseline check passed, and the runtime policy probe printed supported non-off levels for
openai/gpt-5.3,openai/gpt-5.4, andopenai-codex/gpt-5.5while rejectingopenai/gpt-5.3-chat-latestas off-only.What was not tested: no live OpenAI/Codex OAuth subagent run was executed. A broad Testbox/Crabbox changed gate was attempted earlier but blocked because the local Crabbox binary failed basic availability/sanity checks.