Skip to content

[QUALITY-884] Hide custom models from inline model picker in cloud agent panes#13023

Merged
JaidenRatti merged 1 commit into
masterfrom
jaiden/quality-884-hide-custom-models-cloud
Jun 26, 2026
Merged

[QUALITY-884] Hide custom models from inline model picker in cloud agent panes#13023
JaidenRatti merged 1 commit into
masterfrom
jaiden/quality-884-hide-custom-models-cloud

Conversation

@JaidenRatti

@JaidenRatti JaidenRatti commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

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.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

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

Co-Authored-By: Oz oz-agent@warp.dev

…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>
@cla-bot cla-bot Bot added the cla-signed label Jun 24, 2026
@JaidenRatti JaidenRatti marked this pull request as ready for review June 24, 2026 22:52
@oz-for-oss

oz-for-oss Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

@JaidenRatti

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

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

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.

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

@JaidenRatti JaidenRatti requested a review from danielpeng2 June 24, 2026 22:58

@danielpeng2 danielpeng2 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks for fixing!

@JaidenRatti JaidenRatti merged commit 535df01 into master Jun 26, 2026
48 checks passed
@JaidenRatti JaidenRatti deleted the jaiden/quality-884-hide-custom-models-cloud branch June 26, 2026 15:07
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>
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