Skip to content

Fix model selector in cloud mode.#11175

Merged
liliwilson merged 3 commits into
masterfrom
lili/fix-broken-model-selector
May 18, 2026
Merged

Fix model selector in cloud mode.#11175
liliwilson merged 3 commits into
masterfrom
lili/fix-broken-model-selector

Conversation

@liliwilson
Copy link
Copy Markdown
Contributor

@liliwilson liliwilson commented May 18, 2026

Description

This fixes a regression to the cloud mode model selector introduced in #11101 -- after that change, the model selector looked weirdly disabled in cloud mode and also rendered the popup rather than inline menu for changing models.

The change was made in the prior PR to fix a different bug where the model selector rendered in the cloud mode footer showed the wrong model (was unaware of harness model types). This happened because we're currently maintaining two different model selectors, one for cloud mode v2 and one for normal model selection.

We should consolidate these two model selectors in the future, but in the interest of minimizing surface area of impact, I chose to just add harness-awareness to the existing one and leave the cloud mode input one alone for now.

Testing

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

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

@cla-bot cla-bot Bot added the cla-signed label May 18, 2026
@liliwilson liliwilson force-pushed the lili/fix-broken-model-selector branch from efb480d to 86a6801 Compare May 18, 2026 04:01
@liliwilson liliwilson marked this pull request as ready for review May 18, 2026 04:01
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 18, 2026

@liliwilson

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

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

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

Powered by Oz

} else {
Some(ChildView::new(&self.model_selector).finish())
}
show.then(|| ChildView::new(&self.model_selector).finish())
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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


let model_name = {
let model_name = if self.is_third_party_harness(ctx) {
self.harness_model_display_name(ctx)
Copy link
Copy Markdown
Contributor Author

@liliwilson liliwilson May 18, 2026

Choose a reason for hiding this comment

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

this is the crucial part of the fix for now, given that we don't actually let people change models for 3p harnesses.

the rest of the diff is adding in selector behavior (it doesn't use the inline menu for right now, it just uses the dropdown, which I know is not great)—this isn't accessible at all atm, I'm adding so that if we do let people change models for 3p harnesses, we don't forget to implement the inline menu view for it

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 switches the cloud-mode footer back to ProfileModelSelector and adds harness-aware model display, menu items, and persistence for third-party harness model selections.

Concerns

  • The inserted SelectHarnessModel match arm in ProfileModelSelector::handle_action is missing its closing brace before ManageProfiles, so the file will not parse as shown in the annotated diff.
  • The new shared persistence helper now discards set_value errors, regressing the previous reporting path for harness model persistence failures.

Found: 0 critical, 1 important, 1 suggestions

Request changes

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

Powered by Oz

);
});
}
self.set_model_menu_visibility(false, ctx);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] This match arm is not closed before the next ManageProfiles arm, so the file will not parse as shown; add the missing closing brace after this call.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is wrong

Comment thread app/src/ai/cloud_agent_settings.rs Outdated
},
);
}
let _ = self.last_selected_harness_model.set_value(map, ctx);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 [SUGGESTION] Preserve error reporting here; this helper replaces a call site that used report_if_error!, so persistence failures for harness model selection are now silently swallowed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@liliwilson liliwilson force-pushed the lili/fix-broken-model-selector branch from 75b1b79 to 0bd6673 Compare May 18, 2026 04:11
@liliwilson liliwilson requested a review from zachbai May 18, 2026 04:26
@liliwilson liliwilson enabled auto-merge (squash) May 18, 2026 04:35
@liliwilson liliwilson disabled auto-merge May 18, 2026 04:45
@liliwilson liliwilson enabled auto-merge (squash) May 18, 2026 04:46
@liliwilson liliwilson merged commit 13a7ae9 into master May 18, 2026
25 checks passed
@liliwilson liliwilson deleted the lili/fix-broken-model-selector branch May 18, 2026 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants