Skip to content

feat(app): persist model selection per agent #28111

Open
HJassar wants to merge 2 commits into
anomalyco:devfrom
HJassar:feat/per-agent-model-selection
Open

feat(app): persist model selection per agent #28111
HJassar wants to merge 2 commits into
anomalyco:devfrom
HJassar:feat/per-agent-model-selection

Conversation

@HJassar
Copy link
Copy Markdown

@HJassar HJassar commented May 18, 2026

Issue for this PR

Closes #18359

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Persist model selection per agent with user-configurable settings

Add two settings toggles to control model persistence:

  • Persist model per agent (opt-in): stores model/variant per agent name
  • Persist model across sessions (default: on): controls session-scoped persistence

When per-agent is enabled, switching agents restores that agent's last used model, matching the TUI behavior.

(Also removes stray console.log(import.meta.env) in settings-general.tsx)

How did you verify your code works?

I tested it locally

Screenshots / recordings

image

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

…ettings

Add two settings toggles to control model persistence:
- Persist model per agent (opt-in): stores model/variant per agent name
- Persist model across sessions (default: on): controls session-scoped persistence

When per-agent is enabled, switching agents restores that agent's last used
model, matching the TUI behavior.

Also removes stray console.log(import.meta.env) in settings-general.tsx.
@HJassar HJassar requested a review from adamdotdevin as a code owner May 18, 2026 05:05
@github-actions github-actions Bot added needs:title needs:compliance This means the issue will auto-close after 2 hours. labels May 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Hey! Your PR title Fixes #28110 - feat(app): persist model selection per agent doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on the search results, I found several related PRs that address similar functionality:

Related PRs (not current PR):

  1. feat: toggle to keep model/agent when switching sessions #24508 - feat: toggle to keep model/agent when switching sessions

    • Similar feature: controls model/agent persistence across sessions
  2. feat(tui): assign model to specific agent via Ctrl+E #24317 - feat(tui): assign model to specific agent via Ctrl+E

    • Related: TUI functionality for per-agent model assignment
  3. fix(opencode): scope TUI variant state per agent #18013 - fix(opencode): scope TUI variant state per agent

    • Related: Scoping variant/model state per agent in TUI

These PRs address similar aspects of model persistence and per-agent configuration. However, PR #28111 (the current PR) appears to be the main implementation for this feature set, specifically addressing issue #28110 with web app persistence settings, while the others are related but distinct implementations (TUI-focused or session-scoped toggles).

@HJassar HJassar changed the title Fixes #28110 - feat(app): persist model selection per agent feat(app): persist model selection per agent May 18, 2026
@github-actions github-actions Bot removed needs:title needs:compliance This means the issue will auto-close after 2 hours. labels May 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

[FEATURE]:When switching between agents, I'd love it if the app could automatically remember and select the model each agent was last used with.

1 participant