Skip to content

🤖 fix: make Fast mode follow the chat for every provider - #6830

Merged
ammario merged 8 commits into
mainfrom
fast-mode-xhbx
Oct 16, 2026
Merged

ammario merged 8 commits into
mainfrom
fast-mode-xhbx

Conversation

@ammar-agent

@ammar-agent ammar-agent commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fast mode (and Ultrafast) now follows the same persistence and visibility rules as the reasoning level, for every provider (OpenAI, Anthropic, xAI):

Background

#6088 made OpenAI speed chat-scoped. Anthropic (speed: "fast") and xAI (service_tier) were left out on purpose, so their toggle still wrote providers.jsonc. As a result, the selector indicator, the shortcut, the palette and /fast read and wrote state that belonged to the provider, not to the chat. Switching a chat between Opus, Grok and GPT changed whether Fast showed as on, and toggling Fast on Opus in one chat turned it on in every Opus chat.

Implementation

  • Frontend. resolveChatServiceTier(provider, chatTier, providersConfig) is the one source of truth. The chat's choice ("priority" means Fast for any provider) comes first; a chat with no choice inherits the provider default (Anthropic speed: "fast" or the provider's serviceTier). The selector, the global shortcut and /fast / /ultrafast all read it and write through setWorkspaceServiceTier, the same path reasoning uses. That path keeps an unsent choice until the next send and nudges the active turn. On a creation draft it saves to the draft record.
  • The Fast/Ultrafast shortcut acts on the chat that owns the key event: a focused /side chat (getSideChatPaneWorkspaceId, the lookup paneHandlesKeyEvent uses), else the routed chat or creation draft. Key repeats are ignored, so holding the chord produces one change.
  • Removed the now-unused provider-wide toggle helpers (applyFastModeToggle, the restore-target writers, isFastModeActive) and their tests. Settings → Providers still controls the provider default.
  • Backend (providerModelFactory). The chat's choice already reaches the factory (as the OpenAI tier, plus the live getServiceTierOverride). The factory now reads it before non-OpenAI routes remove it:
    • Anthropic: speed: "fast" is pinned from the chat's choice, or from the provider setting if there is none. A mid-turn change applies to the next call through the same live-override path OpenAI uses.
    • xAI (frontier Grok only): the choice is mapped to priority/default and applied per request. An explicit providerOptions.xai.serviceTier still wins, including over live changes.
    • The logic lives in small helpers (readChatServiceTier, resolveAnthropicFastMode, resolveXAIServiceTier) so createModelCoreEffect's complexity (CC) does not grow.
  • Continuous compaction summaries run at the chat's speed. AgentSession's send-options-to-provider-options helper moved to common/utils/ai/chatServiceTier.ts and is shared with the summarizer.
  • Docs are updated.

Validation

  • Factory tests check the request body that is actually sent:
    • The chat's choice overrides the Anthropic provider speed in both directions.
    • A mid-turn change flips speed between calls.
    • xAI service_tier follows the chat's choice on each request, and an explicit xAI tier wins.
    • Non-frontier Grok is left unchanged.
    • These tests fail with the factory change reverted.
  • Continuous-compaction test: the summary model is created with the chat's tier. It fails with the change reverted.
  • Draft test: speed and Pro choices on a creation draft are stored on the draft next to its thinking level, resolve from it, and write no project defaults; the next draft starts clean.
  • getSideChatPaneWorkspaceId is covered next to the existing paneHandlesKeyEvent tests.
  • /fast tests:
    • Anthropic and xAI choices stay on the chat: no provider write, no effect on other chats.
    • Turning off an inherited provider Fast default pins Standard on this chat only.
  • The tests/ui thinking-selector flow checks that Fast turned on in a Grok chat is still on after switching back to GPT. It could not run locally because Node 20 lacks Promise.withResolvers. CI runs it.

Risks

Medium-low.

  • This changes the Fast-mode request options for Anthropic and xAI. An existing chat that saved an explicit Standard choice (for example by turning OpenAI Fast off) now also sends Standard on Opus or Grok, even if the provider default is Fast. That is the intended "follows the chat" behaviour.
  • No new persisted fields: speed and Pro use the existing per-chat settings and the creation-draft fields from 🤖 refactor: one record per creation draft, so the project selector moves the draft #6620.
  • Unsupported routes and models are still gated in the same places as before.

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

@mintlify

mintlify Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
Mux 🟢 Ready View Preview Oct 16, 2026, 9:02 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T21:03:49.577620Z 4c94354 Manual request
🔒 Security Review ✅ Completed 2026-10-16T21:07:45.749382Z 4c94354 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: e9216f2e44

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

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

Copy link
Copy Markdown

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: e9216f2e44

ℹ️ 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/browser/App.tsx Outdated
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Fast-mode shortcut now ignores key repeats, like Ultrafast. Please take another look.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: ae7e32816d

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: ae7e32816d

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Added: a speed choice on the new-workspace page is now saved as the project/global default, like the thinking level, and existing chats fall back to it. Please take another look.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: aa0577713b

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

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

Copy link
Copy Markdown

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: aa0577713b

ℹ️ 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/node/services/providerModelFactory.ts
Comment thread src/browser/utils/workspaceAiSettingsSync.ts Outdated
Comment thread src/node/services/providerModelFactory.ts
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Addressed the explicit xAI tier precedence and continuous-compaction speed findings; replied on the backend-defaults thread (matches thinking level by design). Please take another look.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 047524ce26

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 047524ce26

ℹ️ 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".

@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Added: Pro/Cyber reasoning mode on the new-workspace page is now saved as the project/global default too (same rules as speed and thinking level). Please take another look.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 6cde90fc94

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 6cde90fc94

ℹ️ 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".

Anthropic and xAI Fast mode still wrote provider-wide config, so the toggle
followed the model. Use the chat's serviceTier pick for all Fast-mode providers,
like the reasoning level, and map it to Anthropic speed / xAI service_tier.
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Rebased onto main (no conflicts); no code changes since the last review.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 5c60f863ef

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

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

Copy link
Copy Markdown

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: 5c60f863ef

ℹ️ 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/browser/utils/scopedAiDefaults.ts Outdated
Comment thread src/browser/utils/workspaceAiSettingsSync.ts Outdated

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

Copy link
Copy Markdown

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: 5c60f863ef

ℹ️ 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/browser/utils/workspaceAiSettingsSync.ts Outdated
Comment thread src/browser/App.tsx Outdated
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Rebased onto #6620: speed and Pro/Cyber on the new-workspace page now follow the draft-owned model like model and thinking level (project-default writes reverted). The Fast/Ultrafast shortcut now targets the focused /side chat. Please take another look.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 4c9435484c

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 4c9435484c

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ammario
ammario merged commit 8f56dc6 into main Oct 16, 2026
33 of 34 checks passed
@ammario
ammario deleted the fast-mode-xhbx branch October 16, 2026 21:32

This branch was successfully deployed

1 active deployment
staging - docs — 4c943548 Deployed Oct 16, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants