Models fetching issue: models.dev matching fails for providers with a templated API URL (e.g. Cloudflare Workers AI), so no models are discovered
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start by finding the models.dev provider matching code and tracing how it compares configured API URLs with provider entries. Reproduce the Cloudflare Workers AI case using the templated URL and the /models 405 response described here. Done means the provider is matched through a reliable approach and its models are discovered without relying on the unavailable endpoint.
由索引模型根据 Issue 内容生成。
描述
Cloudflare Workers AI use a custom value in a path of the URL, that is the account ID:
"cloudflare-workers-ai": {
"api": "openai-chat",
"url": "https://api.cloudflare.com/client/v4/accounts/<account_id>/ai/v1",
"key": "api_key"
}
Then it seems it does not match API URL of models.dev, since it's templated:
curl -s https://models.dev/api.json | jq '."cloudflare-workers-ai".api'
"https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/ai/v1"
And since it does not match, according to the docs, it seems to try the /models endpoint, that does not exist in this provider:
01:23:18.394 WARN [MODELS] Provider 'cloudflare-workers-ai': /models endpoint returned status 405: {"result":null,"success":false,"errors":[{"code":7001,"message":"GET not supported for requested URI."}],"messages":[]}
One solution would be to fallback to provider id if URL match fails:
curl -s https://models.dev/api.json | jq '."cloudflare-workers-ai".id'
"cloudflare-workers-ai"
Another could be treating the template part ${...} as wildcards when matching, so it would be ignored.
Then it would match the correct entry of models.dev.
To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.
- 主要语言
- Clojure
- 星标
- 1k
- 派生
- 82
- 平均合并
- 1 天 20 小时
- 30 天内合并 PR
- 18
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
editor-code-assistant/eca 的其他 Issue
-
Models doesn't work when fetchModels: false is used可能已有人在做 @zikajk 于 3 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
editor-code-assistant/eca#661 · 已指派 1 人 ·
维护者通常 2 天内回复
-
Anthropic API-key requests fail with "credit balance is too low"可能已有人在做 @stamdrovas 今天认领。 未关闭
editor-code-assistant/eca#666 ·
维护者通常 2 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
editor-code-assistant/eca#664 · 1 条评论 ·
维护者通常 2 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 25/100
editor-code-assistant/eca#652 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 5/5 一周以上 新手友好度 12/100
editor-code-assistant/eca#648 · 1 条评论 ·
维护者通常 2 天内回复
查看 editor-code-assistant/eca 的全部 Issue
相似的 Issue
-
needs triage
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
.Frontend .Team/UXWest Priority:P3 Querying/Filters Type:Bug
难度 2/5 1-3 小时 新手友好度 76/100
metabase/metabase#85298 · 1 条评论 ·
维护者通常 1 天内回复
-
pgwire tokens-reqd
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
Evals take an extra 40ms each on Linux, since the server doesn't set TCP_NODELAY可能已有人在做 @bbatsov 于 2 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
software-mansion/starknet-jvm#641 ·