Skip to content

fix: Preserve custom models during LLM preference reconciliation#11655

Merged
bholmesdev merged 1 commit into
warpdotdev:masterfrom
KelvinJRosado:master
May 27, 2026
Merged

fix: Preserve custom models during LLM preference reconciliation#11655
bholmesdev merged 1 commit into
warpdotdev:masterfrom
KelvinJRosado:master

Conversation

@KelvinJRosado
Copy link
Copy Markdown
Contributor

Description

With the current logic, only the built-in models are checked when preferences are updated/validated (such as on app startup). As a result, setting a custom model as the default will only persist until this preference update runs. This PR fixes this by extending that model check to also include custom models that the user defined.

Linked Issue

Closes #8562 and #11564

Testing

I tested manually by adding a custom BYOK model and verifying that I could use it for a new agent session. Then I quit the app and re-opened to verify that my default model was still set to my custom BYOK model.

  • [ x] I have manually tested my changes locally with ./script/run

Screenshots / Videos

Updated Profile With Custom Default Model

image image

State After Quitting and Re-Opening

image

When reconciling LLM preferences, fall back to custom LLM info if the
model is not found in the built-in models list. This ensures custom
models saved on execution profiles are not cleared during preference
updates.
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 25, 2026

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @KelvinJRosado on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment @cla-bot check to trigger another check.

@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 25, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 25, 2026

@KelvinJRosado

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I reviewed this pull request and requested human review from: @abhishekp106.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@KelvinJRosado
Copy link
Copy Markdown
Contributor Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label May 25, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 25, 2026

The cla-bot has been summoned, and re-checked this pull request!

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR updates LLM preference reconciliation so custom BYOK model IDs are considered usable alongside server-provided model choices for base, coding, and CLI-agent profile settings. It also adds a regression test that configures a custom endpoint model, saves it on the default execution profile, runs model-choice reconciliation, and verifies the custom selections are preserved.

Concerns

  • No blocking correctness, security, or spec-alignment concerns found in the changed lines.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@abhishekp106
Copy link
Copy Markdown
Contributor

I swapped the reviewer for someone who has more context.

Copy link
Copy Markdown
Member

@danielpeng2 danielpeng2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thanks for fixing!

@bholmesdev bholmesdev merged commit 1bdae67 into warpdotdev:master May 27, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Model selection fails to update after restart (UI reflects change, but backend uses previous model)

4 participants