Skip to content

Auto-discover models from provider /v1/models endpoint#220

Open
djgpp6 wants to merge 1 commit into
boldsoftware:mainfrom
djgpp6:feat/auto-discover-custom-models
Open

Auto-discover models from provider /v1/models endpoint#220
djgpp6 wants to merge 1 commit into
boldsoftware:mainfrom
djgpp6:feat/auto-discover-custom-models

Conversation

@djgpp6

@djgpp6 djgpp6 commented Jun 8, 2026

Copy link
Copy Markdown

Fixes #204

What

Adding a custom model in Shelley currently means typing the model name by hand. A lot of providers (and proxies) only expose one model, or have a small set you can list via /v1/models. This wires that up so the model field fills itself.

Changes

  • Add POST /api/custom-models-discover to fetch models from the remote provider (OpenAI-style /v1/models, Anthropic /v1/models, Gemini /v1beta/models)
  • In the custom model form, discover models once endpoint + API key are set (debounced)
  • Merge discovered models into the autocomplete list; auto-select when there is exactly one
  • Unit tests for URL derivation and response parsing

Testing

  • go test ./server/... -run 'TestModelsListURL|TestDiscover|TestHandleDiscover'

When setting up a custom model, query the provider's models endpoint after entering an endpoint and API key. Populate the model field from the response and auto-select when only one model is available.

Fixes boldsoftware#204
@cla-bot

cla-bot Bot commented Jun 8, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have you on file. In order for us to review and merge your code, please contact @crawshaw at david@bold.dev to get yourself added.

@djgpp6

djgpp6 commented Jun 8, 2026

Copy link
Copy Markdown
Author

We require contributors to sign our Contributor License Agreement, and we don't have you on file. In order for us to review and merge your code, please contact @crawshaw at david@bold.dev to get yourself added.

i think i did sign the CLA @philz

@philz

philz commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@djgpp6 We can't seem to find your CLA (or maybe are having trouble associating usernames). E-mail philip@bold.dev and david@bold.dev and we'll get it sorted out?

@djgpp6

djgpp6 commented Jun 9, 2026

Copy link
Copy Markdown
Author

yea mayhaps it's because i changed my username (previous one was okottorika). nonetheless, i'll mail you again

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.

Auto-load model list from /v1/models endpoint

2 participants