Repository navigation
feat(thinking): allow custom model compat to opt into xhigh - #45112
Milchstrassse wants to merge 16 commits into
Conversation
…gh-thinking-support
Greptile SummaryThis PR adds
Confidence Score: 3/5
|
…gh-thinking-support # Conflicts: # src/auto-reply/thinking.test.ts # src/auto-reply/thinking.ts
…gh-thinking-support # Conflicts: # src/auto-reply/thinking.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 79719ca616
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| console.log( | ||
| `No tests found for ${plan.extensionDir}. Run "pnpm test:extension ${plan.extensionId} -- --dry-run" to inspect the resolved roots.`, | ||
| ); | ||
| process.exit(1); | ||
| return; |
There was a problem hiding this comment.
Fail when extension test discovery returns no files
run() now logs and returns success when plan.testFiles is empty, which means pnpm test:extension <id> exits 0 without running any tests. In the extension-fast CI job (.github/workflows/ci.yml, step Run changed extension tests), this silently marks a changed extension as passing if test discovery regresses (for example, roots are misresolved or tests are renamed), whereas the previous non-zero exit correctly surfaced the gap.
Useful? React with 👍 / 👎.
# Conflicts: # src/plugins/stage-bundled-plugin-runtime.test.ts
|
Superseded by #48904, which rebuilds this change cleanly from current |
AI-assisted: Yes (OpenClaw-assisted). Testing: targeted / lightly tested.
Summary
Describe the problem and fix in 2–5 bullets:
xhighsupport is currently gated by a hard-coded provider/model allowlist, so custom refs such asrobot/gpt-5.4get rejected or downgraded tohigheven when the upstream endpoint really supports the higher thinking level.openai/*names just to avoid false downgrades, which is brittle and defeats explicit custom model catalogs.models.providers.*.models[*].compat.supportsXHighThinkingand makes the majorxhighgating paths honor that explicit per-model compat flag before falling back to the built-in allowlist.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
xhighwithcompat.supportsXHighThinking: true./thinkoptions and invalid-xhighmessages now reflect explicit custom compat flags instead of relying only on the built-in allowlist.Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation:Repro + Verification
Environment
corepack pnpm, Vitestrobot/gpt-5.4viaopenai-responses)llm-task{ "models": { "providers": { "robot": { "baseUrl": "https://example.test/v1", "api": "openai-responses", "models": [ { "id": "gpt-5.4", "reasoning": true, "compat": { "supportsXHighThinking": true } } ] } } } }Steps
robot/gpt-5.4.thinkingDefaultor an explicit/thinking xhighrequest for that custom ref.xhighbecause the ref is not in the hard-coded allowlist.compat.supportsXHighThinking: trueto that model definition./thinkor/thinking xhighflow.Expected
xhigh-capable.Actual
robot/gpt-5.4were downgraded tohigheven when the upstream supportedxhigh.xhighfor that custom ref, and the same config-aware support check is used across command, gateway, cron, reply, andllm-taskpaths.Evidence
Attach at least one:
Before (real runtime log):
Targeted verification run locally after the patch:
Human Verification (required)
What you personally verified (not just CI), and how:
compat.supportsXHighThinking: trueenablesxhighforrobot/gpt-5.4.compat.supportsXHighThinking: falsecan explicitly disablexhigheven for an otherwise built-in-supported ref./thinkexposesxhighand/thinking xhighsucceeds for an opted-in custom provider.llm-taskentry points.falsewins over the built-in allowlist.Review Conversations
If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.
Compatibility / Migration
Yes/No) YesYes/No) Yes (optional config addition)Yes/No) NoFailure Recovery (if this breaks)
compat.supportsXHighThinkingfrom the custom model definition, set it tofalse, or revert this commit.models.providers.*.models[*].compatentries; the previous behavior is otherwise unchanged.xhigh, or a proxy that opted in but still rejects high-thinking requests upstream.Risks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write
None.xhighin config even though the upstream implementation does not actually support it.falseimmediately.xhighgate site still used the old hard-coded check.agent, gateway session patch, cron, reply flow, andllm-task) and adds targeted tests around the new behavior.