Skip to content

Allow users to choose a provider and install AI models from Settings - #46

Merged
vharkins1 merged 9 commits into
mainfrom
35-feat-ai-model-selection-frontend
Oct 27, 2026
Merged

vharkins1 merged 9 commits into
mainfrom
35-feat-ai-model-selection-frontend

Conversation

@jansans04

@jansans04 jansans04 commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Choose a provider and model, and install Ollama models, from Settings

Frontend for model selection (#35). Uses the multi-LLM backend from fireform-core/FireForm#725 (merged). Installing models needs the pull endpoint from fireform-core/FireForm#733.

Why

  • The provider and model used to fill forms could only be changed on the server.
  • There was no way to see which models are installed, or to install one without the Ollama CLI.
  • The backend serves several providers at once and each fill picks one, so the frontend must send provider and model.

What changed

  • ModelSelector.tsx and Settings.tsx: let users choose an available provider and model. The quick model list shows the provider's default model, the model in use, manual models, and pinned models, with a “More models…” option to open provider configuration. The help text explains that users choose from providers they have set up.
  • ProviderConfigModal.tsx: add a provider-management window for Ollama, Gemini, OpenAI, Anthropic, and custom servers. It supports API-key validation, saving and removal, custom server settings, manual models, and searching the provider's full model catalog.
  • Pinned models: users can pin and unpin models per provider. Pins are stored locally, not on the backend, and removed when models disappear from the catalog. The modal shows a collapsible “Pinned” group when applicable and a collapsible “All models (N)” group; both start expanded, search filters both groups, and the lists scroll internally.
  • External-provider consent: remove the standalone consent checkbox. Saving an external provider enables consent first, then saves the key; if saving fails and no other external provider is configured, the consent change is rolled back. Removing the last configured external provider also clears UI-sourced consent. The UI warns that incident text leaves the computer when filling a form with an external provider.
  • storage.ts and store/index.ts: persist the selected provider and model and pinned models locally. Refresh and reconcile the model catalog so stale pins and selections are removed, with a notice when the selected model is no longer available. Catalog refreshes are deduplicated while one is in progress.
  • Ollama downloads use the existing backend pull endpoint. The global download state and floating progress panel remain available across pages; failed downloads retain the previous model selection.
  • FillForm.tsx and Studio.tsx: send the selected provider and model when filling a form.

Notes

  • A model is installed when the user presses Download, not on selection, because a download is several GB.
  • There is no recommended label: the backend does not say which installed models are recommended.
  • There is no cancel button.
  • The old endpoints (GET /forms/models, POST /forms/pull) are not used.
  • Only Ollama can install models. Other providers show the models returned by the backend.
  • API keys are not stored in local storage; the key field is cleared after saving and when the configuration window closes.

Testing

  • npm run typecheck and npm run build pass. npm run lint: 0 errors and 33 warnings (the same warning count as the previous baseline).
  • There is no UI test suite in the project.
  • No manual end-to-end check was performed for these latest changes.

Closes #35

Copilot AI balanced review requested due to automatic review settings October 17, 2026 11:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

jansans04 and others added 6 commits October 22, 2026 19:53
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jansans04
jansans04 force-pushed the 35-feat-ai-model-selection-frontend branch from 6a8e89a to 060d53d Compare October 22, 2026 17:55
@jansans04 jansans04 changed the title Allow users to choose and install AI models from Settings Allow users to choose a provider and install AI models from Settings Oct 22, 2026
@jansans04
jansans04 requested a review from marcvergees October 23, 2026 08:21

@vharkins1 vharkins1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good over here as well!

@vharkins1
vharkins1 merged commit 202f588 into main Oct 27, 2026
1 check passed
rootsiemen added a commit to rootsiemen/fireform-frontend that referenced this pull request Oct 27, 2026
Resolve conflicts with main (AI model selection, PR fireform-core#46) in FillForm.tsx, Settings.tsx and Studio.tsx, keeping both sides: the new provider/model selection plus this PR's fill animations, Settings toggle and filled-path tracking.
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.

[FEAT]: Allow users to choose AI model when filling forms

4 participants