Add model discovery through Models.dev
To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.
When a provider API URL (or name) matches Models.dev and provider :fetchModels != false then all available models will be fetched automatically.
I wonder if we should really fetch all models, for example openai has lots of legacy models, o4-mini, gpt-4 etc, how we can avoid that?
We can't. We will skip deprecated models but all others will be there.
I don't see a problem in it personally. User can always do :fetchModels false if he needs to and list models manually like now.
Or I can introduce blacklist if you think it is worth it.
Opencode has filters only when openai-sub is active (so it doesn't list models that are unsupported) but then we would have to maintain a list (and another one for anthropic and so on) so I would avoid it personally.
@ericdallo Please, take a look. https://github.com/editor-code-assistant/eca/pull/295