Skip to content

Start new workspaces on the last model chosen in a footer - #8

Closed
HugoHeneault wants to merge 1 commit into
mainfrom
HugoHeneault/remember-last-model
Closed

HugoHeneault wants to merge 1 commit into
mainfrom
HugoHeneault/remember-last-model

Conversation

@HugoHeneault

Copy link
Copy Markdown

Fixes spatie#12. A new workspace opened on the Settings default whatever had been picked in the footer a minute before.

  • The model, effort and backend last chosen in a composer footer or in the create window are stored (LastModelChoice) and feed the next workspace.
  • Precedence: repository models.default, then a default preset, then the last choice, then Settings, then the machine-wide file, then the built-in. Permission mode and output style are not carried over.
  • A Codex model that is not in the account's fetched model/list is never used as a default. A last choice in that state is skipped, and a pinned one falls back to the built-in. This only applies once the list has arrived; an empty list disqualifies nothing, and Claude Code ids are not checked because ids such as opus-5-1m are on no list.

I could not establish where gpt-5.5 came from on the reporting machine without reading the real database, so this removes the unusable default rather than explaining it.

Tests: LastModelChoiceTests covers the round trip, the precedence and the availability rule. Not run locally; the test target compiles, swift build -Xswiftc -warnings-as-errors, make lint and make swiftlint are green, and I checked the behaviour by hand in Bloom Dev.

The last model, effort and backend picked in the composer or create window
feed the next workspace. A default preset and a repository models.default
still outrank it, and Settings sits below. A Codex model missing from the
account's fetched model list is never used as a default, so the next layer
answers instead.
@HugoHeneault

Copy link
Copy Markdown
Author

Opened against spatie/bloom instead.

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.

New workspaces start on gpt-5.5 instead of the last chosen model

1 participant