feat(provider): allow manual model entry when auto-discovery fails - #1
Closed
ikarys wants to merge 2 commits into
Closed
feat(provider): allow manual model entry when auto-discovery fails#1ikarys wants to merge 2 commits into
ikarys wants to merge 2 commits into
Conversation
Some providers (e.g. Cline) do not expose a /models endpoint, leaving the user blocked on a No models found error with only Retry/Edit URL options. Add a manual model entry field to the provider modal step 2, always visible so a model name can be typed in regardless of discovery outcome. The entered model is added with source: user (already handled by the server buildModelConfigs) and auto-selected. - New addManualModel() with duplicate detection (same normalization as server) and inline validation - Add model manually link in the error block focuses the input - Clears fetchError once a model is added - Fix pre-existing test using a fragile input selector that matched the new input; switched to aria-label selector
The pr.yml workflow ran npm ci at the root but never installed web dependencies (cd web && npm ci), so all web typecheck and test jobs failed with: Cannot find module 'overlayscrollbars-react'. Add the missing install step to both jobs.
Owner
Author
|
Closing in favor of upstream PR co-l#201 targeting co-l/openfox:develop. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Some providers (e.g. Cline) do not expose a
/modelsendpoint. When adding such a provider, the auto-discovery returns404 No models foundand the user is blocked — the error block only offers Retry and Edit URL, with no way to specify the model name manually.Solution
Add a manual model entry field to the provider modal (step 2), always visible so a model name can be typed in regardless of discovery outcome. The server already handles user-supplied models (
buildModelConfigsassignssource: user), so the feature change is frontend-only.Also fixes a pre-existing CI issue: the
pr.ymlworkflow never installed web dependencies (cd web && npm ci), causing all web typecheck and test jobs to fail withCannot find module 'overlayscrollbars-react'.Changes
web/src/components/shared/ProviderModal.tsxaddManualModel()function with:-_:.and whitespace)fetchErroronce a model is addedresetStep2()web/src/components/shared/ProviderModal.test.tsxinput[type=text]selector that now matches the new input — switched toinput[aria-label="Reasoning effort"].github/workflows/pr.ymlcd web && npm citotypecheckandtestjobs so web dependencies are installed (fixes pre-existing CI failure)Validation
ProviderModal.test.tsx: 12/12No server changes required
The
POST/PUT /api/providersendpoints already accept user-supplied models viabuildModelConfigs()(setssource: user), and the singularmodelfield already creates a user model. This change simply exposes that capability in the UI.AI-Enhanced Development
Cache Impact