Skip to content

fix(clawrouter): honor advertised reasoning efforts - #120631

Merged
steipete merged 1 commit into
mainfrom
steipete/gpd-5-6-syncing-levels-f81f4c
Aug 8, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/gpd-5-6-syncing-levels-f81f4c

Conversation

@steipete

@steipete steipete commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where Claw Router users selecting reasoning effort for GPT-5.6 would see OpenClaw's generic off/minimal/low/medium/high fallback because the router catalog previously omitted model-specific effort metadata. That list stopped at high and could include an unsupported minimal choice.

Paired producer change: openclaw/clawrouter#110, merged as openclaw/clawrouter@ca27bc4.

Why This Change Was Made

The Claw Router plugin now consumes the producer's bounded supportedReasoningEfforts catalog field, projects it into the existing model compatibility contract, and resolves the exact advertised OpenClaw effort profile. The paired producer and consumer fixes make the authoritative list off/low/medium/high/xhigh/max, plus the intentional logical OpenClaw ultra tier where max is available. Rows without metadata retain the existing generic fallback.

The implementation is metadata-driven: it adds no model-name regex and changes neither core reasoning semantics nor the Control UI. This change was AI-assisted and reviewed before publication.

User Impact

Claw Router users get effort choices that match the selected model's advertised capabilities. Unsupported values are filtered at the catalog boundary, minimal is no longer offered when the router does not advertise it, and advanced xhigh, max, and logical OpenClaw ultra choices remain available. Catalogs without the new metadata behave exactly as before.

Evidence

  • Exact head: a3304ed79b10131c4a783ac0d67d739a696c225c; CI run https://github.com/openclaw/openclaw/actions/runs/31266728685 completed successfully, including openclaw/ci-gate.
  • Producer contract: Claw Router PR fix(catalog): advertise GPT-5.6 reasoning efforts clawrouter#110 is merged at openclaw/clawrouter@ca27bc4. Its authenticated local Wrangler Worker proof returned HTTP 200 from /v1/catalog, advertised GPT-5.6 efforts none/low/medium/high/xhigh/max, and omitted the field for GPT-5.5. Direct inspection confirmed omitted metadata remains omitted, empty/duplicate/unsupported lists are rejected at compilation, and valid partial lists pass through exactly.
  • Codex contract: directly inspected openai/codex revision openai/codex@2e3a170. codex-rs/models-manager/models.json advertises GPT-5.6 reasoning levels, codex-rs/app-server-protocol/src/protocol/v2/model.rs exposes supported_reasoning_efforts, and codex-rs/core/src/client.rs maps logical Ultra to provider Max.
  • Public identifiers: PASS against official OpenAI documentation at https://developers.openai.com/api/docs/guides/latest-model and the Codex source above.
  • Fresh focused Vitest: node scripts/run-vitest.mjs extensions/clawrouter/provider-catalog.test.ts extensions/clawrouter/index.test.ts passed 21 tests across 2 files.
  • git diff --check origin/main...HEAD passed.
  • Fresh changed gate: the normal node scripts/check-changed.mjs -- ... route could not start its remote backend because Blacksmith/Testbox and managed Crabbox broker authentication were unavailable. The trusted-source local fallback completed successfully with extension typechecks, lint, formatting, plugin boundaries, guards, dead-code checks, the database-first guard, and import-cycle checks.
  • Fresh Codex autoreview on the committed branch reported no accepted or actionable findings.
  • Existing source-blind public CLI proof against a disposable catalog rejected minimal with allowed choices off/low/medium/high/xhigh/max/ultra; confirmed xhigh, max, and ultra reached provider dispatch; confirmed absent metadata retained the generic minimal fallback; and bounded malformed metadata to valid choices only.
  • Fresh cross-repository attempt: the merged Claw Router local Worker completed its full smoke, and the exact OpenClaw candidate consumed its authenticated local catalog. A generated local credential returned an executable OpenAI catalog with the exact GPT-5.6 effort field and no GPT-5.5 field. The agent-dispatch half did not complete: agent exec stopped before thinking validation with prepared model runtime publication timed out. No fresh minimal rejection or xhigh/max dispatch is claimed from that attempt; the prior source-blind CLI proof remains the behavior evidence for those cases.
  • Owner decision: the maintainer explicitly authorized landing both paired PRs. The exact-head ClawSweeper review found no actionable code defect; its producer, sibling Codex, latest-move, and protected-owner evidence items are addressed above. Because the reviewed head is unchanged, no rating-only re-review was requested.
  • Deployment status: not deployed. No release or deployment is part of this PR.

@openclaw-barnacle openclaw-barnacle Bot added the extensions: clawrouter Extension: clawrouter label Aug 8, 2026
@steipete
steipete marked this pull request as ready for review August 8, 2026 16:20
@openclaw-barnacle openclaw-barnacle Bot added size: M maintainer Maintainer-authored PR labels Aug 8, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. labels Aug 8, 2026
@clawsweeper

clawsweeper Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 8, 2026, 1:46 PM ET / 17:46 UTC.

ClawSweeper review

What this changes

The PR carries ClawRouter’s advertised per-model reasoning efforts into OpenClaw’s model metadata and thinking-level picker.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

No concrete patch defect found. This maintainer-labeled PR remains necessary, but the mandatory direct Codex and producer-contract inspection cannot be completed because the sibling checkouts are absent and GitHub DNS is unavailable.

Priority: P2
Reviewed head: a3304ed79b10131c4a783ac0d67d739a696c225c
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The source-level repair and focused coverage are strong, while direct upstream-contract and successful runtime-dispatch evidence remain unavailable for independent review.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: This is a maintainer-authored PR; its body records terminal proof, but the fresh end-to-end dispatch attempt timed out and is not treated as sufficient proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is a maintainer-authored PR; its body records terminal proof, but the fresh end-to-end dispatch attempt timed out and is not treated as sufficient proof.
Evidence reviewed 6 items Current main still has the reported gap: Current main only infers whether a catalog model reasons from its identifier and does not preserve advertised effort metadata.
Patch uses the provider-owned boundary: The PR canonicalizes advertised efforts, then projects them into both the model compatibility contract and the thinking-level map.
Runtime consumer honors the hook before fallback: The generic thinking resolver passes catalog compatibility to the provider policy and returns a nonempty provider profile before using its generic fallback.
Findings None None.
Security None None.

How this fits together

ClawRouter converts a credential-scoped remote catalog into OpenClaw provider models and their selectable thinking levels. The selected level then flows through the provider runtime to the routed OpenAI-compatible model.

flowchart LR
  Catalog[ClawRouter catalog] --> Parser[Catalog parser]
  Parser --> Metadata[Model capability metadata]
  Metadata --> Profile[Thinking-level profile]
  Profile --> Runtime[Provider runtime]
  Runtime --> API[Routed model API]
Loading

Decision needed

Question Recommendation
Should this maintainer-authored PR land on the documented external contract evidence, or wait until the required local Codex and producer source checks can be repeated? Restore and repeat the contract checks: Make the sibling Codex and producer sources available, then repeat the exact-head contract and dispatch review.

Why: Repository policy forbids a Codex-backed merge or proof-sufficient verdict without direct sibling Codex source inspection, which this read-only environment cannot perform.

Before merge

  • Resolve merge risk (P1) - The remote producer’s omission, duplicate, and partial-list contract was not independently inspectable.
  • Resolve merge risk (P1) - The PR’s fresh agent-dispatch attempt timed out before validating the changed selection at runtime; the source and focused tests are coherent but do not replace the required direct Codex contract check.
  • Complete next step (P2) - The protected maintainer PR has no mechanical repair finding; a human must resolve the unavailable required contract evidence before merge.
Agent review details

Security

None.

PR surface

Source +74, Tests +138. Total +212 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 75 1 +74
Tests 2 148 10 +138
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 223 11 +212

Review metrics

Metric Value Why it matters
Production vs test LOC production +75/-1, tests +148/-10 The production increase implements the catalog-to-provider contract; focused tests cover canonical, omitted, malformed, and runtime-specific profiles.

Stored data model

Persistent data-model change detected: vector/embedding metadata: extensions/clawrouter/index.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Verify the provider contract before merge (recommended)
    Restore the unavailable direct Codex and producer checks, then record an exact-head dispatch result before merge.
  2. Accept the verification gap
    A maintainer may land the patch based on the recorded external evidence while accepting the unrepeatable contract and dispatch-proof gap.

Technical review

Best possible solution:

Keep the metadata-driven provider-plugin repair, then restore the direct Codex and producer contract checks and capture an exact-head dispatch result before landing.

Do we have a high-confidence way to reproduce the issue?

Yes—current main drops catalog-specific effort metadata at the model builder, while the generic fallback retains minimal; the PR’s source path directly replaces that behavior. The after-fix live dispatch was not independently observed here.

Is this the best way to solve the issue?

Unclear—the metadata-driven plugin boundary is the best OpenClaw-side design and avoids model-ID special cases in core, but the producer and Codex contracts could not be directly checked.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against e4309e0cc7a7.

Labels

Label changes:

  • add merge-risk: 🚨 auth-provider: Catalog metadata controls provider reasoning parameters and model capability selection, so an unverified upstream contract can affect routed OpenAI-compatible requests.

Label justifications:

  • P2: This corrects selectable reasoning levels for an optional provider plugin without evidence of broader runtime outage.
  • merge-risk: 🚨 auth-provider: Catalog metadata controls provider reasoning parameters and model capability selection, so an unverified upstream contract can affect routed OpenAI-compatible requests.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a maintainer-authored PR; its body records terminal proof, but the fresh end-to-end dispatch attempt timed out and is not treated as sufficient proof.

Evidence

What I checked:

  • Current main still has the reported gap: Current main only infers whether a catalog model reasons from its identifier and does not preserve advertised effort metadata. (extensions/clawrouter/provider-catalog.ts:266, e4309e0cc7a7)
  • Patch uses the provider-owned boundary: The PR canonicalizes advertised efforts, then projects them into both the model compatibility contract and the thinking-level map. (extensions/clawrouter/provider-catalog.ts:92, a3304ed79b10)
  • Runtime consumer honors the hook before fallback: The generic thinking resolver passes catalog compatibility to the provider policy and returns a nonempty provider profile before using its generic fallback. (src/auto-reply/thinking.ts:191, e4309e0cc7a7)
  • Logical ultra reaches the correct provider effort: OpenClaw maps its logical ultra tier to provider-facing max at the embedded runtime boundary. (src/agents/embedded-agent-runner/utils.ts:15, e4309e0cc7a7)
  • Focused regression coverage: The branch tests malformed catalog metadata, omitted metadata, the exact advertised profile, no invented minimal level, and OpenClaw-only ultra projection. (extensions/clawrouter/index.test.ts:74, a3304ed79b10)
  • Required contract source unavailable: The root policy requires direct sibling Codex inspection for this Codex-backed behavior; ../codex is absent, and GitHub cannot be resolved to obtain it. The paired producer checkout is also absent.

Likely related people:

  • steipete: Authored this repair and prior ClawRouter lifecycle and tool-schema work in the same paths. (role: recent area contributor; confidence: high; commits: a3304ed79b10, 91f57a315965, eec2c0cc26c7; files: extensions/clawrouter/index.ts, extensions/clawrouter/provider-catalog.ts)
  • vincentkoc: History shows repeated foundational ClawRouter catalog and routing work, including the canonical catalog-field consumer. (role: early catalog and routing contributor; confidence: high; commits: 95dafc824edb, 8c8866c92106; files: extensions/clawrouter/provider-catalog.ts, extensions/clawrouter/index.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Restore the sibling Codex and producer sources, then attach a concise exact-head contract and dispatch transcript with sensitive details redacted.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-08T16:48:01.309Z sha a3304ed :: needs maintainer review before merge. :: none

@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact head a3304ed79b10131c4a783ac0d67d739a696c225c:

  • The producer is merged: openclaw/clawrouter#110 / ca27bc44227f3e0179539bcc1fd2f30da9051c52. Its authenticated local Worker returned HTTP 200 from /v1/catalog, GPT-5.6 efforts none/low/medium/high/xhigh/max, and no GPT-5.5 effort field. Direct inspection verified omission, rejected empty/duplicate/unsupported lists, and exact valid partial-list propagation.
  • Direct sibling contract inspection at openai/codex 2e3a1702 covered codex-rs/models-manager/models.json, codex-rs/app-server-protocol/src/protocol/v2/model.rs, and codex-rs/core/src/client.rs; GPT-5.6 levels are advertised and logical Ultra maps to provider Max. Public-model identifier audit: PASS against the official GPT-5.6 guide.
  • Fresh proof passed: focused Vitest (2 files, 21 tests), git diff --check origin/main...HEAD, the trusted-source local changed-gate fallback (extension types/lint/format, boundaries, guards, deadcode, database-first, cycles), and exact-branch Codex autoreview with no accepted/actionable finding.
  • Exact-head CI is green: run 31266728685, including openclaw/ci-gate.
  • Real cross-repository proof reached an authenticated executable local catalog from the exact OpenClaw candidate. The fresh agent-dispatch half stopped before thinking validation with prepared model runtime publication timed out; no fresh minimal rejection or xhigh/max dispatch is claimed. The previously recorded source-blind CLI proof remains the behavior evidence for those cases. No deployment or release was performed.
  • Every ClawSweeper item/move is addressed: producer omitted/empty/partial semantics were inspected; the required Codex files were inspected directly; the latest moves were read and applied; and the protected maintainer owner decision was explicitly supplied by land both. The reviewed head did not change, so no rating-only re-review was requested.

The PR body now contains the durable detailed evidence and the explicit proof gap.

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. label Aug 8, 2026
@steipete
steipete merged commit 01ae18c into main Aug 8, 2026
161 checks passed
@steipete
steipete deleted the steipete/gpd-5-6-syncing-levels-f81f4c branch August 8, 2026 18:01
vincentkoc added a commit to IsaiahStapleton/openclaw that referenced this pull request Aug 8, 2026
…0807

* origin/main:
  fix(qa): honor Crabbox SSH fallback ports (openclaw#120539)
  refactor(core): adopt normalization-core leaf helpers across production (openclaw#120350)
  fix(release): scope upgrade plugin credentials (openclaw#120666)
  fix(ai): preserve long Responses sessions after server compaction (openclaw#120457)
  fix(test): keep fork E2E setup builds observable (openclaw#120653)
  fix(cloud-workers): retain provider operation ownership (openclaw#120661)
  docs: runners plan — one placement model for sessions, devices, and cloud (openclaw#120657)
  refactor(cli): inline state migration policy (openclaw#120641)
  feat(update): scheduled update campaigns with countdown, dev-channel auto-update, and Updates settings page (openclaw#120506)
  chore(i18n): refresh native locales (openclaw#120614)
  fix(ci): retry transient artifact API reads (openclaw#120654)
  fix(clawrouter): honor advertised reasoning efforts (openclaw#120631)
  fix(infra): unify env-truthiness, missing-path, realpath, and abort-sleep semantics (openclaw#120359)
  fix(maintainers): parse merge comment URL structurally (openclaw#120649)
  fix(ui): label only operator-pinned runtimes in model picker rows (openclaw#120646)
  docs(agents): replace exact-head re-review gate with 12-hour review window

# Conflicts:
#	src/agents/payload-redaction.ts
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: clawrouter Extension: clawrouter maintainer Maintainer-authored PR merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant