[Fix] Provider settings contact unselected model services - #1425
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Review statusThis 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. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (11)
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:
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:
Check strict typing and exhaustive behavior across normal, boundary, error, cancellation, retry, and compatibility paths.⚙️ CodeRabbit configuration file Files:
Check React state and effect dependencies, cleanup, accessibility, i18n, and light/dark theme behavior.⚙️ CodeRabbit configuration file Files:
Act as an adversarial second-opinion reviewer.⚙️ CodeRabbit configuration file Files:
🔇 Additional comments (12)
📝 SummarySummary by CodeRabbit
WalkthroughProvider 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. ChangesProvider model loading
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to 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)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
webview-ui/src/components/settings/ApiOptions.tsxESLint 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.tsxESLint skipped: the matched ESLint configuration already failed (missing-dependency). webview-ui/src/components/settings/__tests__/ApiOptions.provider-filtering.spec.tsxESLint skipped: the matched ESLint configuration already failed (missing-dependency).
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. Comment |
4dc95e6 to
7a3e6f1
Compare
|
@CodeRabbit review |
✅ Action performedReview finished.
|
|
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. |
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