[PR #12528] feat: add models.dev schema ref for model autocomplete in opencode.json #14250

Closed
opened 2026-02-16 18:19:03 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/12528

State: closed
Merged: Yes


Adds external $ref to model fields in opencode.json schema, enabling editors to provide autocomplete for all available models from https://models.dev/model-schema.json.

Affected fields:

  • model (root level)
  • small_model (root level)
  • agent.*.model
  • command.*.model

Includes a patch for @standard-community/standard-openapi@0.2.9 which has a bug where external $ref URLs (like https://models.dev/model-schema.json#/$defs/Model) get incorrectly converted to local #/components/schemas/Model refs, colliding with existing schemas. Upstream fix: standard-community/standard-openapi#11, related issue: standard-community/standard-openapi#8

Related: anomalyco/models.dev#767

Screenshot 2026-02-04 at 12 48 16
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/12528 **State:** closed **Merged:** Yes --- Adds external $ref to model fields in opencode.json schema, enabling editors to provide autocomplete for all available models from https://models.dev/model-schema.json. Affected fields: - `model` (root level) - `small_model` (root level) - `agent.*.model` - `command.*.model` Includes a patch for `@standard-community/standard-openapi@0.2.9` which has a bug where external `$ref` URLs (like `https://models.dev/model-schema.json#/$defs/Model`) get incorrectly converted to local `#/components/schemas/Model` refs, colliding with existing schemas. Upstream fix: standard-community/standard-openapi#11, related issue: standard-community/standard-openapi#8 Related: anomalyco/models.dev#767 <img width="899" height="505" alt="Screenshot 2026-02-04 at 12 48 16" src="https://github.com/user-attachments/assets/7b0462a2-62fa-44c1-a87e-17fae91eb80a" />
yindo added the pull-request label 2026-02-16 18:19:03 -05:00
yindo closed this issue 2026-02-16 18:19:03 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14250