goose icon indicating copy to clipboard operation
goose copied to clipboard

feat: support fetching models from API provider

Open sammcj opened this issue 1 month ago • 1 comments

This pull request adds support for automatically fetching available models from custom AI providers in both the CLI and desktop UI, improving the user experience when configuring providers. The changes include a new API endpoint for fetching models, updates to the CLI workflow to attempt model fetching before manual entry, and enhancements to the desktop UI to allow users to fetch and select models interactively.

Backend changes (API and CLI):

  • Added a new POST endpoint /config/providers/fetch-models in the server (fetch_custom_provider_models) that takes provider details and returns available models, handling authentication and error cases. [1] [2] [3] [4] [5]
  • Implemented try_fetch_custom_provider_models in the CLI to fetch models from providers using the new endpoint, supporting retries with API keys and improved error handling.
  • Updated the CLI add_provider flow to try fetching models automatically before falling back to manual entry, and to prompt for API keys only if needed. [1] [2]

Frontend changes (Desktop UI):

  • Added UI logic to fetch models from the backend when configuring a custom provider, with error handling, loading state, and fallback to manual entry if fetching fails. [1] [2]
  • Enhanced the custom provider form to display fetched models in a multi-select dropdown, allowing users to select or manually enter models.
  • Improved styling for multi-select dropdowns in the UI for better clarity and usability. [1] [2]

sammcj avatar Nov 01 '25 01:11 sammcj

This pull request has been automatically marked as stale because it has not had recent activity for 23 days.

What happens next?

  • If no further activity occurs, this PR will be automatically closed in 7 days
  • To keep this PR active, simply add a comment, push new commits, or add the keep-open label
  • If you believe this PR was marked as stale in error, please comment and we'll review it

Thank you for your contribution! 🚀

github-actions[bot] avatar Nov 28 '25 00:11 github-actions[bot]

closing for being stale. I'll base something on this to fix the same

DOsinga avatar Dec 04 '25 16:12 DOsinga