Skip to content

fix(app): apply agent defaults to new-session drafts - #49544

Open
fobiat wants to merge 1 commit into
anomalyco:devfrom
fobiat:draft-agent-model
Open

fobiat wants to merge 1 commit into
anomalyco:devfrom
fobiat:draft-agent-model

Conversation

@fobiat

@fobiat fobiat commented Sep 17, 2026

Copy link
Copy Markdown

Issue for this PR

Fixes #38333.

Type of change

  • Bug fix

What does this PR do?

Apply configured model/variant defaults to the new-session draft when selecting or cycling agents. Previously only the agent state changed, so a model copied from the previous tab still won at submission.

Agents without defaults retain the draft selection. Later manual choices remain usable. New-tab inheritance without an explicit agent-selection action is unchanged. Earlier related PRs #38372 and #40604 were closed without merging.

How did you verify your code works?

  • Linux production browser test against a plugin-free 1.18.31 server and a local fake provider. Before: selecting Beta displayed Alpha/low and sent model=alpha, reasoning_effort=low. After: dropdown and keyboard cycling select Beta/high and send those values.
  • Checked explicit variants, non-reasoning models, mid-generation selection, reconnect and session isolation using captured requests.
  • App: 724 unit tests, 46 browser-condition tests, typecheck/build pass. Changed-file lint has zero warnings/errors; formatting passes. All 30 pre-push typecheck tasks pass.
  • Ten production selection samples: median 30.05 ms before, 29.35 ms after. No timing threshold asserted.

Screenshots / recordings

Before:
Beta selected but Alpha/low retained

After:
Beta selected with Beta/high

Checklist

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

@fobiat

fobiat commented Sep 17, 2026

Copy link
Copy Markdown
Author

Local gates and captured-provider browser verification are complete. The test, typecheck and nix-eval runs are action_required for fork-workflow approval. Could a maintainer approve those runs when reviewing?

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 Session uses the wrong model when an agent is selected

1 participant