Skip to content

[FEATURE]: opencode.jsonc should support inheriting data from anomalyco/models.dev via properties when configuring provider models #53847

Open

Description

@linghengqian

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "test-website": {
      "npm": "@ai-sdk/openai",
      "options": {
        "baseURL": "https://test.website.com",
        "apiKey": "test-key"
      },
      "models": {
        "gpt-5.6-luna": {
          "name": "GPT-5.6 Luna","family": "gpt-luna","release_date": "2026-07-09",
          "attachment": true,"reasoning": true,"temperature": false,"tool_call": true,
          "modalities": {"input": ["text","image","pdf"],"output": ["text"]},
          "limit": {"context": 1050000,"input": 922000,"output": 128000}
        },
        "gpt-5.6-terra": {
          "name": "GPT-5.6 Terra","family": "gpt-terra","release_date": "2026-07-09",
          "attachment": true,"reasoning": true,"temperature": false,"tool_call": true,
          "modalities": {"input": ["text","image","pdf"],"output": ["text"]},
          "limit": {"context": 1050000,"input": 922000,"output": 128000}
        },
        "gpt-5.6-sol": {
          "name": "GPT-5.6 Sol","family": "gpt-sol","release_date": "2026-07-09",
          "attachment": true,"reasoning": true,"temperature": false,"tool_call": true,
          "modalities": {"input": ["text","image","pdf"],"output": ["text"]},
          "limit": {"context": 1050000,"input": 922000,"output": 128000}
        },
        "deepseek-v4-flash": {
          "name": "DeepSeek V4 Flash","family": "deepseek-flash","release_date": "2026-04-24",
          "attachment": false,"reasoning": false,"temperature": true,"tool_call": true,
          "modalities": {"input": ["text"],"output": ["text"]},
          "limit": {"context": 1000000,"output": 65536},
          "provider": {
            "npm": "@ai-sdk/openai-compatible"
          },
          "variants": {
            "low": {"reasoningEffort": "low"},
            "medium": {"reasoningEffort": "medium"},
            "high": {"reasoningEffort": "high"},
            "none": {"reasoningEffort": "none"}
          }
        }
      }
    }
  }
}
  • Currently, users are forced to visit https://github.com/anomalyco/models.dev to find configuration details for each model and manually convert model attributes—such as those found in gpt-5.6-luna.toml, gpt-5.6-terra.toml, gpt-5.6-sol.toml, and deepseek-v4-flash.toml—from TOML format into the JSON format required by opencode.jsonc.
  • anomalyco/opencode lacks a mechanism for directly referencing configurations from anomalyco/models.dev. I believe it would be entirely feasible to support configurations with extends and override directives, allowing opencode.jsonc to inherit from and override configurations from anomalyco/models.dev. This would significantly simplify the mental burden of maintaining configurations.
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "test-website": {
      "npm": "@ai-sdk/openai",
      "options": {
        "baseURL": "https://test.website.com",
        "apiKey": "test-key"
      },
      "models": {
        "gpt-5.6-luna": {
          "extends": {
            "url": [
              "https://raw.githubusercontent.com/anomalyco/models.dev/refs/heads/dev/models/openai/gpt-5.6-luna.toml",
              "https://github.com/anomalyco/models.dev/raw/refs/heads/dev/providers/openai/models/gpt-5.6-luna.toml"
            ]
          }
        },
        "gpt-5.6-terra": {
          "extends": {
            "url": [
              "https://raw.githubusercontent.com/anomalyco/models.dev/refs/heads/dev/models/openai/gpt-5.6-terra.toml",
              "https://raw.githubusercontent.com/anomalyco/models.dev/refs/heads/dev/providers/openai/models/gpt-5.6-terra.toml"
            ]
          }
        },
        "gpt-5.6-sol": {
          "extends": {
            "url": "https://raw.githubusercontent.com/anomalyco/models.dev/refs/heads/dev/models/openai/gpt-5.6-sol.toml"
            "url": [
              "https://raw.githubusercontent.com/anomalyco/models.dev/refs/heads/dev/models/openai/gpt-5.6-sol.toml",
              "https://raw.githubusercontent.com/anomalyco/models.dev/refs/heads/dev/providers/openai/models/gpt-5.6-sol.toml"
            ]
          }
        },
        "deepseek-v4-flash": {
          "extends": {
            "url": [
              "https://raw.githubusercontent.com/anomalyco/models.dev/refs/heads/dev/models/deepseek/deepseek-v4-flash.toml",
              "https://raw.githubusercontent.com/anomalyco/models.dev/refs/heads/dev/providers/deepseek/models/deepseek-v4-flash.toml"
            ]
            "override": {
              "reasoning": false,
              "limit": {
                "output": 65536
              }
            }
          },
          "provider": {
            "npm": "@ai-sdk/openai-compatible"
          },
          "variants": {
            "low": {"reasoningEffort": "low"},
            "medium": {"reasoningEffort": "medium"},
            "high": {"reasoningEffort": "high"},
            "none": {"reasoningEffort": "none"}
          }
        }
      }
    }
  }
}

Activity

  1. opencode-agent commented on Oct 8, 2026

    @opencode-agent
    Contributor

    Thanks for re-filing this, @linghengqian. You're asking for a model under a custom provider in opencode.jsonc to be able to inherit its definition from models.dev (limits, modalities, reasoning, attachment and so on) and override only the fields that differ, so you don't have to copy each TOML file into JSON by hand.

    Maintainers will consider it. Related issues and PRs:

    One note on the design: OpenCode v2 already bundles and refreshes the models.dev catalog itself. A reference by catalog ID (for example openai/gpt-5.6-luna) plus overrides might be simpler for you than fetching raw GitHub TOML URLs, because those paths change when models.dev reorganizes its files.

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

Metadata

Metadata

Assignees

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