Skip to content

[Fix] Provider settings contact unselected model services - #1425

Draft
zoomote[bot] wants to merge 1 commit into
mainfrom
fix/scope-provider-model-requests-3somxbbf7yubt
Draft

[Fix] Provider settings contact unselected model services#1425
zoomote[bot] wants to merge 1 commit into
mainfrom
fix/scope-provider-model-requests-3somxbbf7yubt

Conversation

@zoomote

@zoomote zoomote Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

​Created by Roomote. Follow up by mentioning @roomote, in the web UI, or in Discord.

Related GitHub Issue

Closes: #1424

Description

Provider settings now scope dynamic model discovery to the provider the user selected. Automatic and manual refresh paths for LiteLLM, Poe, and Moonshot include explicit provider filters, while Ollama and LM Studio no longer fall through to aggregate router discovery.

The regression coverage was written first and observed failing against the previous aggregate behavior. It covers static providers, selected Kenari discovery, local providers, and the automatic and manual refresh paths that previously omitted a provider filter.

Test Procedure

  1. Open provider settings with a static provider selected and verify no router catalog request is emitted.
  2. Select Kenari and verify the router request is filtered to kenari.
  3. Exercise automatic and manual model refresh for LiteLLM, Poe, and Moonshot and verify each message includes its own provider identifier.
  4. Run the repository test suite and webview type checks.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Visual Snapshot (UI changes only): No rendered UI change; behavior is covered by Vitest.
  • Documentation Impact: Documentation is updated in the paired Zoo-Code-Docs PR.
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Visual Snapshots

Not applicable. This changes request routing without changing rendered UI.

Videos (interaction / animation only)

Not applicable.

Documentation Updates

Related PRs

Additional Notes

The aggregate extension-host handler remains available for explicit aggregate callers, but every reachable provider-settings path is now provider-scoped.

Get in Touch

Mention @roomote on this PR or use the links in the attribution block above.

Summary by CodeRabbit

  • Bug Fixes

    • Improved provider-specific model loading in settings.
    • Refreshing models now retrieves results only for the selected provider, preventing unrelated models from appearing.
    • Updated model refresh handling for LiteLLM, Poe, Moonshot, LM Studio, and Ollama configurations.
  • Tests

    • Added coverage confirming correct provider filtering and refresh behavior across supported providers.

@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown
Contributor

Review process

This PR was opened by an automated account. A human maintainer must verify the change intent, provenance, and validation before merging.

  1. Required CI checks pass.
  2. The workflow starts CodeRabbit automatically.
  3. CodeRabbit reviews and approves the latest commit.
  4. A human maintainer reviews and approves after CodeRabbit.

Current step: Mark the PR ready to start CodeRabbit after required CI passes.

@edelauna

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9cd1a3bf-b160-4e0c-a04c-05db4b7500ad

📥 Commits

Reviewing files that changed from the base of the PR and between b0fdbc7 and a83fc42.

📒 Files selected for processing (11)
  • webview-ui/src/components/settings/ApiOptions.tsx
  • webview-ui/src/components/settings/__tests__/ApiOptions.interactions.spec.tsx
  • webview-ui/src/components/settings/__tests__/ApiOptions.provider-filtering.spec.tsx
  • webview-ui/src/components/settings/providers/LMStudio.tsx
  • webview-ui/src/components/settings/providers/LiteLLM.tsx
  • webview-ui/src/components/settings/providers/Moonshot.tsx
  • webview-ui/src/components/settings/providers/Ollama.tsx
  • webview-ui/src/components/settings/providers/Poe.tsx
  • webview-ui/src/components/settings/providers/__tests__/LiteLLM.spec.tsx
  • webview-ui/src/components/settings/providers/__tests__/Moonshot.spec.tsx
  • webview-ui/src/components/settings/providers/__tests__/Poe.spec.tsx

Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

Provider settings now fetch router models only for the selected dynamic provider. Provider refresh messages include explicit provider identifiers. Tests cover provider filtering and refreshed request payloads.

Changes

Provider model loading

Layer / File(s) Summary
Selected-provider model gating
webview-ui/src/components/settings/ApiOptions.tsx, webview-ui/src/components/settings/__tests__/ApiOptions.provider-filtering.spec.tsx
ApiOptions enables useRouterModels only for the selected dynamic provider. Tests cover static providers, selected dynamic providers, Ollama, and LM Studio.
Provider-scoped model requests
webview-ui/src/components/settings/providers/*, webview-ui/src/components/settings/__tests__/*, webview-ui/src/components/settings/providers/__tests__/*
LM Studio and Ollama pass provider filters to useRouterModels. LiteLLM, Moonshot, and Poe include provider identifiers in refresh messages. Tests verify the updated payloads.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to a83fc

Provider model discovery is now scoped to the selected provider while local providers retain their dedicated refresh paths; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: edelauna

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies a fix for provider settings contacting unselected model services, which matches the main change.
Description check ✅ Passed The description includes the linked issue, implementation summary, test procedure, checklist, snapshot and video status, documentation details, and reviewer notes.
Linked Issues check ✅ Passed The changes satisfy issue #1424 by scoping dynamic provider requests, preventing aggregate requests for static and local providers, preserving selected-provider discovery, and adding regression covera…
Out of Scope Changes check ✅ Passed The implementation and test changes are focused on provider model discovery and request filtering described in issue #1424. No unrelated code changes are identified.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Full details: Linked Issues check

Explanation

The changes satisfy issue #1424 by scoping dynamic provider requests, preventing aggregate requests for static and local providers, preserving selected-provider discovery, and adding regression coverage for provider filtering and refresh paths.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 11 files.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/scope-provider-model-requests-3somxbbf7yubt

Warning

Some tools did not complete. Review the errors below.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

webview-ui/src/components/settings/ApiOptions.tsx

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

webview-ui/src/components/settings/__tests__/ApiOptions.interactions.spec.tsx

ESLint skipped: the matched ESLint configuration already failed (missing-dependency).

webview-ui/src/components/settings/__tests__/ApiOptions.provider-filtering.spec.tsx

ESLint skipped: the matched ESLint configuration already failed (missing-dependency).

  • 8 others

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

[BUG] Provider settings contact unselected third-party model endpoints

2 participants