Skip to content

🤖 refactor: resolve the workspace reasoning mode from metadata and an unsent pick - #5904

Closed
ibetitsmike wants to merge 6 commits into
mike/server-side-ai-thinkingfrom
mike/server-side-ai-reasoning
Closed

ibetitsmike wants to merge 6 commits into
mike/server-side-ai-thinkingfrom
mike/server-side-ai-reasoning

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A workspace's reasoning mode (standard or Pro) now comes from the resolver, the same way as the model and thinking level: the unsent pick, then the agent's saved settings, then the agent's configured default. A saved per-agent entry owns the choice, so an entry without a mode means standard. ThinkingProvider, the command palette, getSendOptionsFromStorage and the plan handoff read it there instead of the reasoningMode:{workspace} key.

A reasoning pick in a workspace composer or the palette is recorded as an unsent pick and no longer writes reasoningMode:{workspace}; it still also goes into the per-agent settings cache until #5906. WorkspaceModeAISync and the plan handoff stop resolving and writing a reasoning mode on agent switches. Workspace creation stops copying the project's reasoning mode into the new workspace's key and the per-agent cache; the creation request still sends it to the backend. With this, ThinkingProvider no longer reads WorkspaceContext, and the unused helpers getWorkspaceAiSettingsFromMetadata and resolveEffectiveComposerModel are deleted. Metadata seeding still writes the old key until #5907.

Stack

Milestone M4 of the server-side settings stack, on top of M3 (#5869 to #5879): per-workspace AI picks (model, thinking level, reasoning mode, agent and Auto routing) are stored in workspace metadata in config.json instead of per-browser localStorage keys, so every browser shows the same picks. An unsent picker change stays in memory in its tab until a send saves it, and a reload before sending drops it, as the plan accepts. Layer 11 of 20.

Testing

  • "self-heals a corrupt saved reasoningMode to standard but keeps valid pro" (ThinkingContext.test.tsx): a corrupt mode in the saved settings shows standard and a saved Pro shows Pro. It used to seed the localStorage key.
  • The CoderGateway story in App.astraPro.stories.tsx drops its check of the removed key and keeps the checks on the Pro button.
  • make static-check and the touched test suites pass at the top of the stack; CI checks each layer on its own.

Review record

…nsent pick

The composer, sends, palette and plan handoff read the reasoning mode through the resolver,
and a reasoning pick stays in memory until the next send saves it. Agent switches, the plan
handoff and workspace creation no longer write a reasoning mode, and the unused metadata and
composer-model helpers go away. Seeding of the old key stays until a later commit deletes it.

Stack-Layer: A2e
@ibetitsmike
ibetitsmike added this pull request to stack #5868 October 8, 2026 21:03
@ibetitsmike ibetitsmike changed the title mike/server side ai reasoning 🤖 refactor: resolve the workspace reasoning mode from metadata and an unsent pick Oct 8, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 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-09T00:29:30.246615Z 69adb43 New commits
🔒 Security Review ✅ Completed 2026-10-09T00:26:24.341568Z 69adb43 New commits
ℹ️ 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 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: a7f6bc0281

ℹ️ 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/contexts/ThinkingContext.tsx
Comment thread src/browser/utils/messages/sendOptions.ts
Comment thread src/browser/contexts/ThinkingContext.tsx

@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: 69adb4311d

ℹ️ 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/features/ChatInput/useCreationWorkspace.ts
@ibetitsmike
ibetitsmike removed this pull request from stack #5868 October 9, 2026 04:49
@ibetitsmike

Copy link
Copy Markdown
Contributor Author

Landed in #5916 (7b9899d), which collapsed this stack into one squash merge.

@ibetitsmike ibetitsmike closed this Oct 9, 2026
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.

1 participant