[QUALITY-884] Hide custom models from inline model picker in cloud agent panes#13023
Merged
Merged
Conversation
…ent panes Custom endpoint models cannot route through Warp's cloud inference infrastructure, but they were incorrectly appearing in the inline /MODEL picker when the user was in a cloud agent pane. Thread ambient_agent_view_model through InlineModelSelectorView and ModelSelectorDataSource so run_query can suppress custom models when is_cloud_pane is true. Add include_model_in_picker helper with unit tests covering all four combinations of the cloud/custom truth table. Fixes: https://linear.app/warpdotdev/issue/QUALITY-884 Co-Authored-By: Oz <oz-agent@warp.dev>
Contributor
|
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 Powered by Oz |
Contributor
There was a problem hiding this comment.
Overview
This PR threads cloud-agent pane context into the inline /MODEL picker and filters custom endpoint models from the picker results when the selector is opened from a cloud agent pane.
Concerns
- No blocking correctness, security, or spec-alignment concerns were found in the changed lines.
- The PR description includes a Loom recording, satisfying the visual evidence requirement for this user-facing picker behavior change.
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
dagmfactory
pushed a commit
that referenced
this pull request
Jun 30, 2026
…ent panes (#13023) ## Description Custom endpoint models (e.g. locally-configured custom LLM endpoints) were incorrectly appearing in the inline `/MODEL` picker when the user was in a cloud agent pane. Custom models cannot route through Warp's cloud inference infrastructure, so they should not be selectable there. The root cause: `ModelSelectorDataSource::run_query` — which powers the inline `/MODEL` tabbed picker — had no awareness of whether its pane was an Oz cloud agent pane. It fetched all models including custom endpoints unconditionally. **Fix:** Thread `ambient_agent_view_model` through `InlineModelSelectorView` and into `ModelSelectorDataSource`. In `run_query`, derive `is_cloud_pane` from whether the model handle is `Some`, and filter out any model where `custom_llm_info_for_id` returns `Some` when in a cloud pane. ### Screenshots / Videos Loom showing the fix in action: https://www.loom.com/share/2317394c09a4468b956da64a6dac7217 ## Linked Issue Loom showing the buggy behaviour is in here as well --> https://linear.app/warpdotdev/issue/QUALITY-884/custom-models-are-selectable-for-cloud-agent-requests-when-changing - [ ] The linked issue is labeled `ready-to-spec` or `ready-to-implement`. - [x] Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes). ## Testing - [x] I have manually tested my changes locally with `./script/run` ## Agent Mode - [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode <!-- CHANGELOG-BUG-FIX: Custom models no longer appear in the model picker when using a cloud agent pane. --> Co-Authored-By: Oz <oz-agent@warp.dev> Co-authored-by: Oz <oz-agent@warp.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Custom endpoint models (e.g. locally-configured custom LLM endpoints) were incorrectly appearing in the inline
/MODELpicker when the user was in a cloud agent pane. Custom models cannot route through Warp's cloud inference infrastructure, so they should not be selectable there.The root cause:
ModelSelectorDataSource::run_query— which powers the inline/MODELtabbed picker — had no awareness of whether its pane was an Oz cloud agent pane. It fetched all models including custom endpoints unconditionally.Fix: Thread
ambient_agent_view_modelthroughInlineModelSelectorViewand intoModelSelectorDataSource. Inrun_query, deriveis_cloud_panefrom whether the model handle isSome, and filter out any model wherecustom_llm_info_for_idreturnsSomewhen in a cloud pane.Screenshots / Videos
Loom showing the fix in action: https://www.loom.com/share/2317394c09a4468b956da64a6dac7217
Linked Issue
Loom showing the buggy behaviour is in here as well --> https://linear.app/warpdotdev/issue/QUALITY-884/custom-models-are-selectable-for-cloud-agent-requests-when-changing
ready-to-specorready-to-implement.Testing
./script/runAgent Mode
Co-Authored-By: Oz oz-agent@warp.dev