Feature hasn't been suggested before.
Describe the enhancement you want to request
TL;DR: Allow a model in a custom provider to reference/alias an official model definition from Models.dev by ID, so limit, modalities, reasoning, interleaved, cost, etc. are inherited automatically without manual duplication.
Problem
Many users run self-hosted gateways or proxies (e.g. LiteLLM, OpenRouter-style routers, or enterprise AI hubs) that re-expose models already cataloged in Models.dev under providers like zai, moonshotai, minimax, anthropic, etc. Currently, every custom provider that offers these models must manually re-specify all model metadata:
When the same models appear under multiple custom providers, all metadata is duplicated. This is error-prone and drifts out of sync with upstream model updates.
Suggested behavior
Add a way for a model in a custom provider to reference an official model definition. Proposed syntax options:
Option A — ref field (model-level reference)
Option B — use id to auto-resolve from global Models.dev index
If a model id matches a known model in any Models.dev provider, automatically hydrate metadata:
In both options, explicit user config fields should take precedence over the referenced definition (deep merge with user wins).
Benefits
- DRY — no more duplicating limit, modalities, reasoning, interleaved, cost across custom providers.
- Accuracy — metadata stays in sync with Models.dev as upstream providers update specs.
- Ergonomics — adding a model to a custom gateway becomes a one-liner instead of a 10-line block.
Related
Feature hasn't been suggested before.
Describe the enhancement you want to request
TL;DR: Allow a model in a custom provider to reference/alias an official model definition from Models.dev by ID, so limit, modalities, reasoning, interleaved, cost, etc. are inherited automatically without manual duplication.
Problem
Many users run self-hosted gateways or proxies (e.g. LiteLLM, OpenRouter-style routers, or enterprise AI hubs) that re-expose models already cataloged in Models.dev under providers like
zai,moonshotai,minimax,anthropic, etc. Currently, every custom provider that offers these models must manually re-specify all model metadata:{ "provider": { "my-gateway": { "npm": "@ai-sdk/openai-compatible", "options": { "baseURL": "http://my-gateway.example.com/api/v1" }, "models": { "glm-5.1": { "name": "GLM-5.1", "reasoning": true, "tool_call": true, "temperature": true, "attachment": false, "interleaved": { "field": "reasoning_content" }, "modalities": { "input": ["text"], "output": ["text"] }, "limit": { "context": 200000, "output": 131072 } }, "kimi-k2.6": { "name": "Kimi-K2.6", "reasoning": true, "tool_call": true, "temperature": true, "attachment": true, "modalities": { "input": ["text", "image"], "output": ["text"] }, "limit": { "context": 262144, "output": 131072 } }, "MiniMax-M2.7": { "name": "MiniMax-M2.7", "reasoning": true, "tool_call": true, "temperature": true, "modalities": { "input": ["text"], "output": ["text"] }, "limit": { "context": 204800, "output": 131072 } } } } } }When the same models appear under multiple custom providers, all metadata is duplicated. This is error-prone and drifts out of sync with upstream model updates.
Suggested behavior
Add a way for a model in a custom provider to reference an official model definition. Proposed syntax options:
Option A —
reffield (model-level reference){ "provider": { "my-gateway": { "npm": "@ai-sdk/openai-compatible", "options": { "baseURL": "http://my-gateway.example.com/api/v1" }, "models": { "glm-5.1": { "ref": "zai/glm-5.1" }, "kimi-k2.6": { "ref": "moonshotai/kimi-k2.6" }, "MiniMax-M2.7": { "ref": "minimax/MiniMax-M2.7" } } } } }Option B — use
idto auto-resolve from global Models.dev indexIf a model
idmatches a known model in any Models.dev provider, automatically hydrate metadata:{ "provider": { "my-gateway": { "npm": "@ai-sdk/openai-compatible", "options": { "baseURL": "http://my-gateway.example.com/api/v1" }, "models": { "glm-5.1": {}, // auto-resolved from zai/glm-5.1 in Models.dev "kimi-k2.6": {}, // auto-resolved from moonshotai/kimi-k2.6 "MiniMax-M2.7": {} // auto-resolved from minimax/MiniMax-M2.7 } } } }In both options, explicit user config fields should take precedence over the referenced definition (deep merge with user wins).
Benefits
Related
/v1/modelsendpoint (complementary but different: that issue is about runtime discovery, this issue is about static config referencing).limitis not defined (this would also be mitigated by auto-hydration from Models.dev).