Skip to content

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

Merged
edelauna merged 2 commits into
mainfrom
fix/scope-provider-model-requests-3somxbbf7yubt
Sep 7, 2026
Merged

[Fix] Provider settings contact unselected model services#1425
edelauna merged 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: The required review sequence passed. Remaining merge requirements apply.

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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 208d7f44-6000-422f-85a8-6476e1e724ba

📥 Commits

Reviewing files that changed from the base of the PR and between 49c3f58 and 7a3e6f1.

📒 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; 2 remain after this review.

📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (5)
For persisted settings, verify the complete schema/storage/runtime/webview round trip, shared default semantics, and focused true plus false/unset tests.

⚙️ CodeRabbit configuration file

Files:

  • webview-ui/src/components/settings/providers/Poe.tsx
  • webview-ui/src/components/settings/__tests__/ApiOptions.interactions.spec.tsx
  • webview-ui/src/components/settings/providers/__tests__/LiteLLM.spec.tsx
  • webview-ui/src/components/settings/providers/LMStudio.tsx
  • webview-ui/src/components/settings/providers/Ollama.tsx
  • webview-ui/src/components/settings/ApiOptions.tsx
  • webview-ui/src/components/settings/providers/LiteLLM.tsx
  • webview-ui/src/components/settings/providers/__tests__/Moonshot.spec.tsx
  • webview-ui/src/components/settings/providers/Moonshot.tsx
  • webview-ui/src/components/settings/providers/__tests__/Poe.spec.tsx
  • webview-ui/src/components/settings/__tests__/ApiOptions.provider-filtering.spec.tsx
Require regression coverage at the lowest valid harness with behavior-focused assertions, including relevant negative, error, false/unset, and boundary cases.

⚙️ CodeRabbit configuration file

Files:

  • webview-ui/src/components/settings/__tests__/ApiOptions.interactions.spec.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
  • webview-ui/src/components/settings/__tests__/ApiOptions.provider-filtering.spec.tsx
Check strict typing and exhaustive behavior across normal, boundary, error, cancellation, retry, and compatibility paths.

⚙️ CodeRabbit configuration file

Files:

  • webview-ui/src/components/settings/providers/Poe.tsx
  • webview-ui/src/components/settings/__tests__/ApiOptions.interactions.spec.tsx
  • webview-ui/src/components/settings/providers/__tests__/LiteLLM.spec.tsx
  • webview-ui/src/components/settings/providers/LMStudio.tsx
  • webview-ui/src/components/settings/providers/Ollama.tsx
  • webview-ui/src/components/settings/ApiOptions.tsx
  • webview-ui/src/components/settings/providers/LiteLLM.tsx
  • webview-ui/src/components/settings/providers/__tests__/Moonshot.spec.tsx
  • webview-ui/src/components/settings/providers/Moonshot.tsx
  • webview-ui/src/components/settings/providers/__tests__/Poe.spec.tsx
  • webview-ui/src/components/settings/__tests__/ApiOptions.provider-filtering.spec.tsx
Check React state and effect dependencies, cleanup, accessibility, i18n, and light/dark theme behavior.

⚙️ CodeRabbit configuration file

Files:

  • webview-ui/src/components/settings/providers/Poe.tsx
  • webview-ui/src/components/settings/__tests__/ApiOptions.interactions.spec.tsx
  • webview-ui/src/components/settings/providers/__tests__/LiteLLM.spec.tsx
  • webview-ui/src/components/settings/providers/LMStudio.tsx
  • webview-ui/src/components/settings/providers/Ollama.tsx
  • webview-ui/src/components/settings/ApiOptions.tsx
  • webview-ui/src/components/settings/providers/LiteLLM.tsx
  • webview-ui/src/components/settings/providers/__tests__/Moonshot.spec.tsx
  • webview-ui/src/components/settings/providers/Moonshot.tsx
  • webview-ui/src/components/settings/providers/__tests__/Poe.spec.tsx
  • webview-ui/src/components/settings/__tests__/ApiOptions.provider-filtering.spec.tsx
Act as an adversarial second-opinion reviewer.

⚙️ CodeRabbit configuration file

Files:

  • webview-ui/src/components/settings/providers/Poe.tsx
  • webview-ui/src/components/settings/__tests__/ApiOptions.interactions.spec.tsx
  • webview-ui/src/components/settings/providers/__tests__/LiteLLM.spec.tsx
  • webview-ui/src/components/settings/providers/LMStudio.tsx
  • webview-ui/src/components/settings/providers/Ollama.tsx
  • webview-ui/src/components/settings/ApiOptions.tsx
  • webview-ui/src/components/settings/providers/LiteLLM.tsx
  • webview-ui/src/components/settings/providers/__tests__/Moonshot.spec.tsx
  • webview-ui/src/components/settings/providers/Moonshot.tsx
  • webview-ui/src/components/settings/providers/__tests__/Poe.spec.tsx
  • webview-ui/src/components/settings/__tests__/ApiOptions.provider-filtering.spec.tsx
🔇 Additional comments (12)
webview-ui/src/components/settings/ApiOptions.tsx (1)

10-10: LGTM!

Also applies to: 184-190, 251-260

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

5-8: LGTM!

Also applies to: 39-42, 116-170

webview-ui/src/components/settings/providers/LMStudio.tsx (1)

12-12: LGTM!

Also applies to: 31-31

webview-ui/src/components/settings/providers/Ollama.tsx (1)

11-11: LGTM!

Also applies to: 42-42

webview-ui/src/components/settings/providers/LiteLLM.tsx (1)

118-118: LGTM!

webview-ui/src/components/settings/providers/Poe.tsx (1)

115-115: LGTM!

webview-ui/src/components/settings/providers/Moonshot.tsx (1)

104-108: LGTM!

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

236-240: LGTM!

Also applies to: 246-249

webview-ui/src/components/settings/providers/__tests__/LiteLLM.spec.tsx (1)

75-82: LGTM!

webview-ui/src/components/settings/providers/__tests__/Moonshot.spec.tsx (1)

469-469: LGTM!

webview-ui/src/components/settings/providers/__tests__/Poe.spec.tsx (2)

13-19: LGTM!


131-138: LGTM!


📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Improved provider-specific model refreshing in settings.
    • Router model requests now fetch results only for the selected dynamic or local provider.
    • Refreshing LiteLLM, Moonshot, and Poe models now correctly preserves provider-specific configuration and results.
  • Tests
    • Added coverage validating provider filtering and model-refresh request payloads.

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 7a3e6

Provider model discovery is now limited to the selected provider, preventing unrelated catalog requests while preserving selected-provider refresh behavior. No current merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 7
✅ Passed checks (7 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main fix: preventing provider settings from contacting unselected model services.
Description check ✅ Passed The description explains the change, motivation, impact, linked issue, and regression coverage. It omits the repository template headings and checklist, but the required technical context is mostly co…
Linked Issues check ✅ Passed The changes address issue #1424 by scoping dynamic model discovery to the selected provider, preventing aggregate requests for static and local providers, updating automatic and manual refresh payload…
Out of Scope Changes check ✅ Passed The changed production files and tests are directly related to provider-scoped model discovery and regression coverage for 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…
Regression Evidence ✅ Passed Focused regression coverage is present for each changed request path. ApiOptions.provider-filtering.spec.tsx covers disabled static providers, selected dynamic providers, and provider-scoped Ollama/…
Trust And Persistence Invariants ✅ Passed No changed path meets a failure condition. ApiOptions validates the selected provider with isDynamicProvider before enabling useRouterModels, and static providers use enabled: false. The new r…
✨ 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
@edelauna

edelauna commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Sep 6, 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 Sep 6, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@github-actions github-actions Bot removed the awaiting-maintainer CodeRabbit approved; waiting for a human maintainer label Sep 6, 2026
@edelauna
edelauna added this pull request to the merge queue Sep 7, 2026
Merged via the queue into main with commit a3e31e1 Sep 7, 2026
20 of 21 checks passed
@edelauna
edelauna deleted the fix/scope-provider-model-requests-3somxbbf7yubt branch September 7, 2026 02:36
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