Skip to content

feat(settings): add per-adapter default model setting#3209

Draft
MattPua wants to merge 1 commit into
mainfrom
posthog-code/default-model-setting
Draft

feat(settings): add per-adapter default model setting#3209
MattPua wants to merge 1 commit into
mainfrom
posthog-code/default-model-setting

Conversation

@MattPua

@MattPua MattPua commented Jul 6, 2026

Copy link
Copy Markdown
Member

Summary

Adds a default model preference per adapter (Claude / Codex), mirroring the existing default reasoning effort setting.

  • Each adapter remembers its own default independently, so switching adapters no longer silently drops a stored default belonging to the other
  • settingsStore: defaultModels keyed by adapter ("last_used" fallback per adapter)
  • usePreviewConfig: applies the per-adapter default when restoring the model on a new task
  • GeneralSettings: two rows — Claude always visible, Codex rendered only when models are available
  • useAvailableModelOptions: shared fetch + flatten hook so settings and task input agree on the visible model list

Test plan

  • Open Settings → confirm both Default Claude model and Default Codex model rows render
  • Set a Claude default, start a new Claude task → model is pre-selected
  • Switch to Codex, start a new task → Claude default is not applied; Codex uses last-used or its own default
  • Set a Codex default, switch back to Claude → Claude default still respected

Created with PostHog Code

Adds a default model preference per adapter (Claude/Codex), mirroring the
existing default reasoning effort setting. Each adapter remembers its own
default independently so switching adapters no longer silently drops a
stored default that belongs to the other.

- settingsStore: defaultModels keyed by adapter
- usePreviewConfig: applies the per-adapter default when restoring the model
- GeneralSettings: two rows (Claude always; Codex when models available)
- useAvailableModelOptions: shared fetch+flatten hook

Generated-By: PostHog Code
Task-Id: 574314ec-1643-4959-ba73-5940abc58aaf
@trunk-io

trunk-io Bot commented Jul 6, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 20b7c6f.

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