Repository navigation
Support compat reasoning levels for thinking xhigh - #90703
Alex-Govorov wants to merge 23 commits into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed September 22, 2026, 1:29 PM ET / 17:29 UTC. ClawSweeper reviewWhat this changesThe branch enables explicitly declared extended thinking levels and applies compatible-provider reasoning mappings across Completions and Responses requests, with corresponding types, validation, and tests. Merge readiness⛔ Blocked before merge - 4 items remain Keep this PR open. PR close coverage proof kept this PR open against #111367: model PR close coverage proof was incomplete: The substantive evidence describes a merged implementation covering the original capability and request-serialization work. The source report identifies no remaining current-main failure and explicitly explains that the replacement supplies the missing acceptance proof. No material source-only work requires independent review. Priority: P2 Review scores
Verification
How this fits togetherModel compatibility metadata determines which thinking levels OpenClaw offers and how those choices become provider request parameters. The AI adapters carry the selected effort into Completions or Responses requests. flowchart LR
A[Configured model metadata] --> B[Thinking capability resolution]
C[Selected thinking level] --> B
B --> D[Supported effort and mapping]
D --> E[Completions request]
D --> F[Responses request]
E --> G[Compatible provider]
F --> G
Before merge
Agent review detailsSecurityNone. PR surfaceSource +285, Tests +656. Total +941 across 18 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep this PR open until a linked canonical PR proves it covers this PR's unique work, or a maintainer confirms closure. Do we have a high-confidence way to reproduce the issue? No current-main failure was reproduced in this read-only review; current source, request-boundary tests, and the merged replacement's live acceptance trace cover the central reported failure. Is this the best way to solve the issue? The shipped shared resolver is the better solution: it covers both request families and their capability contract without retaining this branch's separate adapter policies. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b419a4add99f; fix evidence: release v2026.9.5, commit ec798a4687fa. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
The four commits pushed at 18:10-18:12 moved rows of my 18:05 table, so that table is superseded. I re-ran the same wire capture on the current head ( Harness is unchanged:
Row I is unchanged, so the branch's own goal still measures out on this head: What the last commit movedRows G, K and N are new deltas. On
The Scope of exposureNo in-repo catalog is affected. Every extension that ships a Still open from the previous captureRow D is unchanged on this head: declaring only Scope of this capture: the Responses request path only, with the transport host's fetch as the seam. The Completions compat path in this diff is not covered by these arms, and I did not run the branch's own suite beyond this capture. |
|
The five commits pushed after 18:12 moved my last table, so it is superseded. I re-ran the same wire capture on the final reviewed head Harness unchanged: Final head, 14 arms
Both deviations I opened on 18 August are closed, and the silent downgrade with them.
Attribution, since "which commit did it" is checkable: The remaining main-vs-branch rows now follow one ruleG, K and N still differ from
Mechanism, at
That is the same shape Scope, restated because it bounds the riskUnchanged from my earlier measurement and re-checked on this head: no in-repo catalog is affected. All six extensions that carry a I still have no standing on the merge decision between this branch and #111367; #111367 remains at Probe file, so anyone can reproduce or refute the table: 14 arms, drop into |
|
The new P1 names a payload consequence — "Responses then preserves it at the request boundary and Completions sends it unless a map happens to override it" — so I measured it at the request boundary on both adapters and on both heads instead of arguing it from the diff. Same harness as my earlier table: Responses rows also carry What reaches the wire
Arm 1 is the finding's exact configuration, and it is identical in all four cells. A declared list that omits Arm 4 is the only cell this branch moves, and it moves toward the finding's own goal: The cited lines,
|
| compat | main |
head |
|---|---|---|
supportedReasoningEfforts:["low","medium","high","xhigh"] |
["off","minimal","low","medium","high"], clamp(xhigh)=high |
["off","minimal","low","medium","high","xhigh"], clamp(xhigh)=xhigh |
| none | ["off","minimal","low","medium","high"], clamp(xhigh)=high |
same |
supportedReasoningEfforts:["low","medium","high"] |
["off","minimal","low","medium","high"], clamp(xhigh)=high |
same |
minimal is exposed in every cell of both columns; the only delta is xhigh, which is this PR's purpose, and row 3 is the control showing the new gate does refuse xhigh when the list omits it.
Scope of the requested repair
The finding asks to "make the list a hard capability/payload cap for all canonical levels". That is a bigger change than an operator-facing compat fix, because compat.supportedReasoningEfforts is already produced by two in-repo catalogs, not only by hand-written config:
extensions/codex/src/app-server/model-catalog.ts:35-38sets it from whatever the Codex app server advertises (those rows carryapi: "openai-chatgpt-responses";getSupportedThinkingLevelsonly branches onanthropic-messages, so a cap on canonical levels would reach them the same way).src/agents/harness/model-catalog.ts:60-68sets it from the provider/observed snapshot.
The repository's own fixtures for those two producers use ["low","medium","high","xhigh","max","ultra"] (extensions/codex/src/app-server/model-catalog.test.ts:31, src/agents/harness/model-catalog.test.ts:43) — which omits minimal — and ["high"] (src/agents/harness/model-catalog.test.ts:106). Under a hard cap the first shape would drop minimal from the level picker for those models and the second would collapse it to off + high. That may well be the correct end state, but it is a user-visible narrowing for shipped catalogs rather than a repair confined to this branch's surface, so it looks like its own change with its own before/after.
What I did not measure
Whether an operator can already set supportedReasoningEfforts on an openai-responses model before this PR is source reading, not measurement: OpenAIResponsesCompatSchema (src/agents/sessions/model-registry.ts:138-142 on main) is a plain Type.Object with no additionalProperties: false, validation is Check-only (:541), and mergeCompat (:279-312) is a spread with no key whitelist, so unknown compat keys are carried through to Model.compat verbatim. If that reading is right, this PR's schema and type additions declare a field that already flowed through rather than opening a new one; if it is wrong, the arm-1 rows above still hold for the catalogs named in the previous section, which set the field in code.
I still have no standing on the merge decision between this branch and #111367. Probe file is 6 arms × 2 adapters + 3 capability rows, drop into the repo root and run with node --import tsx, so the table can be reproduced or refuted.
|
Refreshed table,
|
| # | model config | asks | Responses | Completions |
|---|---|---|---|---|
| 1 | supportedReasoningEfforts:["low","medium","high","xhigh"] |
minimal |
minimal → minimal |
minimal → low |
| 2 | no compat at all | minimal |
minimal → minimal |
minimal → low |
| 3 | list as 1 | low |
low → low |
low → low |
| 4 | list as 1 + reasoningEffortMap:{minimal:"low"} |
minimal |
minimal → low |
low → low |
| 5 | supportedReasoningEfforts:["low","medium","high"] |
xhigh |
high → high |
high → high |
| 6 | list as 1 | high |
high → high |
high → high |
| 7 | thinkingLevelMap:{max:"ultra"} |
max |
xhigh → ultra |
xhigh → high |
| 8 | supportedReasoningEfforts:[…,"max"] + reasoningEffortMap:{max:"ultra"} |
max |
high → xhigh |
high → xhigh |
| 9 | supportedReasoningEfforts:[…,"max"], no map |
max |
high → max |
high → xhigh |
| 10 | thinkingLevelMap:{xhigh:"ultra"} |
xhigh |
ultra → ultra |
ultra → ultra |
| 11 | config as 8 | high |
high → high |
high → high |
Row 1 answers the previous P1: the new commit makes the declared list a real cap on the Completions provider path, so my earlier "identical in all four cells" no longer holds for that adapter. Rows 3, 6, 10 and 11 are unchanged controls.
Row 2: the change is not limited to models that declare a list
Row 2 has no compat block at all, and the wire value still moves. resolveOpenAIReasoningEffortForModel falls back to GENERIC_REASONING_EFFORTS = ["low","medium","high"] for any id outside the GPT-5 families (openai-reasoning-effort.ts:41), and minimal is not in it. Swept over three ids and four levels on both heads:
| id | asks | Completions main → head |
Responses main → head |
|---|---|---|---|
custom-reasoner |
minimal |
minimal → low |
minimal → minimal |
qwen3-32b |
minimal |
minimal → low |
minimal → minimal |
deepseek-r1 |
minimal |
minimal → low |
minimal → minimal |
| all three | low / medium / high |
unchanged | unchanged |
Only the minimal row moves, on one adapter. getSupportedThinkingLevels still offers minimal for these models on both heads, so the level stays selectable and the request is silently rewritten — and the two adapters now disagree about the same selection where main had them agree. Whether that rewrite is desirable is a call for the reviewers; what it is not, today, is stated in the PR body or covered by a test, and it reaches every reasoning-capable openai-completions model an operator configures without a compat block, not only the ones this PR is aimed at.
Row 7/9: the new P1 is real, and its root is a line main already has
Row 9 is the finding's exact scenario and it reproduces: a model advertising max gets max on Responses and xhigh on Completions from the same selection. That divergence is this branch's — on main both adapters answered high because max was not selectable at all.
The rewrite that causes it, though, is main's:
// packages/ai/src/providers/openai-completions.ts, identical on main and this head
const reasoningEffort =
clampedReasoning === "off" ? undefined : clampedReasoning === "max" ? "xhigh" : clampedReasoning;Row 7 measures what that costs on main today, through main's own supported mechanism: thinkingLevelMap:{max:"ultra"} is honoured by the capability layer (getSupportedThinkingLevels returns max, clampThinkingLevel("max") === "max" on both heads) and then dropped at the wire — main sends xhigh, not ultra, on both adapters. Row 10 is the discriminator: the identical map shape one level down ({xhigh:"ultra"}) sends ultra everywhere. So max is the only level whose operator mapping is silently discarded, and that is true before this branch.
On this head row 7 splits: Responses now sends ultra (the mapping is honoured), Completions sends high — the simple lane rewrites max to xhigh, buildParams then resolves xhigh against a generic list that lacks it and steps down to high. So for an operator already using thinkingLevelMap.max on a Completions model, this head moves the wire value from xhigh to high rather than to the mapped ultra.
That makes the requested repair — keep canonical max through streamSimpleOpenAICompletions and let the shared resolver apply the mapping — worth more than closing this branch's divergence: the same edit repairs a mapping main drops today. Row 8 is the control for the boundary the repair must keep: when the map's target (ultra) is not in the declared list, capability already clamps to xhigh and both adapters agree.
Probe files: 11 arms × 2 adapters + the 3-id sweep, node --import tsx, no vitest. Same standing as before — I have no opinion on the merge decision between this branch and #111367.
|
Wire table,
|
| # | model config | asks | main | 8e30354 |
975ebbd |
|---|---|---|---|---|---|
| 1 | plain reasoning model | high |
high / high |
high / high |
high / high |
| 2 | thinkingLevelMap:{high:null} |
high |
medium / medium |
medium / medium |
- / none |
| 3 | thinkingLevelMap:{high:null} |
medium |
medium / medium |
medium / medium |
medium / medium |
| 4 | thinkingLevelMap:{high:null} |
– | none / none |
none / none |
none / none |
| 5 | thinkingLevelMap:{off:null} |
high |
high / high |
high / high |
high / high |
| 6 | thinkingLevelMap:{off:null} |
– | - / - |
- / - |
- / - |
| 7 | thinkingLevelMap:{max:null} |
max |
high / high |
high / high |
- / none |
| 8 | thinkingLevelMap:{minimal:null} |
minimal |
low / low |
low / low |
- / none |
| 9 | thinkingLevelMap:{high:"medium"} |
high |
medium / medium |
medium / medium |
medium / medium |
| 10 | compat:{supportsReasoningEffort:false} |
high |
high / high |
- / high |
- / high |
| 11 | compat:{supportedReasoningEfforts:["low","medium","high","xhigh"]} |
minimal |
minimal / minimal |
minimal / minimal |
minimal / minimal |
| 12 | thinkingLevelMap:{max:"ultra"} |
max |
xhigh / xhigh |
ultra / ultra |
ultra / ultra |
| 13 | thinkingLevelMap:{high:null} + compat:{reasoningEffortMap:{high:"xhigh"}} |
high |
medium / medium |
medium / medium |
- / none |
Rows 11 and 12 confirm the claims in my previous comment survive the new commit unchanged, which is expected: the diff 8e303541be8...975ebbda210 touches only openai-responses.ts, openai-responses-shared.ts and their tests, so the Completions column I posted earlier is untouched.
Row 2/7/8/13: the opt-out is evaluated before the clamp, and null carries two meanings
resolveResponsesReasoningEffort now returns early on hasNullThinkingLevelOptOut(model, reasoning) (openai-responses-shared.ts:237) using the requested level, two lines before it calls clampThinkingLevel. The capability layer reads a null on a non-off key as a hard cap rather than an opt-out, and says so in its own comment:
// packages/ai/src/model-utils.ts:164, identical on main and this head
// Explicit provider opt-outs are hard caps. Downgrade them before considering
// stronger levels so unsupported xhigh/max requests cannot increase cost.Measured on both main and 975ebbda210, byte-identical:
| config | level selectable? | clampThinkingLevel |
|---|---|---|
{high:null}, ask high |
no | medium |
{max:null}, ask max |
no | high |
{minimal:null}, ask minimal |
no | low |
{off:null}, ask high |
yes | high |
So the capability layer still answers "downgrade to medium/high/low" for rows 2, 7 and 8 on this head, and the Responses lane discards that answer and sends nothing. Row 5/6 is the discriminator: {off:null} is the shape whose opt-out meaning main already honours, and it is unchanged in all three columns. Row 13 shows the early return also skips a compat.reasoningEffortMap entry this branch otherwise honours.
Reachability, stated plainly: I could not get an unclamped level to the provider from an agent session — setThinkingLevel clamps at set time (agent-session-models.ts:150) and every model switch re-clamps through applyModelSwitch. The divergence is at the provider boundary, which this branch itself treats as a clamping layer. On in-repo catalogs: the only thinkingLevelMap null that ships on a Responses-api model is off (extensions/openai/openai-provider.ts:449, extensions/opencode/provider-catalog.ts:433), and rows 5/6 leave it alone. The {xhigh:null, max:null} shape does ship, on anthropic-messages models (extensions/github-copilot/model-metadata.ts:41,53, extensions/anthropic-vertex/provider-catalog.ts:162,171), so it is idiomatic config rather than something only this probe writes.
Rows 2/7/8/13 again: the suppression reaches one of the three Responses lanes
disableReasoningSerialization is computed in streamSimpleOpenAIResponses only (openai-responses.ts:116). streamSimpleAzureOpenAIResponses (azure-openai-responses.ts:102) and the ChatGPT lane (openai-chatgpt-responses.ts:652) call the same resolveResponsesReasoningEffort, get undefined, and fall through to applyCommonResponsesParams's default-off branch, which emits {"effort":"none"}. Identical model config, two different bodies.
Row 10 is the control for the objection that this is just the deliberate openai-only scoping of compat: getCompatReasoningConfig returns undefined for every api other than openai-completions and openai-responses (model-utils.ts:54), which is why Azure keeps sending high there on both heads. thinkingLevelMap is not scoped that way — it is a plain Model field (packages/llm-core/src/types.ts:678) that clampThinkingLevel honours for every api, so nothing in the type or the capability layer says one adapter should suppress and the other should send none. I measured Azure; the ChatGPT lane is a source reading, not a measurement.
Both rows point at the same one-line choice: if the early return moved below the clamp (or were restricted to off), rows 2/7/8/13 would return to the clamped value on both adapters and rows 5/6 would keep today's behaviour. If full suppression is the intent for those shapes, computing it inside resolveResponsesReasoningEffort rather than in one caller would give all three lanes the same answer.
Probe: 13 arms x 2 adapters plus the selectability sweep, node --import tsx, no vitest, each ref checked out and run separately. Same standing as before — I have no opinion on the merge decision between this branch and #111367.
|
Re-measured on
The
|
| model config | ask | lane | main | 975ebbd |
738c92f |
|---|---|---|---|---|---|
| the branch's own Grok 4.5 shape1 | off |
openai-responses |
low |
- |
low |
| the branch's own Grok 4.5 shape1 | off |
openai-completions |
low |
- |
- |
thinkingLevelMap:{off:null} |
off |
openai-responses |
minimal |
- |
minimal |
thinkingLevelMap:{off:null} |
off |
openai-completions |
minimal |
- |
- |
1 {off:null, minimal:"low", low:"low", medium:"medium", high:"high"} + compat:{supportsReasoningEffort:true, supportedReasoningEfforts:["low","medium","high"]} — copied verbatim from openai-responses.test.ts and openai-responses-shared.test.ts in this commit.
The Completions path reaches the same outcome by a different route: explicitlyDisabledByThinkingLevel makes requestedThinkingEnabled false, execution falls to the trailing else if at openai-completions.ts:973, and offReasoningEffort is null rather than a string, so nothing is written. Net effect is the field's absence either way.
Both new tests in this commit are on the Responses surface; there is no sibling test on openai-completions, which is why CI is green on it.
Reachability for the Completions row, stated plainly: thinkingLevelMap is a plain Model field (packages/llm-core/src/types.ts:678) with no api gating, and applyXaiRuntimeModelCompat writes XAI_REASONING_EFFORTS regardless of api (extensions/xai/runtime-model-compat.ts:82), while provider-models.ts:45 takes the api straight from providerConfig.api. resolveXaiTransport reroutes xAI back to Responses only when the baseUrl is a native xAI host or absent (extensions/xai/provider-routing.ts:30), so a Grok model pointed at a gateway with api: "openai-completions" stays on the Completions lane with that map intact. I measured the config, not that deployment.
Rows 2/7/8/13 from my previous comment are unchanged on this head
The new guard only relaxes reasoning === "off"; reasoning !== "off" still short-circuits before the clamp, so the non-off null keys behave exactly as measured last time. Cells are openai-responses / azure-openai-responses:
| model config | ask | main | 738c92f |
clampThinkingLevel on this head |
|---|---|---|---|---|
thinkingLevelMap:{high:null} |
high |
medium / medium |
- / none |
medium |
thinkingLevelMap:{max:null} |
max |
high / high |
- / none |
high |
thinkingLevelMap:{minimal:null} |
minimal |
low / low |
- / none |
low |
{high:null} + compat:{reasoningEffortMap:{high:"xhigh"}} |
high |
medium / medium |
- / none |
medium |
resolveResponsesReasoningEffort returns undefined for these, openai-responses.ts:116 turns that into full suppression, and azure-openai-responses.ts:102 and openai-chatgpt-responses.ts:652 get the same undefined and fall through to applyCommonResponsesParams's default-off branch, which emits {"effort":"none"}. I measured Azure; the ChatGPT lane is a source reading.
9a9f70834a4 fixes a regression this branch had introduced, and improves on main
Dropping the hardcoded max → xhigh in streamSimpleOpenAICompletions lets the downstream fallback map do the mapping. Measured, Completions lane:
| model config | ask | main | 975ebbd |
738c92f |
|---|---|---|---|---|
thinkingLevelMap:{max:"ultra"} |
max |
xhigh |
high |
ultra |
compat:{supportedReasoningEfforts:["provider-low","provider-max"], reasoningEffortMap:{low:"provider-low", max:"provider-max"}} |
max |
high |
provider-low |
provider-max |
compat:{supportedReasoningEfforts:["low","medium","high","max"]} |
max |
high |
high |
max |
{max:"ultra"} + compat:{supportedReasoningEfforts:["low","medium","high"]} |
max |
xhigh |
high |
high |
Rows 1 and 2 were wrong on 975ebbd and are right now. Row 3 puts a literal max on the wire where main sent high, which matches what the catalog declared, so I read it as intended rather than as a finding.
Probe: 18 Responses arms x 2 adapters plus 13 Completions arms, three refs, main 0a8226c3db5, Node 22.20.0. Same standing as before — no opinion on the merge decision between this branch and #111367.
|
Re-measured on First, the previous finding is fixed.
Two things the sweep turned up on this head. 1. The compat reasoning contract never reaches
|
| compat block | openai-responses |
azure-openai-responses |
|---|---|---|
supportsReasoningEffort: false, ask high |
levels [off], clamp off, wire absent |
levels [off,minimal,low,medium,high], clamp high, wire "high" |
supportedReasoningEfforts: [low,medium,high,xhigh], ask xhigh |
levels include xhigh, clamp xhigh |
xhigh not offered, clamp falls back to high |
The second row is this PR's headline capability: an Azure Responses model that declares xhigh
in supportedReasoningEfforts still cannot select it. On main both lanes behaved identically,
so this asymmetry is introduced here. No test in the diff touches an azure-openai-responses
model, which is why CI stays green — the same shape as the Completions gap in my previous
comment.
2. Completions now sends low where main sent minimal
Not limited to off requests; the plain case shows it:
| config | ask | main |
2bdf86f08f8 |
clampThinkingLevel |
|---|---|---|---|---|
| plain model, no map, no compat | minimal |
"minimal" |
"low" |
minimal |
{off: null} |
minimal |
"minimal" |
"low" |
minimal |
{off: null} |
off |
"minimal" |
"low" |
minimal |
The clamped level is still minimal and getSupportedThinkingLevels still offers minimal, but
the wire value is low, because the clamp result is now routed through
resolveOpenAIReasoningEffortForModel, whose minimal -> low ladder applies when the resolved
support list has no minimal — the default for custom OpenAI-compatible models. If that upgrade
is intended (sending a level the provider actually accepts), the selectable set probably should
not keep advertising minimal; if it is not intended, every user who picks the cheapest level on
an OpenAI-compatible model silently gets the next one up.
Harness, arms and both raw outputs are the same probe I posted earlier, extended with the Azure
lane and the minimal rows.
|
ClawSweeper recorded closeout evidence for this proposed close.
|
|
Superseded by #146134 |
Summary
What problem does this PR solve?
xhighthinking when the model configuration explicitly declares API support throughcompat.supportedReasoningEfforts.xhighhidden for reasoning models that do not declare extended compatible reasoning effort support.maxconservative: it is surfaced only when compat metadata explicitly supportsmax(for examplereasoningEffortMap.max), while plainsupportedReasoningEfforts: ["xhigh"]surfaces onlyxhigh.Why does this matter now?
minimal/low/medium/highset, but OpenClaw's UI/runtime capability calculation filtered those levels out before consulting explicit compat support.xhigh, even when the provider explicitly lists that effort in compat metadata.What is the intended outcome?
xhighonly whencompat.supportedReasoningEffortsexplicitly includes it, and can advertisemaxonly when explicit compat metadata saysmaxis supported.What is intentionally out of scope?
What does success look like?
supportedReasoningEffortscan surfacexhigh;reasoningEffortMapcan map supported levels but does not by itself expose new extended levels;maxrequires explicitmaxsupport in compat metadata.xhigh.What should reviewers focus on?
maxis gated strictly enough for compatible-provider reasoning effort checks.src/llm/model-utils.test.ts.Linked context
Which issue does this close?
Closes #
Which issues, PRs, or discussions are related?
Related #59416
Related #74273
Related #84902
Was this requested by a maintainer or owner?
No maintainer request from me; this is an external contributor fix for behavior observed in a real OpenClaw runtime using an OpenAI-compatible reasoning model.
Real behavior proof (required for external PRs)
Behavior or issue addressed: OpenAI-compatible reasoning models with explicit compat metadata for extended reasoning efforts were not allowed to expose
xhighthinking, andmaxneeded an explicit opt-in path.Real environment tested: Local OpenClaw runtime on Linux, current session using model
codex-lb-2455/gpt-5.5withThink: xhighvisible insession_statusoutput.Exact steps or command run after this patch:
session_status(model="", sessionKey="current")2bdf86f08f8cee323e84465782a8845d043febf5, in a dependency-complete checkout, temporary seven-arm probes were run frompackages/ai/src/providers/withpnpm exec tsx .completions-boundary-proof.mtsandpnpm exec tsx .responses-boundary-proof.mts.git rev-parse HEAD, configuredconfigureAiTransportHost({ buildModelFetch }), called the real simple streaming provider entry point, constructednew Request(input, init), asserted exactly one POST to the expected endpoint and the expected model id, parsed the outgoing JSON, and returned a mock SSE response so the stream completed. Auth headers and tokens were not printed.Evidence after fix (redacted terminal capture and inspectable request-boundary output):
session_statusoutput included:OpenClaw 2026.6.1,Model: codex-lb-2455/gpt-5.5, andThink: xhigh.src/llm/model-utils.test.tspass locally. The newopenai-completionsregression verifies Grok 4.5off:null → lowclamping through simple Completions.max, andthinkingLevelMap[level] === nullserialization opt-outs.Final-head Completions capture: seven arms through real
streamSimpleOpenAICompletions:reasoning_efforthighcontrol"high"high → xhigh, supported list includesxhigh"xhigh"xhigh"high"fallbacksupportsReasoningEffort: falsethinkingLevelMap.high === null"medium"(canonical clamp)max → provider-max, supported list includesprovider-max"provider-max"Final-head Responses capture: seven arms through real
streamSimpleOpenAIResponses:reasoning/includehighcontrol{ "effort": "high", "summary": "auto" }/["reasoning.encrypted_content"]high → xhigh, supported list includesxhigh{ "effort": "xhigh", "summary": "auto" }/["reasoning.encrypted_content"]xhigh{ "effort": "high", "summary": "auto" }/["reasoning.encrypted_content"]supportsReasoningEffort: falsethinkingLevelMap.high === null{ "effort": "medium", "summary": "auto" }/["reasoning.encrypted_content"]max → provider-max, supported list includesprovider-max{ "effort": "provider-max", "summary": "auto" }/["reasoning.encrypted_content"]off,off: nullclamped tolow{ "effort": "low", "summary": "auto" }/["reasoning.encrypted_content"]All fourteen arms verify one fetch call,
POST, exact endpoint (/chat/completionsor/responses), and the expected model id (custom-reasonerfor proof arms;grok-4.5for the xAI fixture).Raw non-secret outputs and probe sources were preserved during validation. SHA-256:
Full raw redacted JSON output is included below for inspectability.
Full exact-head Completions probe output
Full exact-head Responses probe output
Full Completions probe source (non-secret)
Full Responses probe source (non-secret)
xhighonly for explicitly supported compatible models, preserves valid provider-native mappings includingmax, falls back conservatively when a mapped effort is not supported, and keeps explicit disablement out of both transport payloads while preserving canonical null-cap clamping.https://proof.invalidand a mock SSE response. They prove the source-level transports serialize the expected redacted JSON at the egress boundary; they do not claim that an external provider accepts every value. The probes were run from a dependency-complete local checkout with Nodev26.7.0, pnpm11.15.1, and filtered frozen-lockfile installation. The temporary probe files were removed from the checkout afterward.No Organizations Foundpage because this GitHub account has no organization with the Blacksmith GitHub App installed.blacksmith auth statusreportsNot authenticated to any organization. Run 'blacksmith auth login' to get started.xhighwas not surfaced for an OpenAI-compatible reasoning model even though compat metadata mapped/supported the provider effort.Tests and validation
Which commands did you run?
Results:
oxfmt: passed for the changed files.oxlint: passed for the changed files with 0 warnings and 0 errors.pnpm tsgo:core: passed.pnpm tsgo:test:src: passed.pnpm check:changed: blocked by Blacksmith CLI auth/org infrastructure, not by a code/test failure:blacksmith auth status:What regression coverage was added or updated?
xhighviacompat.supportedReasoningEfforts.compat.reasoningEffortMap/maxalias behavior, including map-only aliases that must not expose new extended levels.xhigh.What failed before this fix, if known?
xhigh/maxfor compatible reasoning models before explicit compat reasoning effort support was considered; the follow-up also prevents map-only aliases from exposing new extended levels.If no test was added, why not?
Risk checklist
Did user-visible behavior change? (
Yes/No)Yes, for explicitly configured OpenAI-compatible reasoning models only.
Did config, environment, or migration behavior change? (
Yes/No)No.
Did security, auth, secrets, network, or tool execution behavior change? (
Yes/No)No.
What is the highest-risk area?
How is that risk mitigated?
supportedReasoningEfforts/reasoningEffortMap).Current review state
What is the next action?
2977d8895d; the new CI run and automatic ClawSweeper verdict are pending. The mapped-max finding was fixed in commit9a9f70834a, and the Grok 4.5off → lowregression was fixed in2977d8895d; delegated local Blacksmith Testbox validation remains unavailable in this external contributor environment.What is still waiting on author, maintainer, CI, or external proof?
pnpm check:changedBlacksmith Testbox gate because Blacksmith auth has no available organization. Exact-head transport proof is supplied for both adapters, including canonicalhigh:null → mediumclamping and Grok 4.5off:null → low. A live compatible-provider acceptance trace is not available in this environment and is not claimed. Await exact-head CI and automatic review; do not infer status from older runs.Which bot or reviewer comments were addressed?
9a9f70834aby preserving canonicalmaxuntil the shared resolver appliesreasoningEffortMap.max; the Grok 4.5off → lowregression was addressed in2977d8895d; final captures verify both behaviors.