Skip to content

替换 models.dev 地址 #44

Closed
Closed

Description

@xrgzs

问题

裸连无法拉取模型列表(/v1/models)

Image

背景

models.dev 在不使用代理的情况下无法访问,但是 OpenCode 并不依赖这个域名:

https://github.com/anomalyco/opencode/blob/b471c2b4495747353af768fbf2e0790c9d820ce2/packages/core/src/models-dev.ts#L160-L164

建议

建议将 models.dev 改为与官方一致的 https://models.opencode.ai 。

Activity

  1. added a commit that references this issue on Oct 7, 2026
  2. jasonxu114514 commented on Oct 7, 2026

    @jasonxu114514
    Owner

    已在 v1.3.6 将价格、弃用及模型限制元数据的默认来源统一改为 https://models.opencode.ai/api.json,不再依赖直连 models.dev。

    已确认官方地址返回 opencode / opencode-go 的 cost 和 limit 字段。保留旧 .models.dev.json 缓存文件名及缓存格式兼容性;升级无需删除缓存,刷新失败继续保留已有数据。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions