Skip to content

fix(ui): show only Standard and Fast for OpenAI speed#100190

Merged
steipete merged 1 commit into
mainfrom
codex/openai-speed-picker
Jul 5, 2026
Merged

fix(ui): show only Standard and Fast for OpenAI speed#100190
steipete merged 1 commit into
mainfrom
codex/openai-speed-picker

Conversation

@steipete

@steipete steipete commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where OpenAI users opening the Control UI model picker would see four speed choices—Default, Fast, Standard, and Auto—even though OpenAI exposes only the standard and priority service tiers.

Why This Change Was Made

The OpenAI picker now presents only Standard and Fast, ordered Standard first. Selection follows the effective session state so inherited Fast remains visible; legacy Auto remains unselected until the user explicitly chooses one of the supported binary modes. Other providers retain their existing choices.

User Impact

OpenAI users now get an unambiguous two-choice speed control matching the provider contract.

Evidence

  • Reproduced the four-choice OpenAI picker in the running Control UI.
  • OPENCLAW_HEAVY_CHECK_LOCK_SCOPE=worktree OPENCLAW_VITEST_FS_MODULE_CACHE_PATH=/tmp/openclaw-speed-picker-vitest node scripts/run-vitest.mjs ui/src/lib/chat/model-select-state.test.ts — 11 tests passed.
  • OPENCLAW_HEAVY_CHECK_LOCK_SCOPE=worktree node scripts/run-tsgo.mjs -p tsconfig.core.json — passed.
  • .agents/skills/autoreview/scripts/autoreview --mode local --stream-engine-output — clean after addressing effective/inherited mode selection.
  • Verified the dependency contract in sibling Codex sources: codex-rs/protocol/src/config_types.rs, codex-rs/protocol/src/openai_models.rs, codex-rs/core/src/session/mod.rs, and their service-tier tests. Codex maps Standard to the default tier and Fast to priority.

AI-assisted: implemented and reviewed with Codex; maintainer-directed change.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Jul 5, 2026
@steipete steipete self-assigned this Jul 5, 2026
@clawsweeper

clawsweeper Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 5, 2026, 4:16 AM ET / 08:16 UTC.

Summary
The PR changes the Control UI chat speed-state resolver and tests so OpenAI models show a Standard/Fast picker, plus a changelog entry.

PR surface: Source +16, Tests +62, Docs +1. Total +79 across 3 files.

Reproducibility: yes. Current main source shows OpenAI receives the generic four-option speed picker, and PR-head source shows the inherited/default-state regressions without needing a live UI run.

Review metrics: 1 noteworthy metric.

  • OpenAI speed choices: 4 generic choices narrowed to 2 OpenAI choices. The semantic reduction changes how users persist or clear session fast-mode overrides, so compatibility needs review before merge.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🧂 unranked krab
Result: blocked until real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Fix the inherited/default speed-state path so selected inherited clicks do not persist overrides and stored overrides can be cleared.
  • [P1] Add redacted after-fix Control UI proof, preferably a screenshot or short recording that shows the OpenAI picker and the clear/inherit behavior.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body has tests, CI, and a before-fix observation, but no after-fix screenshot, recording, terminal output, live output, linked artifact, or redacted logs showing the changed Control UI picker. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Mantis proof suggestion
A short visual Control UI proof would materially show the OpenAI speed picker and inherited/default behavior that unit tests alone do not demonstrate. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis visual task: verify the Control UI OpenAI speed picker shows Standard/Fast and users can clear or inherit speed without selected inherited clicks pinning overrides.

Risk before merge

  • [P1] Merging as-is can leave OpenAI users without a picker path to clear a stored session speed override and return to inherited/default speed.
  • [P1] Merging as-is can turn inherited OpenAI Fast or Standard state into an explicit session override when the already selected option is clicked.
  • [P1] The PR still has no after-fix real Control UI proof showing the changed picker and inheritance/clearing behavior.

Maintainer options:

  1. Restore inherited/default speed semantics (recommended)
    Keep the two OpenAI service-tier choices while adding a clear/inherit path and preventing selected inherited clicks from persisting session overrides.
  2. Accept binary-only persistence
    Maintainers could intentionally accept that the OpenAI picker becomes binary-only, but that should be an explicit compatibility/product choice.
  3. Hold for visual proof
    Pause merge until after-fix Control UI proof shows the OpenAI picker and the inherited/default recovery path.

Next step before merge

  • [P1] The maintainer-labeled PR has concrete UI state defects plus missing after-fix real behavior proof, so it needs author or maintainer follow-up rather than cleanup closure or automated repair.

Security
Cleared: The diff only changes Control UI resolver/test logic and a changelog line, with no new dependency, workflow, secret, permission, or code-execution surface.

Review findings

  • [P1] Preserve inherited speed on selected clicks — ui/src/lib/chat/model-select-state.ts:205-210
  • [P1] Keep a Default path for OpenAI speed overrides — ui/src/lib/chat/model-select-state.ts:225-229
Review details

Best possible solution:

Keep the OpenAI Standard/Fast simplification, but preserve an inherit/clear state for stored overrides and make selected inherited choices no-op, then add real Control UI proof.

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

Yes. Current main source shows OpenAI receives the generic four-option speed picker, and PR-head source shows the inherited/default-state regressions without needing a live UI run.

Is this the best way to solve the issue?

No. Narrowing OpenAI to Standard/Fast matches the Codex service-tier contract, but this patch is not the best final fix until it preserves clearing and inherited selected-state behavior.

Full review comments:

  • [P1] Preserve inherited speed on selected clicks — ui/src/lib/chat/model-select-state.ts:205-210
    OpenAI rows with no stored fastMode can now render inherited Fast or Standard as selected, but clicking that selected option still flows through switchChatFastMode, which only no-ops against stored activeRow.fastMode. That writes a session override instead of preserving inheritance.
    Confidence: 0.92
  • [P1] Keep a Default path for OpenAI speed overrides — ui/src/lib/chat/model-select-state.ts:225-229
    The OpenAI option list no longer includes the empty value that switchChatFastMode uses to send fastMode: null and clear an override. Choosing Standard stores false, so users cannot return an OpenAI chat to inherited config/agent/model speed from this picker. Late discovery: this was already visible in earlier reviewed heads.
    Confidence: 0.9
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.9

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

  • P2: The PR addresses a bounded Control UI bug, but the remaining defects affect persisted session speed settings.
  • merge-risk: 🚨 compatibility: The diff can remove the OpenAI clear/inherit affordance and pin inherited fast-mode settings as session overrides.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🧂 unranked krab.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body has tests, CI, and a before-fix observation, but no after-fix screenshot, recording, terminal output, live output, linked artifact, or redacted logs showing the changed Control UI picker. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source +16, Tests +62, Docs +1. Total +79 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 24 8 +16
Tests 1 62 0 +62
Docs 1 1 0 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 87 8 +79

What I checked:

Likely related people:

  • shakkernerd: Merged Control UI architecture work added the current model-select-state, chat controls, and chat session modules that now own the speed picker flow. (role: introduced current Control UI chat settings surface; confidence: high; commits: 65e12328aa20; files: ui/src/lib/chat/model-select-state.ts, ui/src/pages/chat/components/chat-model-controls.ts, ui/src/pages/chat/chat-session.ts)
  • steipete: The PR is assigned to steipete and current path history shows prior fast-mode/runtime work in src/agents/fast-mode.ts and session-related changes. (role: current assignee and fast-mode adjacent contributor; confidence: medium; commits: dddf871ad969, 6df0fb818d67, 58d32da27bfa; files: src/agents/fast-mode.ts, src/gateway/session-utils.ts, ui/src/lib/chat/model-select-state.ts)
  • vincentkoc: Recent history on fast-mode resolution includes the auto-mode forward-port that feeds the effective fast-mode state consumed by this UI. (role: fast-mode feature contributor; confidence: medium; commits: 2b75806197ab; files: src/agents/fast-mode.ts, src/gateway/session-utils.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.
Review history (7 earlier review cycles)
  • reviewed 2026-07-05T06:21:44.940Z sha e4c69c8 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-05T06:45:53.418Z sha d184bf5 :: needs real behavior proof before merge. :: [P2] Avoid pinning inherited Fast when the selected option is clicked
  • reviewed 2026-07-05T06:54:22.383Z sha d184bf5 :: needs real behavior proof before merge. :: [P2] Preserve inherited speed state on selected clicks
  • reviewed 2026-07-05T07:13:01.751Z sha 63576ba :: needs real behavior proof before merge. :: [P2] Preserve inherited speed state on selected clicks
  • reviewed 2026-07-05T07:20:25.708Z sha 63576ba :: needs real behavior proof before merge. :: [P2] Preserve inherited speed state on selected clicks
  • reviewed 2026-07-05T07:37:33.888Z sha 687db25 :: needs real behavior proof before merge. :: [P2] Preserve inherited speed on selected clicks
  • reviewed 2026-07-05T07:45:04.906Z sha 687db25 :: needs real behavior proof before merge. :: [P2] Preserve inherited speed on selected clicks

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e4c69c8a40

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

? "off"
: "";
const isOpenAI = effectiveProvider === "openai";
const effectiveOpenAIMode = activeRow?.effectiveFastMode ?? activeRow?.fastMode;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve inherited speed state on selected clicks

When an OpenAI row inherits speed from config/agent/default (fastMode is undefined but effectiveFastMode is true/false, which sessions.list emits), this makes Fast/Standard render as the selected option. The click path still no-ops only when previousFastMode === next in switchChatFastMode, so clicking the already-selected choice sends sessions.patch with a session-level fastMode override and breaks future inheritance. Either keep inherited state distinct or make the handler compare against the effective mode before patching.

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 5, 2026
@steipete

steipete commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready on exact head e4c69c8a40dba463a6a3c20dea487f658194eab7.

Proof:

  • OPENCLAW_HEAVY_CHECK_LOCK_SCOPE=worktree OPENCLAW_VITEST_FS_MODULE_CACHE_PATH=/tmp/openclaw-speed-picker-vitest node scripts/run-vitest.mjs ui/src/lib/chat/model-select-state.test.ts — 11 passed.
  • OPENCLAW_HEAVY_CHECK_LOCK_SCOPE=worktree node scripts/run-tsgo.mjs -p tsconfig.core.json — passed.
  • Fresh Codex autoreview — clean after correcting inherited/effective Fast selection.
  • Exact-head CI run 28731728643 attempt 2 — success. Initial QA aggregate and a broad Vitest shard were transient; all 83 QA scenarios passed on attempt 1, and both jobs passed on rerun.
  • scripts/pr review-validate-artifacts 100190 and scripts/pr prepare-run 100190 — passed.

OpenAI now exposes only Standard and Fast in the picker. Other providers retain their existing choices; inherited Fast and legacy Auto normalization are covered.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: whatsapp-web Channel integration: whatsapp-web app: ios App: ios app: macos App: macos scripts Repository scripts extensions: qa-lab plugin: google-meet size: XL and removed size: S labels Jul 5, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d184bf5d41

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/tui/commands.ts
Comment on lines 35 to 37
const COMMAND_ALIASES: Record<string, string> = {
elev: "elevated",
gwstatus: "gateway-status",
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore the /elev alias mapping

When a TUI user enters the still-advertised /elev full shortcut, parseCommand now falls through to COMMAND_ALIASES after resolveTextCommand finds no registry alias for /elev, but this map no longer rewrites elev to elevated. The command handler only has a case for elevated, so /elev ... is treated as an arbitrary slash message and sent to the model instead of patching the elevated mode.

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jul 5, 2026
@clawsweeper clawsweeper Bot added the status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. label Jul 5, 2026
@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations agents Agent runtime and tooling labels Jul 5, 2026
@steipete
steipete force-pushed the codex/openai-speed-picker branch from 63576ba to 687db25 Compare July 5, 2026 07:32
@openclaw-barnacle openclaw-barnacle Bot added size: S and removed docs Improvements or additions to documentation channel: whatsapp-web Channel integration: whatsapp-web app: ios App: ios app: macos App: macos scripts Repository scripts commands Command implementations agents Agent runtime and tooling extensions: qa-lab plugin: google-meet size: XL labels Jul 5, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Jul 5, 2026
@steipete
steipete force-pushed the codex/openai-speed-picker branch from 687db25 to 58d32da Compare July 5, 2026 08:03

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 58d32da27b

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +226 to +229
? [
{ value: "off", label: "Standard" },
{ value: "on", label: "Fast" },
]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve a way to clear OpenAI speed overrides

When an OpenAI session already has a session-level speed override, this OpenAI-only option list no longer includes the empty Default value. The picker’s handler only clears an override when switchChatFastMode receives ""; choosing Standard sends fastMode: false, so users cannot return an OpenAI chat to model/agent/config inheritance from the picker after choosing Fast or Standard. Keep a clear/default affordance or otherwise route the intended inherited state to the empty value.

Useful? React with 👍 / 👎.

@steipete
steipete force-pushed the codex/openai-speed-picker branch from 58d32da to 59a1b36 Compare July 5, 2026 08:18
@steipete
steipete force-pushed the codex/openai-speed-picker branch from 59a1b36 to 217521a Compare July 5, 2026 08:28
@steipete
steipete merged commit 8b229a9 into main Jul 5, 2026
124 of 125 checks passed
@steipete
steipete deleted the codex/openai-speed-picker branch July 5, 2026 08:46
@steipete

steipete commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui 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: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant