Skip to content

🤖 refactor: delete the auto routing keys - #5911

Closed
ibetitsmike wants to merge 6 commits into
mike/server-side-ai-routing-syncfrom
mike/server-side-ai-routing-keys
Closed

ibetitsmike wants to merge 6 commits into
mike/server-side-ai-routing-syncfrom
mike/server-side-ai-routing-keys

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Workspace creation no longer copies the creation composer's Auto choices into the new workspace's autoModelRouting: and autoThinkingLevel: keys or its per-agent routing record (syncCreationPreferences). The first send already carries the composer's Auto flags, read through the resolver from #5909, and the backend saves them for the agent (#5894). With that copy gone nothing reads autoModelRouting:{scope}, autoThinkingLevel:{scope} or autoRoutingChoiceByAgent:{workspace}, so the key helpers, their storage registry entries, recordAutoRoutingChoiceForAgent and the autoRoutingEnabled option of useCreationWorkspace are deleted.

Startup cleanup (removeDroppedCacheKeys) now deletes leftover autoModelRouting:, autoThinkingLevel: and autoRoutingChoiceByAgent: values from older builds.

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 18 of 20.

Testing

  • "the first send carries the creation composer's Auto picks to the new workspace" (useCreationWorkspace.test.tsx): with the model's Auto from the agent's configured default and thinking Auto picked in the creation composer, the first send carries both flags. It replaces "records only creation routing picks that differ from the agent's Auto default (experiment %p)", which tested the removed copy.
  • Deleted "keeps the newest per-agent routing choices on disk as agents accumulate" (modelChange.test.ts) with the routing record it covered; persistedStateBudget.test.ts drops the removed keys.
  • "removes only keys with a dropped cache prefix" (legacyLocalStorageCleanup.test.ts) covers the removed prefixes.
  • make static-check and the touched test suites pass at the top of the stack; CI checks each layer on its own.

Review record

Creation no longer copies Auto keys into the new workspace: its first send carries the flags and
the backend saves them. Nothing reads autoModelRouting, autoThinkingLevel or autoRoutingChoiceByAgent.

Stack-Layer: A3d
Merges the updated layer below.

Stack-Layer: A3d
@ibetitsmike
ibetitsmike added this pull request to stack #5868 October 8, 2026 21:03
@ibetitsmike ibetitsmike changed the title mike/server side ai routing keys 🤖 refactor: delete the auto routing keys Oct 8, 2026
Merges the updated layer below.

Stack-Layer: A3d
@ibetitsmike
ibetitsmike marked this pull request as ready for review October 8, 2026 21:33
@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:26:45.312353Z 73ae413 New commits
🔒 Security Review ✅ Completed 2026-10-09T00:26:33.919877Z 73ae413 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.

@ibetitsmike
ibetitsmike removed this pull request from stack #5868 October 9, 2026 04:50
@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