macOS: add chat model selector and persist thinking#42314
macOS: add chat model selector and persist thinking#42314vincentkoc merged 6 commits intoopenclaw:mainfrom
Conversation
Greptile SummaryThis PR adds a macOS chat model selector and thinking-level persistence for One verified bug: The The model-selection race-condition handling (session switches, rapid re-selections, send-gating) is well-designed and thoroughly tested. The PR is accompanied by thorough async unit tests. Confidence Score: 3/5
Last reviewed commit: 70723da |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 70723da3ea
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0605d2b700
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel.swift
Outdated
Show resolved
Hide resolved
0605d2b to
a7f7c52
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a7f7c5227b
ℹ️ 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".
| guard requestID == self.latestModelSelectionRequestIDsBySession[sessionKey] else { | ||
| self.applySuccessfulModelSelection(next, sessionKey: sessionKey, syncSelection: false) | ||
| return |
There was a problem hiding this comment.
Ignore stale model-patch completions
When two selectModel requests overlap for the same session (e.g. user picks A, then B quickly), this stale-completion branch still applies the older selection after it returns. If B completes first and A completes later, applySuccessfulModelSelection(next, ...) here rewrites local session model state to A without reapplying B, so the backend and UI can drift to the wrong model under normal network reordering. This causes subsequent sends to run on an older model despite the picker showing the newer choice.
Useful? React with 👍 / 👎.
* feat(macos): add chat model selector and thinking persistence UX * Chat UI: carry session model providers * Docs: add macOS model selector changelog * macOS: persist extended thinking levels * Chat UI: keep model picker state in sync * Chat UI tests: cover model selection races --------- Co-authored-by: Ubuntu <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
* feat(macos): add chat model selector and thinking persistence UX * Chat UI: carry session model providers * Docs: add macOS model selector changelog * macOS: persist extended thinking levels * Chat UI: keep model picker state in sync * Chat UI tests: cover model selection races --------- Co-authored-by: Ubuntu <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
* feat(macos): add chat model selector and thinking persistence UX * Chat UI: carry session model providers * Docs: add macOS model selector changelog * macOS: persist extended thinking levels * Chat UI: keep model picker state in sync * Chat UI tests: cover model selection races --------- Co-authored-by: Ubuntu <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
* feat(macos): add chat model selector and thinking persistence UX * Chat UI: carry session model providers * Docs: add macOS model selector changelog * macOS: persist extended thinking levels * Chat UI: keep model picker state in sync * Chat UI tests: cover model selection races --------- Co-authored-by: Ubuntu <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
* main: (49 commits) fix(agents): add nodes to owner-only tool policy fallbacks fix(gateway): propagate real gateway client into plugin subagent runtime fix(gateway): enforce caller-scope subsetting in device.token.rotate fix(terminal): stabilize skills table width across Terminal.app and iTerm (openclaw#42849) fix(models): guard optional model input capabilities (openclaw#42096) macOS/onboarding: prompt for remote gateway auth tokens (openclaw#43100) fix(macos): use foundationValue when serializing browser proxy POST body (openclaw#43069) feat(ios): add local beta release flow (openclaw#42991) docs(changelog): update context pruning PR reference fix(context-pruning): cover image-only tool-result pruning fix(context-pruning): prune image-containing tool results instead of skipping them (openclaw#41789) fix(agents): include azure-openai in Responses API store override (openclaw#42934) fix(telegram): fall back on ambiguous first preview sends fix(telegram): prevent duplicate messages with slow LLM providers (openclaw#41932) Providers: add Opencode Go support (openclaw#42313) fix(sandbox): sanitize Docker env before marking OPENCLAW_CLI (openclaw#42256) macOS: add chat model selector and persist thinking (openclaw#42314) fix: clear pnpm prod audit vulnerabilities fix(build): restore full gate fix(gateway): split conversation reset from admin reset ...
* feat(macos): add chat model selector and thinking persistence UX * Chat UI: carry session model providers * Docs: add macOS model selector changelog * macOS: persist extended thinking levels * Chat UI: keep model picker state in sync * Chat UI tests: cover model selection races --------- Co-authored-by: Ubuntu <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
* feat(macos): add chat model selector and thinking persistence UX * Chat UI: carry session model providers * Docs: add macOS model selector changelog * macOS: persist extended thinking levels * Chat UI: keep model picker state in sync * Chat UI tests: cover model selection races --------- Co-authored-by: Ubuntu <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
* feat(macos): add chat model selector and thinking persistence UX * Chat UI: carry session model providers * Docs: add macOS model selector changelog * macOS: persist extended thinking levels * Chat UI: keep model picker state in sync * Chat UI tests: cover model selection races --------- Co-authored-by: Ubuntu <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
* feat(macos): add chat model selector and thinking persistence UX * Chat UI: carry session model providers * Docs: add macOS model selector changelog * macOS: persist extended thinking levels * Chat UI: keep model picker state in sync * Chat UI tests: cover model selection races --------- Co-authored-by: Ubuntu <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
* feat(macos): add chat model selector and thinking persistence UX * Chat UI: carry session model providers * Docs: add macOS model selector changelog * macOS: persist extended thinking levels * Chat UI: keep model picker state in sync * Chat UI tests: cover model selection races --------- Co-authored-by: Ubuntu <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
* feat(macos): add chat model selector and thinking persistence UX * Chat UI: carry session model providers * Docs: add macOS model selector changelog * macOS: persist extended thinking levels * Chat UI: keep model picker state in sync * Chat UI tests: cover model selection races --------- Co-authored-by: Ubuntu <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
* feat(macos): add chat model selector and thinking persistence UX * Chat UI: carry session model providers * Docs: add macOS model selector changelog * macOS: persist extended thinking levels * Chat UI: keep model picker state in sync * Chat UI tests: cover model selection races --------- Co-authored-by: Ubuntu <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
* feat(macos): add chat model selector and thinking persistence UX * Chat UI: carry session model providers * Docs: add macOS model selector changelog * macOS: persist extended thinking levels * Chat UI: keep model picker state in sync * Chat UI tests: cover model selection races --------- Co-authored-by: Ubuntu <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
Split from #41560.\n\nScope:\n- macOS chat model selector UX\n- Persist and restore thinking selection in chat state\n- Session-aware picker/chat wiring in OpenClawKit\n- Related macOS/shared UI tests\n\nNo opencode-go provider/onboarding changes in this PR.