Skip to content
Source
Sign inSign up
TanStack/schemas

Use models.dev as OpenCode's own source for opencode and opencode-go #265

Send to my agent
Closedtombeckenham opened this issue 1 comment
tombeckenhamcommented

Problem

docs/source-silent/opencode.md and opencode-go.md mark context window, max output, modalities, capabilities, request map, and endpoint as "source silent" for every OpenCode row. The gap report shows OpenCode Zen and Go with only prices.

But OpenCode does publish these facts. models.dev is OpenCode's own catalog: both are in the anomalyco GitHub org (anomalyco/opencode, anomalyco/models.dev), and the OpenCode app reads its model list from it. For the opencode and opencode-go providers, models.dev is the first-party source, not a third party.

The ledger itself notes that the Zen docs name each model's route and AI SDK package. That is the per-model wire (@ai-sdk/anthropic → Messages, @ai-sdk/openai → Responses, @ai-sdk/google → Gemini, else Chat Completions).

Ask

  1. Treat https://models.dev/api.json as a native source for opencode and opencode-go only. Record it in factSources with that URL.
  2. Fill context window, max output, modalities, capabilities, reasoning (reasoning_options), and requestMap.replayReasoningContent (interleaved.field) from it.
  3. Fill schemaEndpointId per model from the Zen docs' route and AI SDK package.
  4. Remove the OpenCode entries from the source-silent ledger.
  5. Keep the rule that models.dev is not a source for any other provider.

Acceptance

  • bun run gap:report shows opencode and opencode-go with no silent facts and a score of 1, or a real silent entry with a URL.
  • A Claude row on OpenCode has the Messages endpoint. A GPT row has Responses.
  1. tombeckenham added labelsenhancement

  2. Verified against the deployed public catalog after reviewed PR #292 (04eee60e88f750a4c07333615f5c17754400c76e). OpenCode Zen: 83 chat rows, gap score 1. OpenCode Go: 32 chat rows, gap score 1. Native Claude bindings use v1/messages; native GPT bindings use v1/responses (including Zen gpt-5 and Go gpt-5.6-luna).

    The automatic adapter reads models.dev as OpenCode's own source only, with URL/hash provenance, and reads OpenCode's own route documentation. Broad blanket ledger claims were replaced with audited exact-model omissions; unknown values remain null. Required CI, independent review, and the production Worker build passed.

  3. tombeckenham closed this

Sign in to join this conversation.