eca icon indicating copy to clipboard operation
eca copied to clipboard

Custom Provider fetch models is broken with 0.100.1

Open snoopier opened this issue 9 months ago • 12 comments

To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.

Please avoid AI slops, be concise, and focus on what matters for this issue.

Describe the bug

Fetch models with the newest version 0.100.1 doesn't work anymore. Works still with 0.99.x

My config.json content snippet

"providers": { "xyz": { "api": "openai-chat", "url": "https://api.xyz.com/llm/v1", "key": "${env:XYZ_API_KEY}", "fetchModels": true }

BR Dennis

snoopier avatar Feb 10 '26 15:02 snoopier

@snoopier I can't repro that testing latest released version, also the auto fetch models was added on 0.100.0, not 0.99.0 and it's enabled by default

ericdallo avatar Feb 10 '26 16:02 ericdallo

c/c @zikajk in case has anything on mind, but from my tests, all working

ericdallo avatar Feb 10 '26 16:02 ericdallo

Spooky

With 0.99.0 it works fine with config above. if i remove "fetchModels": true then also no models will be load. With 0.99.0 i see in stderr

[MODELS] Provider 'xyz': Discovered 21 models from /models endpoint

thats my provider.

With 0.100.1 std_err

[MODELS] Provider 'openai': Using models.dev provider-id fallback (url 'https://api.openai.com' not matched)
[MODELS] Provider 'openai': Loaded 41 models from models.dev
[MODELS] Provider 'anthropic': Using models.dev provider-id fallback (url 'https://api.anthropic.com' not matched)
[MODELS] Provider 'anthropic': Loaded 22 models from models.dev
[MODELS] Provider 'github-copilot': Loaded 20 models from models.dev
[MODELS] Provider 'google': Using models.dev provider-id fallback (url 'https://generativelanguage.googleapis.com/v1beta/openai' not matched)
[MODELS] Provider 'google': Loaded 26 models from models.dev

My provider is not listed

snoopier avatar Feb 10 '26 16:02 snoopier

@snoopier what's your provider so I can check from models.dev?

ericdallo avatar Feb 10 '26 16:02 ericdallo

@snoopier When fetchModels is true it will try to fetch models based on api url or provider name. In your case, nothing is matching so it makes sense to just set fetchModels to false (or ignore it) and set models manually.

I removed the support for /models endpoint that was in place before because I realized that various providers might use various URLs. But if you want I can add it back to be used first (before models.dev is used).

zikajk avatar Feb 10 '26 16:02 zikajk

hum, got it, not sure if it's best to have a new flag to do that or leave user configure manually, @snoopier is it a problem to manually add models to your provider with the ones you wanna use?

ericdallo avatar Feb 10 '26 16:02 ericdallo

@ericdallo I assumed that anyone who doesn't have a provider on models.dev never uses /models, but maybe that was a mistake. Personally, I don't think there's a problem with using the same flag, because the result is similar in the end, but each provider has different logic, and models.dev is universal in this regard.

zikajk avatar Feb 10 '26 16:02 zikajk

yeah makes sense, I'm ok with using the same flag

ericdallo avatar Feb 10 '26 16:02 ericdallo

I can't post the provider :-) and yes /models is the key to fetch the models. The models changes weekly so the auto fetching is a great feature for me/us.

snoopier avatar Feb 10 '26 16:02 snoopier

@snoopier I see, I am on it. Shouldn't take long ;-)

zikajk avatar Feb 10 '26 16:02 zikajk

@snoopier Fixed https://github.com/editor-code-assistant/eca/pull/300

zikajk avatar Feb 10 '26 21:02 zikajk

It works, thx

snoopier avatar Feb 11 '26 08:02 snoopier