Skip to content

fix: stop offering Fast when the selected request cannot use it - #141852

Merged
obviyus merged 2 commits into
mainfrom
fix/model-fast-applicability
Sep 8, 2026
Merged

obviyus merged 2 commits into
mainfrom
fix/model-fast-applicability

Conversation

@obviyus

@obviyus obviyus commented Sep 8, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Control UI allowed Fast to be saved for requests where it had no effect.

Why This Change Was Made

Request construction and provider policy now share an applicability plan. The selected route, authentication, and existing parameters supply an optional result to the UI, which disables confirmed no-op choices and preserves behavior when applicability is unknown.

User Impact

Saved Fast preferences stay visible and clearable. Supported requests remain usable; applicability does not promise entitlement, fulfillment, or speed.

Evidence

Real Gateway/browser checks reproduced the ineffective Fast choice and verified that the fix disables it, permits clearing a saved preference, retains supported Fast, and preserves unknown-applicability behavior. Public session readback confirmed selections. Provider/request, UI, metadata, and config checks passed. CI retained two unrelated failures with separate reproductions; it was not wholly green.

Consumers: Control UI Fast controls now honor confirmed request applicability.

Related: #136257.

@obviyus obviyus self-assigned this Sep 8, 2026
@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling extensions: anthropic size: M maintainer Maintainer-authored PR labels Sep 8, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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. labels Sep 8, 2026
@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 8, 2026, 2:24 AM ET / 06:24 UTC.

ClawSweeper review

What this changes

Shares Anthropic Fast applicability between request construction and the model catalog, then disables ineffective Control UI choices while keeping saved preferences clearable.

Merge readiness

⛔ Blocked before merge - 1 item remains

The repair remains useful: current main and v2026.9.2 still offer Fast based on provider alone. No blocking correctness finding remains, and the updated body addresses the earlier request for live Gateway/UI observations.

Priority: P2
Reviewed head: ac933c865d6f7ee3def8122aba5c50dee3d95c9c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, documented repair with meaningful boundary coverage and no blocking code finding; reported live observations address the earlier follow-up.
Proof confidence 🌊 off-meta tidepool Not applicable: Repository State identifies a MEMBER-authored PR, so the external-contributor proof gate does not apply. The updated body reports matching built Gateway/UI observations for all four previously requested cases; source identity checks support carrying those observations to this head, but no attached captures were available for independent inspection.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Repository State identifies a MEMBER-authored PR, so the external-contributor proof gate does not apply. The updated body reports matching built Gateway/UI observations for all four previously requested cases; source identity checks support carrying those observations to this head, but no attached captures were available for independent inspection.
Evidence reviewed 8 items Current main still needs the repair: The current-main Fast selector uses provider support and saved preferences without selected-request applicability.
Latest release retains provider-only behavior: The v2026.9.2 selector also gates Fast by provider rather than selected-request applicability; no implemented-on-main or shipped-fix closure is supported.
Shared policy and preserved parameter precedence: The resolver uses prepared selected-route and auth facts, preserves unresolved routes as unknown, and merges parameters in the same order as embedded request construction. The Anthropic wrapper consumes the same policy.
Findings None None.
Security None None.

How this fits together

The Gateway combines model, route, authentication, and configuration facts into the catalog consumed by the Control UI. Anthropic request construction shares the applicability policy that determines whether the Fast control can affect a request.

flowchart LR
  A[Selected model and route] --> C[Anthropic applicability policy]
  B[Auth and request settings] --> C
  C --> D[Gateway model catalog]
  C --> E[Anthropic request construction]
  D --> F[Control UI Fast choice]
  F --> G[Set or clear session preference]
Loading

Before merge

  • Resolve merge risk (P1) - The optional provider hook becomes a plugin contract that controls Fast availability: an incorrect false result can disable a usable choice, so its documented distinction between unsupported and unknown must remain stable.
Agent review details

Security

None.

PR surface

Source +203, Tests +193, Docs +12, Other +4. Total +412 across 19 files.

View PR surface stats
Area Files Added Removed Net
Source 12 253 50 +203
Tests 3 193 0 +193
Docs 3 13 1 +12
Config 0 0 0 0
Generated 0 0 0 0
Other 1 4 0 +4
Total 19 463 51 +412

Review metrics

Metric Value Why it matters
Public capability surface 1 optional provider hook and 1 optional catalog field The additive contract controls UI availability without adding configuration or migrating stored preferences.

Merge-risk options

Maintainer options:

  1. Accept the documented optional contract (recommended)
    Retain the additive hook with unknown-preserving behavior and saved-preference clearing as its compatibility guarantees.

Technical review

Best possible solution:

Keep one provider-owned applicability policy shared by request construction and catalog projection, preserving unknown behavior and saved-preference clearing.

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

Yes, from source: current main offers Fast for Anthropic generally even when its request wrapper has no applicable mapping. The body also reports a baseline live reproduction; this review did not execute it.

Is this the best way to solve the issue?

Yes. Sharing the provider's request policy avoids a second model-support list in the UI, while optional metadata preserves unknown cases and existing preferences.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 8e47d6998abd.

Labels

Label justifications:

  • P2: This repairs misleading Fast controls with limited impact on the model-selection workflow.
  • merge-risk: 🚨 compatibility: The new optional plugin hook establishes a support contract that can disable existing Fast controls.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Repository State identifies a MEMBER-authored PR, so the external-contributor proof gate does not apply. The updated body reports matching built Gateway/UI observations for all four previously requested cases; source identity checks support carrying those observations to this head, but no attached captures were available for independent inspection.

Evidence

What I checked:

  • Current main still needs the repair: The current-main Fast selector uses provider support and saved preferences without selected-request applicability. (ui/src/lib/chat/model-select-state.ts:378, 8e47d6998abd)
  • Latest release retains provider-only behavior: The v2026.9.2 selector also gates Fast by provider rather than selected-request applicability; no implemented-on-main or shipped-fix closure is supported. (ui/src/lib/chat/model-select-state.ts, 3928bad9badf)
  • Shared policy and preserved parameter precedence: The resolver uses prepared selected-route and auth facts, preserves unresolved routes as unknown, and merges parameters in the same order as embedded request construction. The Anthropic wrapper consumes the same policy. (src/agents/model-fast-mode.ts:43, ac933c865d6f)
  • Implementation boundary: The policy uses OpenClaw's own llm-core model contracts and returns unknown for other runtimes. The runtime-name guard does not execute or validate a Codex harness contract, so sibling Codex inspection is not required for this change. (extensions/anthropic/fast-mode-policy.ts:26, ac933c865d6f)
  • Re-review evidence and runtime identity: The complete supplied body, captured in context revision 64b83923690beba2230eb3bcea0a12afe9a494ffa6afc4b4b7ac85080f52c65b, reports baseline behavior and candidate observations for fresh unsupported selection, saved-preference clearing, supported selection, and unknown applicability with public session readback. These are author-reported observations, not reviewer-executed proof. Tree inspection confirms the policy, resolver, Gateway projection, UI selector, and stream wrapper have identical blobs at the exercised candidate and reviewed head; the follow-up commit changes only the type declaration and Swift bindings. (ac933c865d6f)
  • Additive plugin contract is documented: The documented optional hook distinguishes confirmed unsupported, supported, and unknown results, publishes only a boolean, preserves preference clearing, and does not reject slash commands. Public docs: docs/plugins/sdk-provider-plugins.md. (docs/plugins/sdk-provider-plugins.md:928, ac933c865d6f)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Ayaan Zaidi: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (2 earlier review cycles)
  • reviewed 2026-09-08T04:59:45.196Z sha 5437135 :: blocked before merge. :: none
  • reviewed 2026-09-08T05:15:45.698Z sha ac933c8 :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 8, 2026
@obviyus

obviyus commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

landpr-approve-unrelated-red
pr: 141852
head: ac933c8
run: 34189519641 attempt: 1
failed: checks-node-compact-large-11 job=101944641146 conclusion=failure
failed: checks-node-compact-small-31 job=101944643046 conclusion=failure
check: openclaw/ci-gate

These completed failures are unrelated to the Fast applicability change:

  • Provider transport failure: the preceding prepared-model-catalog-worker test leaves a manifest mock without loadPluginManifestRegistryForInstalledIndex. The same real two-test failure occurs with every Fast change removed at main baseline ef2a259. The transport test passes alone. This isolates an existing mock-lifetime interaction, not a Fast request or metadata failure.
  • Lint-status failure: the self-contained fixture fails during synthetic prepare-process cleanup, before its synthetic lint commands run. Its copied scripts, fixture helpers and dependency lock are identical to baseline; it imports no Fast product code. The one original-main control passes, so the intermittent cleanup failure itself is not claimed as locally reproduced.

The sparse mock is present in 1cb9f70, authored by joshavant and committed by Josh Avant. The normal-exit cleanup branch is present in 651c1ec (#132251), authored by Peter Steinberger and committed by GitHub. Their parent diffs and ancestry were checked. These identify existing owners; neither attribution claims that one commit alone caused the complete interaction.

Main run34187578388 is successful but has a different selected test set. The inspected recent completed main failures34182839906 and34178987125 concern other checks. No matching-main-run claim is made; the explicit causal record supports the standing unrelated-red exception. All original failure evidence remains retained. The normal exact-head local-review and server merge checks still apply.

@obviyus

obviyus commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

landpr-approve-unrelated-red
pr: 141852
head: ac933c8
run: 34189519641 attempt: 1
failed: checks-node-compact-large-11 job=101944641146 conclusion=failure
failed: checks-node-compact-small-31 job=101944643046 conclusion=failure
check: openclaw/ci-gate

@obviyus
obviyus merged commit 849c962 into main Sep 8, 2026
194 of 197 checks passed
@obviyus
obviyus deleted the fix/model-fast-applicability branch September 8, 2026 06:30
@obviyus

obviyus commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

Landed after a clean exact-head local review and independent public acceptance of all four clauses.

Bug: the Control UI offered Fast for Sonnet requests with no Fast mapping.
Fix: request construction and model metadata share the provider's applicability plan. Confirmed no-op choices are disabled; unknown behavior and saved-preference clearing remain usable.

Before After
Fresh Sonnet could enable ineffective Fast. The actual served UI disables the switch.
Saved preferences needed a safe clearing path. A saved Sonnet preference remains clearable; public readback omits the cleared override.
Supported and unknown requests needed to remain usable. Opus and the unknown-applicability control both save Fast on the selected model.

Proof uses matching built Gateway/UI 897e3b2e and real browser actions with public session readback. The later exact head changes only type declarations and generated Swift fields. Two prior fixture runtime failures remain recorded. This does not claim vendor entitlement, fulfillment, latency or restart persistence. Focused provider, UI, metadata and config-doc checks passed; no local build or typecheck ran.

The guarded merge used the standing unrelated-CI record, with complete causal explanation:

  • Run34189519641/job101944641146: the provider-transport test receives an incomplete manifest mock from the preceding prepared-worker test. The same two-test failure occurs on main baseline ef2a2599 with all Fast changes removed; the transport test passes alone. The sparse mock originates in 1cb9f70c, authored by joshavant and committed by Josh Avant. Its parent diff and ancestry were verified; this identifies the existing owner, not sole responsibility for the interaction.
  • Run34189519641/job101944643046: synthetic prepare-process cleanup fails before the fixture runs lint. Its copied scripts, helpers and dependency lock are unchanged, and it imports no Fast product code. The original-main control passes; the intermittent failure itself was not reproduced locally. The normal-exit cleanup branch originates in 651c1ec2 (fix(macos): isolate native test process resources #132251), authored by Peter Steinberger and committed by GitHub, with its parent diff and ancestry verified.

Main34187578388 passed with a different selected test set. Inspected main failures 34182839906/job101925587161 and 34178987125/job101914126955 concern other checks. No matching-main-job claim is made; the explicit causal record supports the exception. The CI run remains recorded as red.

obviyus added a commit that referenced this pull request Sep 9, 2026
Related: #136257, #141852

## What Problem This Solves

Fixes an issue where users could enable a Fast choice that has no effect for a selected OpenAI, xAI, or MiniMax request. Models without a Fast alias and OpenAI requests controlled by an explicit service tier still fell back to provider-wide support.

## Why This Change Was Made

Provider metadata shares the existing alias and service-tier rules with request construction. The existing selected-model capability field carries the result to controls. Explicit-tier precedence, unknown native capability, and saved-preference clearing stay intact.

The rules use existing lightweight internal entries. MiniMax pricing and its proposed M3 paid lane remain separate work in #107378.

## User Impact

Known no-op Fast choices are disabled, while supported requests keep their current mapping. Typed `/fast` commands continue to set or clear preferences. The capability describes local request mapping; it makes no speed, pricing, entitlement, or native-runtime claim.

## Evidence

The real compiled Gateway and its authenticated client produced these results:

| Selected non-native request | Baseline capability | Candidate capability |
| --- | --- | --- |
| xAI `grok-4.3` | absent | false |
| xAI `grok-3` | absent | true |
| MiniMax `MiniMax-M2.5` | absent | false |
| MiniMax `MiniMax-M2.7` | absent | true |
| OpenAI Responses with explicit `flex` | absent | false |
| OpenAI Responses without an explicit tier | absent | true |

- All six rows remain available under the selected OpenClaw runtime. Public output excludes credentials, endpoints and private parameter records.
- Fresh independent acceptance passed all six metadata clauses after its own nonce command. Both Gateway runs stopped; the independent service recorded no remaining processes and enforced memory, CPU and swap limits.
- 43 focused checks pass: provider rules, selected-model/agent parameters, dynamic aliases, composed OpenAI/ChatGPT tier precedence, and the corrected auth-refresh expectation. Formatting and lint pass; the changed assertion and normal hooks were verified on Testbox.
- Baseline source is `127e3ffa3080841cef31927c57071c7ae9ae52ae`, exercised through source-equivalent build `1b284af37e091fab9fc58297e4478a0f701ed6fd`. Candidate proof uses actual CI build `d85807c2b634c885fd1d5caa2d17c99cf5601d9f` from run [34291602461](https://github.com/openclaw/openclaw/actions/runs/34291602461). The later commit changes only the expected metadata in one test, so production proof remains valid at its original build identity.
- The earlier CI run caught that expected-row mismatch and two channel test timeouts before their injected reply callbacks. Full history is retained; those timeouts are not claimed fixed. Current results are in [PR checks](https://github.com/openclaw/openclaw/pull/142682/checks).
- Generic control, unknown-case and preference-clearing proof from #141852 is retained for unchanged consumers. Fresh acceptance covers the new public metadata; it does not claim browser clicks or vendor inference.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 9, 2026
…claw#141852)

## What Problem This Solves

The Control UI offers Fast for some selected requests that cannot use it. Sonnet 5 can enable and save Fast even though its Anthropic request has neither native Fast nor Priority Tier mapping.

## Why This Change Was Made

Anthropic request construction and the lightweight provider policy now share one applicability plan. The private model projection uses the selected route, authentication and existing parameters to publish an optional result. The UI disables confirmed no-op choices and preserves existing behavior when applicability is unknown.

## User Impact

Saved Fast preferences remain visible and clearable. Mapped Opus requests remain usable. Preference inheritance, explicit service-tier precedence, native runtime behavior and transport restrictions stay intact. Applicability does not imply vendor entitlement, fulfillment or speed.

## Evidence

- The real baseline Gateway and matching served UI offered and saved Sonnet Fast. Clearing the preference and the Opus control also worked.
- The candidate built Gateway and served UI disable fresh Sonnet Fast, allow clearing a saved Sonnet preference, and allow Opus Fast with matching public session readback. An independent validator confirmed those three clauses.
- The same independent validator freshly passed the remaining unknown-applicability control: API control was selected, Fast remained usable with applicability absent, and public readback recorded the preference on that model. All four public clauses pass. Both earlier unavailable-runtime fixture failures remain preserved; the final fixture uses the documented model-scoped runtime setting, without installing a native plugin.
- The public runtime is build `897e3b2e`, produced by required CI from candidate `54371355`. Current head `ac933c86` adds only a type declaration correction and generated Swift fields; the exercised Linux runtime and UI are unchanged.
- 53 provider/request checks, 11 focused UI checks, 3 metadata checks using the real lightweight policy loader, and 7 existing config-doc checks passed. Focused boundary checks and pinned formatting passed. No local build or typecheck ran.
- Exact-head CI run 34189519641 completed with two unrelated failures. The provider-transport failure reproduces with all Fast changes removed and passes without the preceding leaking mock. The lint-status failure occurs in its unchanged synthetic command/process-cleanup fixture before lint runs. Both remain recorded with their causal evidence.

Related: openclaw#136257

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 9, 2026
…#142682)

Related: openclaw#136257, openclaw#141852

## What Problem This Solves

Fixes an issue where users could enable a Fast choice that has no effect for a selected OpenAI, xAI, or MiniMax request. Models without a Fast alias and OpenAI requests controlled by an explicit service tier still fell back to provider-wide support.

## Why This Change Was Made

Provider metadata shares the existing alias and service-tier rules with request construction. The existing selected-model capability field carries the result to controls. Explicit-tier precedence, unknown native capability, and saved-preference clearing stay intact.

The rules use existing lightweight internal entries. MiniMax pricing and its proposed M3 paid lane remain separate work in openclaw#107378.

## User Impact

Known no-op Fast choices are disabled, while supported requests keep their current mapping. Typed `/fast` commands continue to set or clear preferences. The capability describes local request mapping; it makes no speed, pricing, entitlement, or native-runtime claim.

## Evidence

The real compiled Gateway and its authenticated client produced these results:

| Selected non-native request | Baseline capability | Candidate capability |
| --- | --- | --- |
| xAI `grok-4.3` | absent | false |
| xAI `grok-3` | absent | true |
| MiniMax `MiniMax-M2.5` | absent | false |
| MiniMax `MiniMax-M2.7` | absent | true |
| OpenAI Responses with explicit `flex` | absent | false |
| OpenAI Responses without an explicit tier | absent | true |

- All six rows remain available under the selected OpenClaw runtime. Public output excludes credentials, endpoints and private parameter records.
- Fresh independent acceptance passed all six metadata clauses after its own nonce command. Both Gateway runs stopped; the independent service recorded no remaining processes and enforced memory, CPU and swap limits.
- 43 focused checks pass: provider rules, selected-model/agent parameters, dynamic aliases, composed OpenAI/ChatGPT tier precedence, and the corrected auth-refresh expectation. Formatting and lint pass; the changed assertion and normal hooks were verified on Testbox.
- Baseline source is `beca6a1c05d9dad59a9abbe6de226ac350f3a3ec`, exercised through source-equivalent build `1b284af37e091fab9fc58297e4478a0f701ed6fd`. Candidate proof uses actual CI build `d85807c2b634c885fd1d5caa2d17c99cf5601d9f` from run [34291602461](https://github.com/openclaw/openclaw/actions/runs/34291602461). The later commit changes only the expected metadata in one test, so production proof remains valid at its original build identity.
- The earlier CI run caught that expected-row mismatch and two channel test timeouts before their injected reply callbacks. Full history is retained; those timeouts are not claimed fixed. Current results are in [PR checks](https://github.com/openclaw/openclaw/pull/142682/checks).
- Generic control, unknown-case and preference-clearing proof from openclaw#141852 is retained for unchanged consumers. Fresh acceptance covers the new public metadata; it does not claim browser clicks or vendor inference.

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation extensions: anthropic gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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