Skip to content

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

Open
zoomote[bot] wants to merge 2 commits into
mainfrom
fix/scope-provider-model-requests-3somxbbf7yubt
Open

[Fix] Provider settings contact unselected model services#1425
zoomote[bot] wants to merge 2 commits 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.

What changed

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.

Regression coverage verifies static, dynamic, local, automatic-refresh, and manual-refresh paths. The branch was rebased onto the latest main, and the test imports and provider identifiers were corrected so the current compile, lint, type-check, and test gates pass locally.

Why this change was made

Opening provider settings could contact optional model services that the user had not selected, including Kenari. Scoping discovery avoids unexpected third-party connections and limits model-catalog traffic to the provider being configured.

Closes #1424.

Impact

Users no longer contact unrelated model providers while configuring another provider. Selecting a dynamic provider still loads that provider's current model catalog, and local/manual refresh behavior remains available.

Related PRs

@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

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Review status

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

Current step: Awaiting fresh human maintainer or CODEOWNER approval.

Review-state labels are managed by this workflow; do not edit them manually.

@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.

@edelauna
edelauna marked this pull request as ready for review September 2, 2026 00:29
@zoomote
zoomote Bot force-pushed the fix/scope-provider-model-requests-3somxbbf7yubt branch from 4dc95e6 to 7a3e6f1 Compare September 5, 2026 01:32
@github-actions github-actions Bot added awaiting-maintainer CodeRabbit approved; waiting for a human maintainer and removed awaiting-maintainer CodeRabbit approved; waiting for a human maintainer labels Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-maintainer CodeRabbit approved; waiting for a human maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants