Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

feat: refresh model metadata and reasoning options (#11106)

Shahmir Varqha40c8acde850b
diff --git a/packages/llm-info/AGENTS.md b/packages/llm-info/AGENTS.md
index 4a1d1023fe..8926e65c99 100644
--- a/packages/llm-info/AGENTS.md
+++ b/packages/llm-info/AGENTS.md
@@ -1 +1 @@
-Refer to `skills/SKILL.md` for adding descriptions to models.
+Refer to `skills/SKILL.md` for catalog descriptions and metadata enrichment.
diff --git a/packages/llm-info/README.md b/packages/llm-info/README.md
index 8449511f36..008546ac8a 100644
--- a/packages/llm-info/README.md
+++ b/packages/llm-info/README.md
@@ -15,7 +15,7 @@ If you want to add a new LLM model or provider, you can do so by editing the YAM
## Syncing from `models.dev`
-`pnpm sync-models` adds the latest models from [`models.dev`](https://models.dev/api.json) to the top of each provider section in `models.yml`. Existing entries are preserved. Run `pnpm codegen` afterwards.
+`pnpm sync-models` adds the latest models from [`models.dev`](https://models.dev/api.json) to the top of each provider section in `models.yml`. Existing names, descriptions, and roles are preserved. Machine-sourced metadata is refreshed when upstream supplies it: capabilities, input/output types, release dates, pricing, reasoning options, and token limits. Run `pnpm codegen` afterwards.
`google-vertex` maps into the `google` section, so Anthropic models with `@default` ids (e.g. `claude-opus-5@default`) are Vertex-only — note that in their `description` if you keep them.
@@ -23,5 +23,31 @@ If you want to add a new LLM model or provider, you can do so by editing the YAM
pnpm sync-models # all providers, 10 newest each
pnpm sync-models --provider=anthropic # one provider
pnpm sync-models -p openai,google -n 5 # multiple providers, 5 each
+pnpm sync-models --metadata-only # refresh existing metadata, add no models
pnpm sync-models --replace # destructive rebuild
```
+
+## Model Metadata
+
+Each provider/model entry can include optional `reasoning_options` and `limits`:
+
+```yaml
+reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+limits: {context: 1000000, output: 128000}
+```
+
+Reasoning options mirror models.dev: `effort` lists accepted values (including
+`null` or `default` when explicitly listed upstream), `toggle` indicates an
+on/off control, and `budget_tokens` includes optional `min` and `max` bounds.
+A budget minimum of `-1` retains the upstream automatic-budget sentinel.
+Token limits are measured in tokens; values are preserved as supplied upstream,
+including zero. Omitted metadata is unknown, not an unsupported capability.
+
+Do not copy options between providers or normalize model aliases to enrich
+metadata: their endpoints can expose different controls and limits.
+
+Use `--metadata-only` to refresh all machine-sourced metadata in the current catalog without adding models. `--metadata-only`
+cannot be combined with `--replace`. When upstream omits a field or no exact
+provider/model match exists, existing metadata is preserved.
diff --git a/packages/llm-info/data/models.yml b/packages/llm-info/data/models.yml
index 39b8cf56c2..b342593841 100644
--- a/packages/llm-info/data/models.yml
+++ b/packages/llm-info/data/models.yml
@@ -9,6 +9,10 @@ anthropic:
output_types: [text]
release_date: 2026-09-28
cost: {input: 2, output: 10}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: Claude Opus 5.5
model: claude-opus-5-5
@@ -19,6 +23,10 @@ anthropic:
output_types: [text]
release_date: 2026-09-22
cost: {input: 4, output: 20}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: Claude Fable 5.1
model: claude-fable-5-1
@@ -29,6 +37,10 @@ anthropic:
output_types: [text]
release_date: 2026-09-01
cost: {input: 10, output: 50}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: Claude Opus 5
model: claude-opus-5
@@ -39,6 +51,10 @@ anthropic:
output_types: [text]
release_date: 2026-07-24
cost: {input: 5, output: 25}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: Claude Fable 5
model: claude-fable-5
@@ -47,8 +63,12 @@ anthropic:
capabilities: [thinking, tool_calling]
input_types: [text, image, pdf]
output_types: [text]
- release_date: 2026-06-09
+ release_date: 2026-06-07
cost: {input: 10, output: 50}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: Claude Sonnet 5
model: claude-sonnet-5
@@ -57,8 +77,13 @@ anthropic:
capabilities: [thinking, tool_calling]
input_types: [text, image, pdf]
output_types: [text]
- release_date: 2026-06-30
+ release_date: 2026-06-29
cost: {input: 2, output: 10}
+ reasoning_options:
+ - type: toggle
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: Claude Opus 4.8
model: claude-opus-4-8
@@ -69,6 +94,10 @@ anthropic:
output_types: [text]
release_date: 2026-05-28
cost: {input: 5, output: 25}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: Claude Sonnet 4.6
model: claude-sonnet-4-6
@@ -79,6 +108,12 @@ anthropic:
output_types: [text]
release_date: 2026-02-17
cost: {input: 3, output: 15}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, max]
+ - type: budget_tokens
+ min: 1024
+ limits: {context: 1000000, output: 128000}
- name: Claude Haiku 4.5
model: claude-haiku-4-5
@@ -89,6 +124,10 @@ anthropic:
output_types: [text]
release_date: 2025-10-15
cost: {input: 1, output: 5}
+ reasoning_options:
+ - type: budget_tokens
+ min: 1024
+ limits: {context: 200000, output: 64000}
openai:
- name: GPT-6.1 Sol
@@ -100,6 +139,10 @@ openai:
output_types: [text]
release_date: 2026-09-29
cost: {input: 2, output: 10}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: GPT-6 Luna
model: gpt-6-luna
@@ -110,6 +153,10 @@ openai:
output_types: [text]
release_date: 2026-09-22
cost: {input: 0.1, output: 0.5}
+ reasoning_options:
+ - type: effort
+ values: [none, low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: GPT-6 Sol
model: gpt-6-sol
@@ -120,6 +167,10 @@ openai:
output_types: [text]
release_date: 2026-09-22
cost: {input: 2, output: 10}
+ reasoning_options:
+ - type: effort
+ values: [none, low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: Daybreak Blue
model: gpt-daybreak-blue-latest
@@ -130,6 +181,10 @@ openai:
output_types: [text]
release_date: 2026-08-07
cost: {input: 4, output: 20}
+ reasoning_options:
+ - type: effort
+ values: [none, low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: Daybreak Red
model: gpt-daybreak-red-latest
@@ -140,6 +195,10 @@ openai:
output_types: [text]
release_date: 2026-08-07
cost: {input: 12.5, output: 75}
+ reasoning_options:
+ - type: effort
+ values: [none, low, medium, high, xhigh, max]
+ limits: {context: 400000, output: 128000}
- name: GPT-6 Astra
model: gpt-6-astra
@@ -150,6 +209,10 @@ openai:
output_types: [text]
release_date: 2026-09-04
cost: {input: 10, output: 50}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: GPT-5.6
model: gpt-5.6
@@ -159,7 +222,11 @@ openai:
input_types: [text, image, pdf]
output_types: [text]
release_date: 2026-07-09
- cost: {input: 5, output: 30}
+ cost: {input: 4, output: 20}
+ reasoning_options:
+ - type: effort
+ values: [none, low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: GPT-5.6 Luna
model: gpt-5.6-luna
@@ -169,7 +236,11 @@ openai:
input_types: [text, image, pdf]
output_types: [text]
release_date: 2026-07-09
- cost: {input: 1, output: 6}
+ cost: {input: 0.2, output: 1.2}
+ reasoning_options:
+ - type: effort
+ values: [none, low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: GPT-5.6 Sol
model: gpt-5.6-sol
@@ -179,7 +250,11 @@ openai:
input_types: [text, image, pdf]
output_types: [text]
release_date: 2026-07-09
- cost: {input: 5, output: 30}
+ cost: {input: 4, output: 20}
+ reasoning_options:
+ - type: effort
+ values: [none, low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: GPT-5.6 Terra
model: gpt-5.6-terra
@@ -189,7 +264,11 @@ openai:
input_types: [text, image, pdf]
output_types: [text]
release_date: 2026-07-09
- cost: {input: 2.5, output: 15}
+ cost: {input: 2, output: 12}
+ reasoning_options:
+ - type: effort
+ values: [none, low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: GPT-5.5
model: gpt-5.5
@@ -200,6 +279,10 @@ openai:
output_types: [text]
release_date: 2026-04-23
cost: {input: 5, output: 30}
+ reasoning_options:
+ - type: effort
+ values: [none, low, medium, high, xhigh]
+ limits: {context: 1050000, output: 128000}
google:
- name: Claude Sonnet 5.5
@@ -211,6 +294,10 @@ google:
output_types: [text]
release_date: 2026-09-28
cost: {input: 2, output: 10}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: Claude Opus 5.5
model: claude-opus-5-5@default
@@ -221,6 +308,10 @@ google:
output_types: [text]
release_date: 2026-09-22
cost: {input: 4, output: 20}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: Grok 4.6
model: xai/grok-4.6
@@ -231,6 +322,8 @@ google:
output_types: [text]
release_date: 2026-08-12
cost: {input: 2, output: 6}
+ reasoning_options: []
+ limits: {context: 524288, output: 500000}
- name: Gemini 3.8 Flash
model: gemini-3.8-flash
@@ -241,6 +334,10 @@ google:
output_types: [text]
release_date: 2026-09-02
cost: {input: 0.75, output: 3.75}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high]
+ limits: {context: 1048576, output: 65536}
- name: Claude Fable 5.1
model: claude-fable-5-1@default
@@ -251,6 +348,10 @@ google:
output_types: [text]
release_date: 2026-09-01
cost: {input: 10, output: 50}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: Gemini Flash Latest
model: gemini-flash-latest
@@ -261,6 +362,10 @@ google:
output_types: [text]
release_date: 2026-08-13
cost: {input: 0.75, output: 3.75}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high]
+ limits: {context: 1048576, output: 65536}
- name: Gemini 3.7 Flash
model: gemini-3.7-flash
@@ -271,6 +376,10 @@ google:
output_types: [text]
release_date: 2026-08-13
cost: {input: 0.75, output: 3.75}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high]
+ limits: {context: 1048576, output: 65536}
- name: Gemma 4 26B A4B IT
model: gemma-4-26b-a4b-it
@@ -280,6 +389,9 @@ google:
input_types: [text, image]
output_types: [text]
release_date: 2026-04-02
+ reasoning_options:
+ - type: toggle
+ limits: {context: 262144, output: 32768}
- name: Gemma 4 31B IT
model: gemma-4-31b-it
@@ -289,6 +401,9 @@ google:
input_types: [text, image]
output_types: [text]
release_date: 2026-04-02
+ reasoning_options:
+ - type: toggle
+ limits: {context: 262144, output: 32768}
- name: Nano Banana 2 Lite
model: gemini-3.1-flash-lite-image
@@ -299,6 +414,10 @@ google:
output_types: [text, image]
release_date: 2026-06-30
cost: {input: 0.25, output: 30}
+ reasoning_options:
+ - type: effort
+ values: [minimal, high]
+ limits: {context: 65536, output: 4096}
- name: Nano Banana 2
model: gemini-3.1-flash-image
@@ -309,6 +428,10 @@ google:
output_types: [text, image]
release_date: 2026-05-28
cost: {input: 0.5, output: 60}
+ reasoning_options:
+ - type: effort
+ values: [minimal, high]
+ limits: {context: 131072, output: 32768}
- name: Claude Opus 5
model: claude-opus-5@default
@@ -319,6 +442,10 @@ google:
output_types: [text]
release_date: 2026-07-24
cost: {input: 5, output: 25}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: Claude Sonnet 5
model: claude-sonnet-5@default
@@ -329,6 +456,11 @@ google:
output_types: [text]
release_date: 2026-06-30
cost: {input: 2, output: 10}
+ reasoning_options:
+ - type: toggle
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: Claude Opus 4.8
model: claude-opus-4-8@default
@@ -339,6 +471,10 @@ google:
output_types: [text]
release_date: 2026-05-28
cost: {input: 5, output: 25}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
bedrock:
- name: GPT-6.1 Sol (Global)
@@ -350,6 +486,10 @@ bedrock:
output_types: [text]
release_date: 2026-09-29
cost: {input: 2, output: 10}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: Claude Opus 5.5 (Global)
model: global.anthropic.claude-opus-5-5
@@ -360,6 +500,10 @@ bedrock:
output_types: [text]
release_date: 2026-09-22
cost: {input: 4, output: 20}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: GPT-6 Luna (Global)
model: global.openai.gpt-6-luna
@@ -370,16 +514,24 @@ bedrock:
output_types: [text]
release_date: 2026-09-22
cost: {input: 0.1, output: 0.5}
+ reasoning_options:
+ - type: effort
+ values: [none, low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: GPT-6 Astra (Global)
model: global.openai.gpt-6-astra
description: "OpenAI model for advanced analysis, software engineering, deep research, scientific work, and document creation"
roles: [chat, edit]
capabilities: [thinking, tool_calling]
- input_types: [text, image, pdf]
+ input_types: [text, image]
output_types: [text]
release_date: 2026-09-04
cost: {input: 10, output: 50}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: Grok 4.6 (Global)
model: global.xai.grok-4.6
@@ -390,6 +542,10 @@ bedrock:
output_types: [text]
release_date: 2026-08-12
cost: {input: 2, output: 6}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh]
+ limits: {context: 500000, output: 500000}
- name: Claude Fable 5.1 (Global)
model: global.anthropic.claude-fable-5-1
@@ -400,6 +556,10 @@ bedrock:
output_types: [text]
release_date: 2026-09-01
cost: {input: 10, output: 50}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: Grok 4.6
model: xai.grok-4.6
@@ -410,26 +570,38 @@ bedrock:
output_types: [text]
release_date: 2026-08-12
cost: {input: 2.2, output: 6.6}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh]
+ limits: {context: 500000, output: 500000}
- name: GPT-5.6 Luna (Global)
model: global.openai.gpt-5.6-luna
description: "Fast, cost-efficient model in OpenAI's GPT-5.6 series, suited for high-volume, latency-sensitive chat and lightweight agentic workflows"
roles: [chat, edit]
capabilities: [thinking, tool_calling]
- input_types: [text, image, pdf]
+ input_types: [text, image]
output_types: [text]
release_date: 2026-07-09
- cost: {input: 0.22, output: 1.32}
+ cost: {input: 0.2, output: 1.2}
+ reasoning_options:
+ - type: effort
+ values: [none, low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: GPT-5.6 Sol (Global)
model: global.openai.gpt-5.6-sol
description: "Flagship model in OpenAI's GPT-5.6 series, suited for complex reasoning, coding, and agentic workflows"
roles: [chat, edit]
capabilities: [thinking, tool_calling]
- input_types: [text, image, pdf]
+ input_types: [text, image]
output_types: [text]
release_date: 2026-07-09
- cost: {input: 5.5, output: 33}
+ cost: {input: 4, output: 20}
+ reasoning_options:
+ - type: effort
+ values: [none, low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: Claude Opus 5 (Global)
model: global.anthropic.claude-opus-5
@@ -440,6 +612,11 @@ bedrock:
output_types: [text]
release_date: 2026-07-24
cost: {input: 5, output: 25}
+ reasoning_options:
+ - type: toggle
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: GPT-5.6 Luna
model: openai.gpt-5.6-luna
@@ -449,7 +626,11 @@ bedrock:
input_types: [text, image, pdf]
output_types: [text]
release_date: 2026-07-09
- cost: {input: 1, output: 6}
+ cost: {input: 0.22, output: 1.32}
+ reasoning_options:
+ - type: effort
+ values: [none, low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: GPT-5.6 Sol
model: openai.gpt-5.6-sol
@@ -459,7 +640,11 @@ bedrock:
input_types: [text, image, pdf]
output_types: [text]
release_date: 2026-07-09
- cost: {input: 5, output: 30}
+ cost: {input: 4.4, output: 22}
+ reasoning_options:
+ - type: effort
+ values: [none, low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: GPT-5.6 Terra
model: openai.gpt-5.6-terra
@@ -469,7 +654,11 @@ bedrock:
input_types: [text, image, pdf]
output_types: [text]
release_date: 2026-07-09
- cost: {input: 2.5, output: 15}
+ cost: {input: 2.2, output: 13.2}
+ reasoning_options:
+ - type: effort
+ values: [none, low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: Claude Fable 5 (Global)
model: global.anthropic.claude-fable-5
@@ -480,6 +669,10 @@ bedrock:
output_types: [text]
release_date: 2026-06-09
cost: {input: 10, output: 50}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: Claude Sonnet 5 (Global)
model: global.anthropic.claude-sonnet-5
@@ -490,6 +683,11 @@ bedrock:
output_types: [text]
release_date: 2026-06-30
cost: {input: 2, output: 10}
+ reasoning_options:
+ - type: toggle
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: Claude Fable 5 (Global)
model: global.anthropic.claude-fable-5
@@ -500,6 +698,10 @@ bedrock:
output_types: [text]
release_date: 2026-06-09
cost: {input: 10, output: 50}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: Claude Sonnet 5 (Global)
model: global.anthropic.claude-sonnet-5
@@ -510,6 +712,11 @@ bedrock:
output_types: [text]
release_date: 2026-06-30
cost: {input: 2, output: 10}
+ reasoning_options:
+ - type: toggle
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: Claude Opus 4.8 (Global)
model: global.anthropic.claude-opus-4-8
@@ -520,6 +727,11 @@ bedrock:
output_types: [text]
release_date: 2026-05-28
cost: {input: 5, output: 25}
+ reasoning_options:
+ - type: toggle
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: GLM-5
model: zai.glm-5
@@ -528,8 +740,11 @@ bedrock:
capabilities: [thinking, tool_calling]
input_types: [text]
output_types: [text]
- release_date: 2026-03-18
+ release_date: 2026-02-12
cost: {input: 1, output: 3.2}
+ reasoning_options:
+ - type: toggle
+ limits: {context: 202752, output: 131072}
- name: NVIDIA Nemotron 3 Super 120B A12B
model: nvidia.nemotron-super-3-120b
@@ -540,6 +755,8 @@ bedrock:
output_types: [text]
release_date: 2026-03-11
cost: {input: 0.15, output: 0.65}
+ reasoning_options: []
+ limits: {context: 262144, output: 131072}
- name: Claude Sonnet 4.6
model: anthropic.claude-sonnet-4-6
@@ -549,7 +766,14 @@ bedrock:
input_types: [text, image, pdf]
output_types: [text]
release_date: 2026-02-17
- cost: {input: 3, output: 15}
+ cost: {input: 3.3, output: 16.5}
+ reasoning_options:
+ - type: toggle
+ - type: effort
+ values: [low, medium, high, max]
+ - type: budget_tokens
+ min: 1024
+ limits: {context: 1000000, output: 128000}
azure:
- name: GPT-6.1 Sol
@@ -561,6 +785,10 @@ azure:
output_types: [text]
release_date: 2026-09-29
cost: {input: 2, output: 10}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: Claude Sonnet 5.5
model: claude-sonnet-5-5
@@ -571,6 +799,10 @@ azure:
output_types: [text]
release_date: 2026-09-28
cost: {input: 2, output: 10}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: Claude Opus 5.5
model: claude-opus-5-5
@@ -581,6 +813,10 @@ azure:
output_types: [text]
release_date: 2026-09-22
cost: {input: 4, output: 20}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: GPT-6 Luna
model: gpt-6-luna
@@ -591,6 +827,10 @@ azure:
output_types: [text]
release_date: 2026-09-22
cost: {input: 0.1, output: 0.5}
+ reasoning_options:
+ - type: effort
+ values: [none, low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: GPT-6 Sol
model: gpt-6-sol
@@ -601,6 +841,10 @@ azure:
output_types: [text]
release_date: 2026-09-22
cost: {input: 2, output: 10}
+ reasoning_options:
+ - type: effort
+ values: [none, low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: GPT Image 2.5 Flare
model: gpt-image-2.5-flare
@@ -611,6 +855,7 @@ azure:
output_types: [image]
release_date: 2026-09-08
cost: {input: 5, output: 30}
+ limits: {context: 0, output: 0}
- name: GPT Image 2.5 Sunburst
model: gpt-image-2.5-sunburst
@@ -621,6 +866,7 @@ azure:
output_types: [image]
release_date: 2026-09-08
cost: {input: 5, output: 30}
+ limits: {context: 0, output: 0}
- name: GPT-6 Astra
model: gpt-6-astra
@@ -631,6 +877,10 @@ azure:
output_types: [text]
release_date: 2026-09-04
cost: {input: 10, output: 50}
+ reasoning_options:
+ - type: effort
+ values: [none, low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: Claude Fable 5.1
model: claude-fable-5-1
@@ -641,6 +891,10 @@ azure:
output_types: [text]
release_date: 2026-09-01
cost: {input: 10, output: 50}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: Grok 4.6
model: grok-4.6
@@ -650,6 +904,10 @@ azure:
input_types: [text, image]
output_types: [text]
release_date: 2026-08-12
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh]
+ limits: {context: 200000, output: 128000}
- name: Claude Opus 5
model: claude-opus-5
@@ -660,6 +918,10 @@ azure:
output_types: [text]
release_date: 2026-07-24
cost: {input: 5, output: 25}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: GPT-5.6 Luna
model: gpt-5.6-luna
@@ -669,7 +931,11 @@ azure:
input_types: [text, image, pdf]
output_types: [text]
release_date: 2026-07-09
- cost: {input: 1, output: 6}
+ cost: {input: 0.2, output: 1.2}
+ reasoning_options:
+ - type: effort
+ values: [none, low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: GPT-5.6 Sol
model: gpt-5.6-sol
@@ -679,7 +945,11 @@ azure:
input_types: [text, image, pdf]
output_types: [text]
release_date: 2026-07-09
- cost: {input: 5, output: 30}
+ cost: {input: 4, output: 20}
+ reasoning_options:
+ - type: effort
+ values: [none, low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: GPT-5.6 Terra
model: gpt-5.6-terra
@@ -689,7 +959,11 @@ azure:
input_types: [text, image, pdf]
output_types: [text]
release_date: 2026-07-09
- cost: {input: 2.5, output: 15}
+ cost: {input: 2, output: 12}
+ reasoning_options:
+ - type: effort
+ values: [none, low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: GPT Chat Latest
model: gpt-chat-latest
@@ -700,6 +974,10 @@ azure:
output_types: [text]
release_date: 2026-05-05
cost: {input: 5, output: 30}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high]
+ limits: {context: 400000, output: 128000}
- name: Claude Fable 5
model: claude-fable-5
@@ -710,6 +988,10 @@ azure:
output_types: [text]
release_date: 2026-06-09
cost: {input: 10, output: 50}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: Claude Sonnet 5
model: claude-sonnet-5
@@ -720,6 +1002,11 @@ azure:
output_types: [text]
release_date: 2026-06-30
cost: {input: 2, output: 10}
+ reasoning_options:
+ - type: toggle
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: GPT-5.5
model: gpt-5.5
@@ -730,6 +1017,10 @@ azure:
output_types: [text]
release_date: 2026-04-24
cost: {input: 5, output: 30}
+ reasoning_options:
+ - type: effort
+ values: [none, low, medium, high, xhigh]
+ limits: {context: 1050000, output: 128000}
- name: Grok 4.20 (Non-Reasoning)
model: grok-4-20-non-reasoning
@@ -740,6 +1031,7 @@ azure:
output_types: [text]
release_date: 2026-04-08
cost: {input: 2, output: 6}
+ limits: {context: 262000, output: 8192}
- name: Grok 4.20 (Reasoning)
model: grok-4-20-reasoning
@@ -750,6 +1042,8 @@ azure:
output_types: [text]
release_date: 2026-04-08
cost: {input: 2, output: 6}
+ reasoning_options: []
+ limits: {context: 262000, output: 8192}
- name: Claude Opus 4.8
model: claude-opus-4-8
@@ -760,6 +1054,10 @@ azure:
output_types: [text]
release_date: 2026-05-28
cost: {input: 5, output: 25}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1000000, output: 128000}
- name: Claude Sonnet 4.6
model: claude-sonnet-4-6
@@ -770,6 +1068,12 @@ azure:
output_types: [text]
release_date: 2026-02-17
cost: {input: 3, output: 15}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, max]
+ - type: budget_tokens
+ min: 1024
+ limits: {context: 1000000, output: 64000}
- name: DeepSeek-V4-Flash
model: deepseek-v4-flash
@@ -780,6 +1084,8 @@ azure:
output_types: [text]
release_date: 2026-04-24
cost: {input: 0.19, output: 0.51}
+ reasoning_options: []
+ limits: {context: 1000000, output: 384000}
- name: DeepSeek-V4-Pro
model: deepseek-v4-pro
@@ -790,6 +1096,8 @@ azure:
output_types: [text]
release_date: 2026-04-24
cost: {input: 1.74, output: 3.48}
+ reasoning_options: []
+ limits: {context: 1000000, output: 384000}
ollama:
- name: DeepSeek V4.1 Flash
@@ -800,6 +1108,12 @@ ollama:
input_types: [text, image]
output_types: [text]
release_date: 2026-09-10
+ reasoning_options:
+ - type: toggle
+ - type: effort
+ values: [low, high, max]
+ limits: {context: 1048576, output: 384000}
+ cost: {input: 0.15, output: 0.6}
- name: DeepSeek V4 Pro 0813
model: deepseek-v4-pro:0813
@@ -809,6 +1123,12 @@ ollama:
input_types: [text]
output_types: [text]
release_date: 2026-08-12
+ reasoning_options:
+ - type: toggle
+ - type: effort
+ values: [high, max]
+ limits: {context: 1048576, output: 1048576}
+ cost: {input: 0.66, output: 1.98}
- name: GLM-5.3-Flash
model: glm-5.3-flash
@@ -818,6 +1138,11 @@ ollama:
input_types: [text, image, pdf]
output_types: [text]
release_date: 2026-08-26
+ reasoning_options:
+ - type: effort
+ values: [low, high, max]
+ limits: {context: 1000000, output: 131072}
+ cost: {input: 0.15, output: 0.5}
- name: GLM-5.3
model: glm-5.3
@@ -827,6 +1152,11 @@ ollama:
input_types: [text]
output_types: [text]
release_date: 2026-08-14
+ reasoning_options:
+ - type: effort
+ values: [low, high, max]
+ limits: {context: 1048576, output: 131072}
+ cost: {input: 1.4, output: 4.4}
- name: DeepSeek V4 Flash 0731
model: deepseek-v4-flash:0731
@@ -836,6 +1166,12 @@ ollama:
input_types: [text]
output_types: [text]
release_date: 2026-07-31
+ reasoning_options:
+ - type: toggle
+ - type: effort
+ values: [high, max]
+ limits: {context: 1048576, output: 1048576}
+ cost: {input: 0.22, output: 0.66}
- name: kimi-k3
model: kimi-k3
@@ -845,6 +1181,12 @@ ollama:
input_types: [text, image]
output_types: [text]
release_date: 2026-07-16
+ reasoning_options:
+ - type: toggle
+ - type: effort
+ values: [low, high, max]
+ limits: {context: 1048576, output: 131072}
+ cost: {input: 3, output: 15}
- name: DeepSeek V4 Flash
model: deepseek-v4-flash
@@ -854,6 +1196,12 @@ ollama:
input_types: [text]
output_types: [text]
release_date: 2026-04-24
+ reasoning_options:
+ - type: toggle
+ - type: effort
+ values: [high, max]
+ limits: {context: 1048576, output: 1048576}
+ cost: {input: 0.22, output: 0.66}
- name: DeepSeek V4 Pro
model: deepseek-v4-pro
@@ -863,6 +1211,12 @@ ollama:
input_types: [text]
output_types: [text]
release_date: 2026-04-24
+ reasoning_options:
+ - type: toggle
+ - type: effort
+ values: [high, max]
+ limits: {context: 1048576, output: 1048576}
+ cost: {input: 0.66, output: 1.98}
- name: Gemma 4 31B
model: gemma4:31b
@@ -872,6 +1226,10 @@ ollama:
input_types: [text, image]
output_types: [text]
release_date: 2026-04-02
+ reasoning_options:
+ - type: toggle
+ limits: {context: 262144, output: 262144}
+ cost: {input: 0.14, output: 0.4}
- name: GLM 5.2
model: glm-5.2
@@ -881,6 +1239,11 @@ ollama:
input_types: [text]
output_types: [text]
release_date: 2026-06-13
+ reasoning_options:
+ - type: effort
+ values: [high, max]
+ limits: {context: 976000, output: 131072}
+ cost: {input: 1.4, output: 4.4}
- name: MiniMax M3
model: minimax-m3
@@ -890,6 +1253,12 @@ ollama:
input_types: [text, image]
output_types: [text]
release_date: 2026-05-31
+ reasoning_options:
+ - type: toggle
+ - type: effort
+ values: [low, medium, high, max]
+ limits: {context: 512000, output: 131072}
+ cost: {input: 0.6, output: 2.4}
- name: MiniMax M2.7
model: minimax-m2.7
@@ -899,6 +1268,10 @@ ollama:
input_types: [text]
output_types: [text]
release_date: 2026-03-18
+ reasoning_options:
+ - type: toggle
+ limits: {context: 196608, output: 196608}
+ cost: {input: 0.3, output: 1.2}
- name: NVIDIA Nemotron 3 Ultra
model: nemotron-3-ultra
@@ -908,6 +1281,10 @@ ollama:
input_types: [text]
output_types: [text]
release_date: 2026-06-04
+ reasoning_options:
+ - type: toggle
+ limits: {context: 262144, output: 128000}
+ cost: {input: 0.1, output: 3}
- name: NVIDIA Nemotron 3 Super 120B
model: nemotron-3-super
@@ -917,6 +1294,10 @@ ollama:
input_types: [text]
output_types: [text]
release_date: 2026-03-11
+ reasoning_options:
+ - type: toggle
+ limits: {context: 262144, output: 65536}
+ cost: {input: 0.015, output: 0.6}
- name: Qwen 3.5 397B
model: qwen3.5:397b
@@ -926,6 +1307,10 @@ ollama:
input_types: [text, image]
output_types: [text]
release_date: 2026-02-15
+ reasoning_options:
+ - type: toggle
+ limits: {context: 262144, output: 65536}
+ cost: {input: 0.6, output: 3.6}
wandb:
- name: DeepSeek V4.1 Flash
@@ -937,6 +1322,9 @@ wandb:
output_types: [text]
release_date: 2026-09-10
cost: {input: 0.2, output: 0.65}
+ reasoning_options:
+ - type: toggle
+ limits: {context: 1048576, output: 1048576}
- name: GLM 5.3 Flash
model: zai-org/GLM-5.3-Flash
@@ -947,6 +1335,8 @@ wandb:
output_types: [text]
release_date: 2026-08-26
cost: {input: 0.15, output: 0.5}
+ reasoning_options: []
+ limits: {context: 1048576, output: 1048576}
- name: Granite 4.2 8B
model: ibm-granite/granite-4.2-8b
@@ -957,6 +1347,9 @@ wandb:
output_types: [text]
release_date: 2026-08-24
cost: {input: 0.1, output: 0.15}
+ reasoning_options:
+ - type: toggle
+ limits: {context: 131072, output: 131072}
- name: DeepSeek V4 Pro 0813
model: deepseek-ai/DeepSeek-V4-Pro-0813
@@ -967,6 +1360,9 @@ wandb:
output_types: [text]
release_date: 2026-08-13
cost: {input: 1.31, output: 3.96}
+ reasoning_options:
+ - type: toggle
+ limits: {context: 1048576, output: 1048576}
- name: Qwen3.8 27B
model: Qwen/Qwen3.8-27B
@@ -977,6 +1373,9 @@ wandb:
output_types: [text]
release_date: 2026-08-14
cost: {input: 0.4, output: 3}
+ reasoning_options:
+ - type: toggle
+ limits: {context: 262144, output: 262144}
- name: Nemotron 3.5 Lightning
model: nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B
@@ -986,7 +1385,10 @@ wandb:
input_types: [text]
output_types: [text]
release_date: 2026-08-11
- cost: {input: 0.1, output: 0.25}
+ cost: {input: 0.07, output: 0.2}
+ reasoning_options:
+ - type: toggle
+ limits: {context: 262144, output: 262144}
- name: DeepSeek V4 Flash 0731
model: deepseek-ai/DeepSeek-V4-Flash-0731
@@ -997,6 +1399,9 @@ wandb:
output_types: [text]
release_date: 2026-07-31
cost: {input: 0.13, output: 0.28}
+ reasoning_options:
+ - type: toggle
+ limits: {context: 262144, output: 262144}
- name: MiniMax M3
model: MiniMaxAI/MiniMax-M3
@@ -1007,6 +1412,8 @@ wandb:
output_types: [text]
release_date: 2026-06-12
cost: {input: 0.23, output: 0.96}
+ reasoning_options: []
+ limits: {context: 262144, output: 262144}
- name: DeepSeek V4-Flash
model: deepseek-ai/DeepSeek-V4-Flash
@@ -1017,6 +1424,9 @@ wandb:
output_types: [text]
release_date: 2026-04-24
cost: {input: 0.14, output: 0.28}
+ reasoning_options:
+ - type: toggle
+ limits: {context: 1048576, output: 1048576}
- name: DeepSeek V4 Pro
model: deepseek-ai/DeepSeek-V4-Pro
@@ -1027,6 +1437,9 @@ wandb:
output_types: [text]
release_date: 2026-04-24
cost: {input: 1.15, output: 2.55}
+ reasoning_options:
+ - type: toggle
+ limits: {context: 1048576, output: 1048576}
- name: GLM 5.2
model: zai-org/GLM-5.2
@@ -1037,6 +1450,9 @@ wandb:
output_types: [text]
release_date: 2026-06-16
cost: {input: 0.76, output: 2.42}
+ reasoning_options:
+ - type: toggle
+ limits: {context: 1048576, output: 1048576}
- name: Nemotron 3 Ultra
model: nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B
@@ -1046,7 +1462,10 @@ wandb:
input_types: [text]
output_types: [text]
release_date: 2026-06-04
- cost: {input: 0.75, output: 2.75}
+ cost: {input: 0.5, output: 2.15}
+ reasoning_options:
+ - type: toggle
+ limits: {context: 262144, output: 262144}
- name: NVIDIA Nemotron 3 Super 120B
model: nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-FP8
@@ -1066,7 +1485,9 @@ wandb:
input_types: [text]
output_types: [text]
release_date: 2025-08-05
- cost: {input: 0.04, output: 0.14}
+ cost: {input: 0.03, output: 0.17}
+ reasoning_options: []
+ limits: {context: 131072, output: 131072}
- name: gpt-oss-20b
model: openai/gpt-oss-20b
@@ -1077,16 +1498,19 @@ wandb:
output_types: [text]
release_date: 2025-08-05
cost: {input: 0.03, output: 0.13}
+ reasoning_options: []
+ limits: {context: 131072, output: 131072}
- name: Mellum2 12B A2.5B
model: JetBrains/Mellum2-12B-A2.5B-Instruct
description: "Mellum2-12B-A2.5B-Instruct is a fast MoE model with 131K context built for coding, tool use, and low-latency AI workflows"
roles: [chat, edit]
- capabilities: [thinking, tool_calling]
+ capabilities: [tool_calling]
input_types: [text]
output_types: [text]
release_date: 2026-06-01
cost: {input: 0.05, output: 0.1}
+ limits: {context: 131072, output: 131072}
opencode-go:
- name: LongCat 2.5 Preview Free
@@ -1098,6 +1522,9 @@ opencode-go:
output_types: [text]
release_date: 2026-09-25
cost: {input: 0, output: 0}
+ reasoning_options:
+ - type: toggle
+ limits: {context: 1000000, output: 131072}
- name: Space Bunny Free
model: space-bunny-free
@@ -1108,6 +1535,10 @@ opencode-go:
output_types: [text]
release_date: 2026-09-23
cost: {input: 0, output: 0}
+ reasoning_options:
+ - type: effort
+ values: [low, medium, high, xhigh, max]
+ limits: {context: 1048576, output: 524288}
- name: GPT-6 Luna
model: gpt-6-luna
@@ -1118,6 +1549,10 @@ opencode-go:
output_types: [text]
release_date: 2026-09-22
cost: {input: 0.1, output: 0.5}
+ reasoning_options:
+ - type: effort
+ values: [none, low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: MiMo-V2.6-Flash
model: mimo-v2.6-flash
@@ -1128,6 +1563,8 @@ opencode-go:
output_types: [text]
release_date: 2026-09-22
cost: {input: 0.14, output: 0.28}
+ reasoning_options: []
+ limits: {context: 1048576, output: 131072}
- name: MiMo-V2.6-Pro
model: mimo-v2.6-pro
@@ -1138,6 +1575,8 @@ opencode-go:
output_types: [text]
release_date: 2026-09-22
cost: {input: 0.435, output: 0.87}
+ reasoning_options: []
+ limits: {context: 1048576, output: 131072}
- name: DeepSeek V4.1 Flash
model: deepseek-v4.1-flash
@@ -1148,6 +1587,10 @@ opencode-go:
output_types: [text]
release_date: 2026-09-10
cost: {input: 0.15, output: 0.6}
+ reasoning_options:
+ - type: effort
+ values: [low, high, max]
+ limits: {context: 1000000, output: 384000}
- name: Muse Spark 1.3 Contributor
model: muse-spark-1.3-contributor
@@ -1158,6 +1601,10 @@ opencode-go:
output_types: [text]
release_date: 2026-09-02
cost: {input: 0.1, output: 0.2}
+ reasoning_options:
+ - type: effort
+ values: [minimal, low, medium, high, xhigh]
+ limits: {context: 1048576, output: 131072}
- name: Hy4 preview
model: hy4-preview
@@ -1168,6 +1615,10 @@ opencode-go:
output_types: [text]
release_date: 2026-08-28
cost: {input: 0.834, output: 2.501}
+ reasoning_options:
+ - type: effort
+ values: [none, high]
+ limits: {context: 1024000, output: 64000}
- name: GLM-5.3-Flash (2x usage)
model: glm-5.3-flash
@@ -1177,7 +1628,11 @@ opencode-go:
input_types: [text, image, pdf]
output_types: [text]
release_date: 2026-08-26
- cost: {input: 0.075, output: 0.25}
+ cost: {input: 0.15, output: 0.5}
+ reasoning_options:
+ - type: effort
+ values: [low, high, max]
+ limits: {context: 1000000, output: 131072}
- name: Qwen3.8 Flash
model: qwen3.8-flash
@@ -1188,6 +1643,12 @@ opencode-go:
output_types: [text]
release_date: 2026-08-26
cost: {input: 0.15, output: 0.47}
+ reasoning_options:
+ - type: toggle
+ - type: effort
+ values: [low, medium, xhigh]
+ - type: budget_tokens
+ limits: {context: 1000000, output: 131072}
- name: DeepSeek V4 Flash Vision Exp
model: deepseek-v4-flash-vision-exp
@@ -1197,7 +1658,12 @@ opencode-go:
input_types: [text, image]
output_types: [text]
release_date: 2026-08-21
- cost: {input: 0.22, output: 0.66}
+ cost: {input: 0.15, output: 0.6}
+ reasoning_options:
+ - type: toggle
+ - type: effort
+ values: [low, high, max]
+ limits: {context: 1000000, output: 384000}
- name: GLM-5.3
model: glm-5.3
@@ -1208,6 +1674,10 @@ opencode-go:
output_types: [text]
release_date: 2026-08-14
cost: {input: 1.4, output: 4.4}
+ reasoning_options:
+ - type: effort
+ values: [low, high, max]
+ limits: {context: 1000000, output: 131072}
- name: Qwen3.8 Max
model: qwen3.8-max
@@ -1218,6 +1688,13 @@ opencode-go:
output_types: [text]
release_date: 2026-08-03
cost: {input: 2, output: 6}
+ reasoning_options:
+ - type: toggle
+ - type: effort
+ values: [low, medium, xhigh]
+ - type: budget_tokens
+ max: 262144
+ limits: {context: 1000000, output: 131072}
- name: GPT-5.6 Luna (2x usage)
model: gpt-5.6-luna
@@ -1227,7 +1704,11 @@ opencode-go:
input_types: [text, image, pdf]
output_types: [text]
release_date: 2026-07-09
- cost: {input: 0.1, output: 0.6}
+ cost: {input: 0.2, output: 1.2}
+ reasoning_options:
+ - type: effort
+ values: [none, low, medium, high, xhigh, max]
+ limits: {context: 1050000, output: 128000}
- name: Kimi K3 (2x usage)
model: kimi-k3
@@ -1238,6 +1719,10 @@ opencode-go:
output_types: [text]
release_date: 2026-07-16
cost: {input: 3, output: 15}
+ reasoning_options:
+ - type: effort
+ values: [max]
+ limits: {context: 1048576, output: 131072}
- name: DeepSeek V4 Flash
model: deepseek-v4-flash
@@ -1246,8 +1731,12 @@ opencode-go:
capabilities: [thinking, tool_calling]
input_types: [text]
output_types: [text]
- release_date: 2026-04-24
- cost: {input: 0.14, output: 0.28}
+ release_date: 2026-07-31
+ cost: {input: 0.15, output: 0.6}
+ reasoning_options:
+ - type: effort
+ values: [low, high, max]
+ limits: {context: 1000000, output: 384000}
- name: DeepSeek V4 Pro
model: deepseek-v4-pro
@@ -1257,7 +1746,11 @@ opencode-go:
input_types: [text]
output_types: [text]
release_date: 2026-04-24
- cost: {input: 1.74, output: 3.48}
+ cost: {input: 0.66, output: 1.98}
+ reasoning_options:
+ - type: effort
+ values: [high, max]
+ limits: {context: 1000000, output: 384000}
- name: GLM 5.2
model: glm-5.2
@@ -1268,6 +1761,10 @@ opencode-go:
output_types: [text]
release_date: 2026-06-13
cost: {input: 1.4, output: 4.4}
+ reasoning_options:
+ - type: effort
+ values: [high, max]
+ limits: {context: 1000000, output: 131072}
- name: Qwen3.7 Plus
model: qwen3.7-plus
@@ -1278,6 +1775,11 @@ opencode-go:
output_types: [text]
release_date: 2026-06-02
cost: {input: 0.4, output: 1.6}
+ reasoning_options:
+ - type: toggle
+ - type: budget_tokens
+ max: 262144
+ limits: {context: 1000000, output: 65536}
- name: Qwen3.7 Max
model: qwen3.7-max
@@ -1288,6 +1790,11 @@ opencode-go:
output_types: [text]
release_date: 2026-05-21
cost: {input: 2.5, output: 7.5}
+ reasoning_options:
+ - type: toggle
+ - type: budget_tokens
+ max: 262144
+ limits: {context: 1000000, output: 65536}
- name: MiniMax M3 (3x usage)
model: minimax-m3
@@ -1297,4 +1804,7 @@ opencode-go:
input_types: [text, image]
output_types: [text]
release_date: 2026-05-31
- cost: {input: 0.1, output: 0.4}
+ cost: {input: 0.3, output: 1.2}
+ reasoning_options:
+ - type: toggle
+ limits: {context: 1000000, output: 131072}
diff --git a/packages/llm-info/skills/SKILL.md b/packages/llm-info/skills/SKILL.md
index 4911d5c624..d3f84c9ccf 100644
--- a/packages/llm-info/skills/SKILL.md
+++ b/packages/llm-info/skills/SKILL.md
@@ -1,6 +1,6 @@
---
name: fill-model-descriptions
-description: Fill missing and refresh obsolete model descriptions in `packages/llm-info/data/models.yml` by querying OpenRouter and provider documentation. Use when the user asks to populate model descriptions, enrich the model catalog, or curate descriptions after running `pnpm sync-models`.
+description: Curate descriptions and provider-specific reasoning options and token limits in `packages/llm-info/data/models.yml` using models.dev, OpenRouter, and provider documentation. Use when the user asks to populate model descriptions, enrich the model catalog, or curate descriptions after running `pnpm sync-models`.
disable-model-invocation: true
---
@@ -16,9 +16,11 @@ Keep descriptions in `packages/llm-info/data/models.yml` concise and accurate. F
- Preserve human-curated, non-empty descriptions unless a newly added model or authoritative source makes a concrete claim obsolete. Typical obsolete claims include "latest," "most capable," availability, or capabilities that have demonstrably changed.
- Do not rewrite existing descriptions only for style, tone, or consistency. When an existing description must change, make the smallest factual correction and record it in the final summary.
- The file is a top-level YAML map keyed by provider id (`anthropic:`, `openai:`, …). Each provider's value is an array of model entries.
-- Do not modify any other field, reorder entries, or change formatting (flow-style arrays like `roles: [chat, edit]`, blank lines between entries, blank line between provider sections).
+- For description-only work, do not modify any other field. For metadata enrichment, refresh machine-sourced capabilities, input/output types, release dates, pricing, reasoning options, and token limits; preserve names, descriptions, and roles. Do not reorder entries or change formatting (flow-style arrays like `roles: [chat, edit]`, blank lines between entries, blank line between provider sections).
- This skill requires network access.
+For metadata-only requests, use [Reasoning Options and Token Limits](#reasoning-options-and-token-limits) and skip the description workflow.
+
## Workflow
1. **Read** `packages/llm-info/data/models.yml`. Parse it with the `yaml` library's `parseDocument` (NOT `parse`) so formatting and comments are preserved on write-back.
@@ -54,6 +56,40 @@ Keep descriptions in `packages/llm-info/data/models.yml` concise and accurate. F
- How many obsolete descriptions were updated, with the provider/model list and the factual reason.
- How many were skipped (with the provider/model list).
+## Reasoning Options and Token Limits
+
+When metadata enrichment is requested, query `https://models.dev/api.json` and
+match the exact provider/model offering using `PROVIDER_MAP` in
+`src/sources/merge.ts`. Google Vertex models remain separate offerings even
+though they share the `google` catalog section. Do not use the description
+vendor map or strip aliases to obtain metadata from another hosting provider.
+
+Run `pnpm --dir packages/llm-info sync-models --metadata-only` to refresh the
+current catalog without adding models. Normal sync also refreshes known metadata
+on existing entries: capabilities, input/output types, release dates, pricing,
+reasoning options, and token limits. Curated names, descriptions, and roles are
+preserved. Neither mode changes runtime thinking configuration.
+
+- `reasoning_options` preserves upstream `toggle`, `effort` (with explicit
+ values), and `budget_tokens` (with optional `min`/`max`) controls. Preserve
+ `null`, `default`, and the `-1` automatic-budget sentinel when supplied.
+- `limits` maps upstream `limit.context` and `limit.output`, in tokens. Preserve
+ supplied values, including zero; omitted fields remain unknown.
+- An explicit `reasoning: false` removes the thinking capability and clears stale
+ reasoning controls. An omitted flag preserves the corresponding capability.
+ Partial pricing and limits updates preserve unspecified values.
+- Missing upstream fields or unmatched offerings do not justify inventing
+ values or removing existing metadata. Report unmatched entries. Consult the
+ exact provider's documentation if further enrichment is needed.
+- OpenRouter's normalized reasoning controls describe its gateway API. Use them
+ only for OpenRouter offerings, not as native Anthropic, OpenAI, Azure, or
+ Bedrock configuration contracts.
+
+After enrichment, run `pnpm --dir packages/llm-info codegen` and
+`pnpm --dir packages/llm-info test --run`. Report coverage for each metadata
+field and unresolved provider/model matches. Generated JSON must retain the new
+fields; updating YAML alone is insufficient.
+
## Vendor Map
OpenRouter id vendor prefixes for each marimo provider:
diff --git a/packages/llm-info/src/__tests__/metadata.test.ts b/packages/llm-info/src/__tests__/metadata.test.ts
new file mode 100644
index 0000000000..617c96251a
--- /dev/null
+++ b/packages/llm-info/src/__tests__/metadata.test.ts
@@ -0,0 +1,402 @@
+/* Copyright 2026 Marimo. All rights reserved. */
+
+import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
+import { tmpdir } from "node:os";
+import nodePath from "node:path";
+import { afterEach, beforeEach, describe, expect, it } from "vitest";
+import { parse, parseDocument } from "yaml";
+import { parseCliArgs } from "../cli.ts";
+import { ModelsByProviderSchema } from "../generate.ts";
+import { ModelLimitsSchema, ReasoningOptionSchema } from "../metadata.ts";
+import { mergeModels } from "../sources/merge.ts";
+import { parseModelsDev } from "../sources/models-dev.ts";
+import { syncModels } from "../sync-models.ts";
+
+const reasoningOptions = [
+ { type: "toggle" },
+ { type: "effort", values: [null, "default", "none", "low", "high", "max"] },
+ { type: "budget_tokens", min: -1, max: 8192 },
+];
+const upstream = parseModelsDev({
+ google: {
+ models: {
+ model: {
+ id: "model",
+ name: "Upstream name",
+ reasoning: true,
+ reasoning_options: reasoningOptions,
+ limit: { context: 128000, output: 8192 },
+ },
+ new: { id: "new", name: "New model", reasoning: false },
+ },
+ },
+ "google-vertex": {
+ models: {
+ model: {
+ id: "model",
+ name: "Vertex name",
+ reasoning: true,
+ reasoning_options: [{ type: "effort", values: ["medium"] }],
+ limit: { context: 64000 },
+ },
+ },
+ },
+});
+const curated = `# Keep this comment
+google:
+ - name: Curated name
+ model: model
+ description: Curated description
+ roles: [chat, edit]
+ capabilities: [thinking]
+ input_types: [text]
+ output_types: [text]
+ release_date: 2026-01-01
+ limits: {context: 1000}
+
+azure:
+ - name: Same id, different provider
+ model: model
+ description: Preserve provider differences
+ roles: [chat]
+ capabilities: []
+ input_types: [text]
+ output_types: [text]
+ release_date: 2026-01-01
+`;
+
+describe("model metadata", () => {
+ it("retains provider options and limits through parsing, merging, and generation", () => {
+ const summary = mergeModels({}, upstream);
+ const generated = ModelsByProviderSchema.parse(summary.newEntries);
+ expect(
+ generated["google"].find((model) => model.model === "model"),
+ ).toMatchObject({
+ reasoning_options: reasoningOptions,
+ limits: { context: 128000, output: 8192 },
+ });
+ const withoutMetadata = generated["google"].find(
+ (model) => model.model === "new",
+ )!;
+ expect(withoutMetadata).not.toHaveProperty("reasoning_options");
+ expect(withoutMetadata).not.toHaveProperty("limits");
+ });
+
+ it.each([
+ { type: "effort", values: ["unsupported"] },
+ { type: "budget_tokens", min: -2 },
+ { type: "budget_tokens", max: -1 },
+ { type: "budget_tokens", min: 1024, max: 512 },
+ { type: "budget_tokens", min: 1.5 },
+ ])("rejects invalid reasoning controls: %j", (option) => {
+ expect(ReasoningOptionSchema.safeParse(option).success).toBe(false);
+ });
+
+ it("preserves zero limits from upstream and rejects negative or fractional limits", () => {
+ expect(ModelLimitsSchema.parse({ context: 0, output: 0 })).toEqual({
+ context: 0,
+ output: 0,
+ });
+ expect(ModelLimitsSchema.safeParse({ context: -1 }).success).toBe(false);
+ expect(ModelLimitsSchema.safeParse({ output: 1.5 }).success).toBe(false);
+ });
+});
+
+describe("metadata sync", () => {
+ let directory: string;
+ let path: string;
+ beforeEach(() => {
+ directory = mkdtempSync(nodePath.join(tmpdir(), "llm-metadata-"));
+ path = nodePath.join(directory, "models.yml");
+ writeFileSync(path, curated);
+ });
+ afterEach(() => rmSync(directory, { recursive: true, force: true }));
+
+ it("refreshes existing metadata without adding models or overwriting curation", async () => {
+ const result = await syncModels({
+ modelsYamlPath: path,
+ modelsDev: upstream,
+ metadataOnly: true,
+ });
+ expect(result.added).toBe(0);
+ expect(result.updated).toBe(1);
+ expect(result.yaml).toContain("# Keep this comment");
+ expect(result.yaml).toContain(
+ "values: [null, default, none, low, high, max]",
+ );
+ const before = parse(curated);
+ const after = ModelsByProviderSchema.parse(parse(result.yaml));
+ const { limits, reasoning_options, ...rest } = after["google"][0];
+ const { limits: _oldLimits, ...original } = before.google[0];
+ expect(rest).toEqual(original);
+ expect(limits).toEqual({ context: 128000, output: 8192 });
+ expect(reasoning_options).toEqual(reasoningOptions);
+ expect(after["azure"]).toEqual(before.azure);
+ const repeated = await syncModels({
+ modelsYamlPath: path,
+ modelsDev: upstream,
+ metadataOnly: true,
+ });
+ expect(repeated.updated).toBe(0);
+ expect(repeated.yaml).toBe(result.yaml);
+ });
+
+ it("refreshes metadata during normal sync and writes compact options for new models", async () => {
+ const refreshed = await syncModels({
+ modelsYamlPath: path,
+ modelsDev: upstream,
+ });
+ expect(refreshed.updated).toBe(1);
+ expect(refreshed.added).toBe(1);
+ writeFileSync(path, curated.replace("model: model", "model: existing"));
+ const result = await syncModels({
+ modelsYamlPath: path,
+ modelsDev: upstream,
+ });
+ const data = ModelsByProviderSchema.parse(parse(result.yaml));
+ expect(
+ data["google"].find((model) => model.model === "model")
+ ?.reasoning_options,
+ ).toEqual(reasoningOptions);
+ expect(result.yaml).toContain(
+ "values: [null, default, none, low, high, max]",
+ );
+ });
+
+ it("preserves metadata when the upstream field is unknown", async () => {
+ const missing = parseModelsDev({
+ google: { models: { model: { id: "model", name: "Model" } } },
+ });
+ const result = await syncModels({
+ modelsYamlPath: path,
+ modelsDev: missing,
+ metadataOnly: true,
+ });
+ expect(result.updated).toBe(0);
+ expect(result.yaml).toBe(curated);
+ });
+
+ it("preserves a known output limit when upstream only supplies context", async () => {
+ writeFileSync(
+ path,
+ curated.replace(
+ "limits: {context: 1000}",
+ "limits: {context: 1000, output: 4096}",
+ ),
+ );
+ const partial = parseModelsDev({
+ google: {
+ models: {
+ model: { id: "model", name: "Model", limit: { context: 2000 } },
+ },
+ },
+ });
+ const result = await syncModels({
+ modelsYamlPath: path,
+ modelsDev: partial,
+ metadataOnly: true,
+ });
+ expect(
+ ModelsByProviderSchema.parse(parse(result.yaml))["google"][0].limits,
+ ).toEqual({ context: 2000, output: 4096 });
+ });
+
+ it("refreshes all sourced fields while preserving identity, roles, and partial pricing", async () => {
+ writeFileSync(
+ path,
+ curated.replace(
+ "limits: {context: 1000}",
+ "limits: {context: 1000, output: 4096}\n cost: {input: 2, output: 10}\n reasoning_options:\n - type: effort\n values: [high]",
+ ),
+ );
+ const changed = parseModelsDev({
+ google: {
+ models: {
+ model: {
+ id: "model",
+ name: "Changed upstream name",
+ reasoning: false,
+ tool_call: true,
+ modalities: { input: ["text", "image", "audio"], output: [] },
+ release_date: "2026-02",
+ cost: { input: 0 },
+ limit: { context: 2000 },
+ },
+ },
+ },
+ });
+ const result = await syncModels({
+ modelsYamlPath: path,
+ modelsDev: changed,
+ metadataOnly: true,
+ });
+ const model = ModelsByProviderSchema.parse(parse(result.yaml))["google"][0];
+ expect(model).toEqual({
+ name: "Curated name",
+ model: "model",
+ description: "Curated description",
+ roles: ["chat", "edit"],
+ capabilities: ["tool_calling"],
+ input_types: ["text", "image"],
+ output_types: [],
+ release_date: "2026-02-01",
+ cost: { input: 0, output: 10 },
+ limits: { context: 2000, output: 4096 },
+ reasoning_options: [],
+ });
+ const repeated = await syncModels({
+ modelsYamlPath: path,
+ modelsDev: changed,
+ metadataOnly: true,
+ });
+ expect(repeated.updated).toBe(0);
+ expect(repeated.yaml).toBe(result.yaml);
+ });
+
+ it("preserves unknown capability flags, modalities, and invalid release dates", async () => {
+ const partial = parseModelsDev({
+ google: {
+ models: {
+ model: {
+ id: "model",
+ name: "Model",
+ tool_call: true,
+ release_date: "invalid-date",
+ modalities: { output: ["text", "pdf"] },
+ cost: {},
+ },
+ },
+ },
+ });
+ const result = await syncModels({
+ modelsYamlPath: path,
+ modelsDev: partial,
+ metadataOnly: true,
+ });
+ const model = ModelsByProviderSchema.parse(parse(result.yaml))["google"][0];
+ expect(model.capabilities).toEqual(["thinking", "tool_calling"]);
+ expect(model.release_date).toBe("2026-01-01");
+ expect(model.input_types).toEqual(["text"]);
+ expect(model.output_types).toEqual(["text", "pdf"]);
+ expect(model).not.toHaveProperty("cost");
+ });
+
+ it.each([true, false])(
+ "preserves invalid entries and continues syncing (metadataOnly=%s)",
+ async (metadataOnly) => {
+ const invalid = ` - name: Legacy model
+ model: model
+ capabilities: [unknown-capability]
+ cost: {input: unknown}
+`;
+ writeFileSync(path, curated.replace("google:\n", `google:\n${invalid}`));
+ const result = await syncModels({
+ modelsYamlPath: path,
+ modelsDev: upstream,
+ metadataOnly,
+ });
+ const models = parse(result.yaml).google;
+ expect(
+ models.find((model: { name: string }) => model.name === "Legacy model"),
+ ).toEqual({
+ name: "Legacy model",
+ model: "model",
+ capabilities: ["unknown-capability"],
+ cost: { input: "unknown" },
+ });
+ expect(
+ models.find((model: { name: string }) => model.name === "Curated name")
+ .limits,
+ ).toEqual({ context: 128000, output: 8192 });
+ expect(result.updated).toBe(1);
+ expect(result.added).toBe(metadataOnly ? 0 : 1);
+ },
+ );
+
+ it("preserves comments on refreshed scalar and collection values", async () => {
+ const annotated = curated
+ .replace(
+ "release_date: 2026-01-01",
+ "release_date: 2026-01-01 # release note",
+ )
+ .replace(
+ "limits: {context: 1000}",
+ "limits: {context: 1000} # limit note",
+ );
+ const document = parseDocument(annotated);
+ const changed = parseModelsDev({
+ google: {
+ models: {
+ model: {
+ id: "model",
+ name: "Model",
+ release_date: "2026-03-01",
+ limit: { context: 2000 },
+ },
+ },
+ },
+ });
+ // A comment between the key and its value belongs to the value node.
+ const limits = document.getIn(
+ ["google", 0, "limits"],
+ true,
+ ) as import("yaml").YAMLMap;
+ limits.flow = true;
+ limits.comment = " limit note";
+ limits.commentBefore = " limit rationale";
+ writeFileSync(
+ path,
+ document.toString({ lineWidth: 0, flowCollectionPadding: false }),
+ );
+ const result = await syncModels({
+ modelsYamlPath: path,
+ modelsDev: changed,
+ metadataOnly: true,
+ });
+ const refreshed = parseDocument(result.yaml);
+ const newLimits = refreshed.getIn(
+ ["google", 0, "limits"],
+ true,
+ ) as import("yaml").YAMLMap;
+ const release = refreshed.getIn(
+ ["google", 0, "release_date"],
+ true,
+ ) as import("yaml").Scalar;
+ expect(newLimits.comment).toBe(" limit note");
+ expect(newLimits.commentBefore).toBe(" limit rationale");
+ expect(release.comment).toBe(" release note");
+ expect(newLimits.toJSON()).toEqual({ context: 2000 });
+ expect(release.value).toBe("2026-03-01");
+ });
+
+ it("honors provider filters and dry runs", async () => {
+ const filtered = await syncModels({
+ modelsYamlPath: path,
+ modelsDev: upstream,
+ metadataOnly: true,
+ providers: ["azure"],
+ });
+ expect(filtered.updated).toBe(0);
+ const dry = await syncModels({
+ modelsYamlPath: path,
+ modelsDev: upstream,
+ metadataOnly: true,
+ write: false,
+ });
+ expect(dry.updated).toBe(1);
+ expect(readFileSync(path, "utf8")).toBe(curated);
+ });
+
+ it("rejects destructive replacement in metadata-only mode", async () => {
+ expect(parseCliArgs(["--metadata-only"]).metadataOnly).toBe(true);
+ await expect(
+ syncModels({
+ modelsYamlPath: path,
+ modelsDev: upstream,
+ metadataOnly: true,
+ mode: "replace",
+ }),
+ ).rejects.toThrow("cannot replace");
+ expect(readFileSync(path, "utf8")).toBe(curated);
+ });
+});
diff --git a/packages/llm-info/src/__tests__/sync-models.test.ts b/packages/llm-info/src/__tests__/sync-models.test.ts
index 8916b666b3..1b108d0a3e 100644
--- a/packages/llm-info/src/__tests__/sync-models.test.ts
+++ b/packages/llm-info/src/__tests__/sync-models.test.ts
@@ -873,7 +873,7 @@ openai:
expect(parsed.azure).toHaveLength(1);
});
- it("does not write the file when there are no new entries", async () => {
+ it("does not write the file when neither entries nor metadata change", async () => {
const full = `anthropic:
- name: Claude Opus 4.5
model: claude-opus-4-5
@@ -891,6 +891,11 @@ azure:
model: gpt-5.5
`;
writeFileSync(yamlPath, full);
+ const first = await syncModels({
+ modelsYamlPath: yamlPath,
+ modelsDev: FIXTURE_API,
+ });
+ expect(first.updated).toBeGreaterThan(0);
const before = readFileSync(yamlPath, "utf-8");
const result = await syncModels({
@@ -900,6 +905,7 @@ azure:
const after = readFileSync(yamlPath, "utf-8");
expect(result.added).toBe(0);
+ expect(result.updated).toBe(0);
expect(after).toEqual(before);
});
});
diff --git a/packages/llm-info/src/cli.ts b/packages/llm-info/src/cli.ts
index 4540744383..8016f0553d 100644
--- a/packages/llm-info/src/cli.ts
+++ b/packages/llm-info/src/cli.ts
@@ -6,6 +6,7 @@ import type { SyncMode } from "./sync-models.ts";
export interface CliArgs {
mode: SyncMode;
+ metadataOnly?: boolean;
maxPerProvider?: number;
providers?: string[];
}
@@ -100,6 +101,7 @@ function parseProviders(argv: readonly string[]): string[] | undefined {
export function parseCliArgs(argv: readonly string[]): CliArgs {
return {
mode: parseMode(argv),
+ ...(argv.includes("--metadata-only") && { metadataOnly: true }),
maxPerProvider: parseMaxPerProvider(argv),
providers: parseProviders(argv),
};
diff --git a/packages/llm-info/src/generate.ts b/packages/llm-info/src/generate.ts
index 2bee3a7f76..63521601f7 100644
--- a/packages/llm-info/src/generate.ts
+++ b/packages/llm-info/src/generate.ts
@@ -5,19 +5,17 @@ import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
import { parse } from "yaml";
import { z } from "zod";
+import {
+ CAPABILITIES,
+ CostSchema,
+ ModelLimitsSchema,
+ ReasoningOptionSchema,
+} from "./metadata.ts";
import { Logger } from "./simple_logger.ts";
const ROLES = ["chat", "edit", "rerank", "embed", "autocomplete"] as const;
-const CAPABILITIES = ["thinking", "tool_calling"] as const;
const DATA_TYPES = ["text", "image", "pdf"] as const;
-const CostSchema = z
- .object({
- input: z.number().optional(),
- output: z.number().optional(),
- })
- .partial();
-
/** YAML may parse `YYYY-MM-DD` scalars as Date; coerce back to ISO string. */
const ReleaseDateSchema = z
.union([z.string(), z.date()])
@@ -38,6 +36,8 @@ export const LLMInfoSchema = z.object({
output_types: z.array(z.enum(DATA_TYPES)).default([]),
release_date: ReleaseDateSchema,
cost: CostSchema.optional(),
+ reasoning_options: z.array(ReasoningOptionSchema).optional(),
+ limits: ModelLimitsSchema.optional(),
});
/** Top-level shape of `models.yml` / `models.json`: provider id → models. */
diff --git a/packages/llm-info/src/index.ts b/packages/llm-info/src/index.ts
index 6cadd52ecb..3eb3a4abb2 100644
--- a/packages/llm-info/src/index.ts
+++ b/packages/llm-info/src/index.ts
@@ -1,3 +1,12 @@
+import type {
+ AiModelCost,
+ CAPABILITIES,
+ ModelLimits,
+ ReasoningOption,
+} from "./metadata.ts";
+
+export type { AiModelCost, ModelLimits, ReasoningOption } from "./metadata.ts";
+
export const ROLES = [
"chat",
"edit",
@@ -7,19 +16,9 @@ export const ROLES = [
] as const;
export type Role = (typeof ROLES)[number];
-type Capability = "thinking" | "tool_calling";
+type Capability = (typeof CAPABILITIES)[number];
type DataType = "text" | "image" | "pdf";
-/**
- * Per-token pricing in USD per 1M tokens, mirroring the `cost` block on
- * `models.dev`. All fields are optional — open-weights / self-hosted models
- * usually have none.
- */
-export interface AiModelCost {
- input?: number;
- output?: number;
-}
-
export interface AiModel {
name: string;
model: string;
@@ -31,6 +30,10 @@ export interface AiModel {
/** ISO `YYYY-MM-DD` — stored as a string to round-trip through YAML/JSON. */
release_date: string;
cost?: AiModelCost;
+ /** Provider-specific controls; omitted when unknown. Does not select an effort. */
+ reasoning_options?: ReasoningOption[];
+ /** Token limits for this provider offering; omitted values are unknown. */
+ limits?: ModelLimits;
}
export type SyncableProviderId =
diff --git a/packages/llm-info/src/metadata.ts b/packages/llm-info/src/metadata.ts
new file mode 100644
index 0000000000..683d5e9b0a
--- /dev/null
+++ b/packages/llm-info/src/metadata.ts
@@ -0,0 +1,63 @@
+/* Copyright 2026 Marimo. All rights reserved. */
+
+import { z } from "zod";
+
+export const CAPABILITIES = ["thinking", "tool_calling"] as const;
+
+/** USD per million tokens; missing prices are unknown. */
+export const CostSchema = z.object({
+ input: z.number().optional(),
+ output: z.number().optional(),
+});
+
+export const ReasoningEffortSchema = z.enum([
+ "none",
+ "minimal",
+ "low",
+ "medium",
+ "high",
+ "xhigh",
+ "max",
+ "default",
+]);
+
+/** Mirrors models.dev; null is a provider option distinct from an omitted field. */
+export const ReasoningOptionSchema = z.discriminatedUnion("type", [
+ z.object({ type: z.literal("toggle") }),
+ z.object({
+ type: z.literal("effort"),
+ values: z.array(ReasoningEffortSchema.nullable()),
+ }),
+ z
+ .object({
+ type: z.literal("budget_tokens"),
+ min: z.number().int().min(-1).optional(),
+ max: z.number().int().nonnegative().optional(),
+ })
+ .refine(
+ ({ min, max }) => min === undefined || max === undefined || min <= max,
+ {
+ message: "Minimum reasoning budget cannot exceed maximum",
+ path: ["min"],
+ },
+ ),
+]);
+
+export const ModelLimitsSchema = z.object({
+ context: z.number().int().nonnegative().optional(),
+ output: z.number().int().nonnegative().optional(),
+});
+
+export type ReasoningOption = z.infer<typeof ReasoningOptionSchema>;
+export type ModelLimits = z.infer<typeof ModelLimitsSchema>;
+
+export const ExistingMetadataSchema = z.object({
+ reasoning_options: z.array(ReasoningOptionSchema).optional(),
+ capabilities: z.array(z.enum(CAPABILITIES)).default([]),
+ cost: CostSchema.optional(),
+ limits: ModelLimitsSchema.optional(),
+});
+
+export type ExistingMetadata = z.infer<typeof ExistingMetadataSchema>;
+
+export type AiModelCost = z.infer<typeof CostSchema>;
diff --git a/packages/llm-info/src/sources/merge.ts b/packages/llm-info/src/sources/merge.ts
index ecfa56b192..3e81f1e981 100644
--- a/packages/llm-info/src/sources/merge.ts
+++ b/packages/llm-info/src/sources/merge.ts
@@ -6,7 +6,12 @@ import type {
Role,
SyncableProviderId,
} from "../index.ts";
-import type { ModelsDevApi, ModelsDevModel } from "./models-dev.ts";
+import { CAPABILITIES, type ExistingMetadata } from "../metadata.ts";
+import {
+ deriveModelMetadata,
+ type ModelsDevApi,
+ type ModelsDevModel,
+} from "./models-dev.ts";
/**
* Allowlist of models.dev provider ids → marimo provider ids. Models from
@@ -168,6 +173,47 @@ function deriveCost(source: ModelsDevModel): AiModel["cost"] {
};
}
+/** Refresh known source fields without erasing omitted values or curated roles. */
+export function deriveMetadataUpdates(
+ source: ModelsDevModel,
+ previous: ExistingMetadata,
+): Partial<Omit<AiModel, "name" | "model" | "description" | "roles">> {
+ const metadata: Partial<
+ Omit<AiModel, "name" | "model" | "description" | "roles">
+ > = deriveModelMetadata(source);
+ if (source.reasoning !== undefined || source.tool_call !== undefined) {
+ const flags = {
+ thinking: source.reasoning,
+ tool_calling: source.tool_call,
+ };
+ metadata.capabilities = CAPABILITIES.filter(
+ (capability) =>
+ flags[capability] ?? previous.capabilities.includes(capability),
+ );
+ }
+ if (source.reasoning === false && previous.reasoning_options !== undefined) {
+ // An explicit non-reasoning flag invalidates previously advertised controls.
+ metadata.reasoning_options = [];
+ }
+ if (source.modalities?.input !== undefined) {
+ metadata.input_types = filterModalities(source.modalities.input);
+ }
+ if (source.modalities?.output !== undefined) {
+ metadata.output_types = filterModalities(source.modalities.output);
+ }
+ if (source.release_date && !Number.isNaN(Date.parse(source.release_date))) {
+ metadata.release_date = parseReleaseDate(source.release_date);
+ }
+ const cost = deriveCost(source);
+ if (cost) {
+ metadata.cost = { ...previous.cost, ...cost };
+ }
+ if (metadata.limits) {
+ metadata.limits = { ...previous.limits, ...metadata.limits };
+ }
+ return metadata;
+}
+
function buildAiModel(source: ModelsDevModel): AiModel {
const cost = deriveCost(source);
return {
@@ -180,6 +226,7 @@ function buildAiModel(source: ModelsDevModel): AiModel {
output_types: filterModalities(source.modalities?.output),
release_date: parseReleaseDate(source.release_date),
...(cost && { cost }),
+ ...deriveModelMetadata(source),
};
}
diff --git a/packages/llm-info/src/sources/models-dev.ts b/packages/llm-info/src/sources/models-dev.ts
index 063a53e614..917b585934 100644
--- a/packages/llm-info/src/sources/models-dev.ts
+++ b/packages/llm-info/src/sources/models-dev.ts
@@ -1,12 +1,19 @@
/* Copyright 2026 Marimo. All rights reserved. */
import { z } from "zod";
+import type { AiModel } from "../index.ts";
+import {
+ CostSchema,
+ ModelLimitsSchema,
+ ReasoningOptionSchema,
+} from "../metadata.ts";
import { Logger } from "../simple_logger.ts";
export const ModelsDevModelSchema = z.object({
id: z.string(),
name: z.string(),
reasoning: z.boolean().optional(),
+ reasoning_options: z.array(ReasoningOptionSchema).optional(),
tool_call: z.boolean().optional(),
status: z.string().optional(),
release_date: z.string().optional(),
@@ -16,19 +23,8 @@ export const ModelsDevModelSchema = z.object({
output: z.array(z.string()).optional(),
})
.optional(),
- limit: z
- .object({
- context: z.number().optional(),
- output: z.number().optional(),
- })
- .optional(),
- cost: z
- .object({
- input: z.number().optional(),
- output: z.number().optional(),
- })
- .partial()
- .optional(),
+ limit: ModelLimitsSchema.optional(),
+ cost: CostSchema.optional(),
});
export type ModelsDevModel = z.infer<typeof ModelsDevModelSchema>;
@@ -121,3 +117,17 @@ export async function fetchModelsDev(
const json = (await response.json()) as unknown;
return parseModelsDev(json);
}
+
+/** Derive reasoning controls and token limits supplied by an upstream model. */
+export function deriveModelMetadata(
+ source: ModelsDevModel,
+): Pick<AiModel, "reasoning_options" | "limits"> {
+ const metadata: Pick<AiModel, "reasoning_options" | "limits"> = {};
+ if (source.reasoning && source.reasoning_options !== undefined) {
+ metadata.reasoning_options = source.reasoning_options;
+ }
+ if (source.limit && Object.keys(source.limit).length > 0) {
+ metadata.limits = source.limit;
+ }
+ return metadata;
+}
diff --git a/packages/llm-info/src/sync-models.ts b/packages/llm-info/src/sync-models.ts
index d5d29030c5..7da3955802 100644
--- a/packages/llm-info/src/sync-models.ts
+++ b/packages/llm-info/src/sync-models.ts
@@ -8,18 +8,22 @@ import {
Document,
isMap,
isSeq,
+ isScalar,
parseDocument,
type YAMLMap,
type YAMLSeq,
} from "yaml";
import { parseCliArgs } from "./cli.ts";
import type { AiModel, ModelsByProvider } from "./index.ts";
+import { ExistingMetadataSchema } from "./metadata.ts";
import { Logger } from "./simple_logger.ts";
import {
type ExistingByProvider,
type ExistingEntry,
MAX_MODELS_PER_PROVIDER,
mergeModels,
+ deriveMetadataUpdates,
+ PROVIDER_MAP,
} from "./sources/merge.ts";
import { fetchModelsDev, type ModelsDevApi } from "./sources/models-dev.ts";
@@ -39,6 +43,8 @@ interface SyncOptions {
modelsDev?: ModelsDevApi;
write?: boolean;
mode?: SyncMode;
+ /** Refresh metadata on curated entries without adding models. */
+ metadataOnly?: boolean;
/** Cap on new entries inserted per provider section. */
maxPerProvider?: number;
/** Restrict sync to these marimo provider ids (defaults to all). */
@@ -48,6 +54,7 @@ interface SyncOptions {
export interface SyncResult {
added: number;
preserved: number;
+ updated: number;
yaml: string;
}
@@ -57,10 +64,11 @@ const FLOW_SEQ_KEYS = new Set([
"capabilities",
"input_types",
"output_types",
+ "values",
]);
/** Map keys rendered in flow style (`{a: 1, b: 2}`). */
-const FLOW_MAP_KEYS = new Set(["cost"]);
+const FLOW_MAP_KEYS = new Set(["cost", "limits"]);
/** YAML serializes `Date` as an ISO timestamp; we want plain `YYYY-MM-DD`. */
function flattenDates(entry: AiModel): Record<string, unknown> {
@@ -117,18 +125,29 @@ function parseExistingModels(yamlText: string): ExistingByProvider {
*/
function buildEntryNode(doc: Document, entry: AiModel): YAMLMap {
const node = doc.createNode(flattenDates(entry)) as YAMLMap;
- for (const pair of node.items) {
- const key = (pair.key as { value?: unknown })?.value;
- if (typeof key !== "string") {
- continue;
+ formatCollections(node);
+ return node;
+}
+
+function formatCollections(node: unknown): void {
+ if (isSeq(node)) {
+ for (const item of node.items) {
+ formatCollections(item);
}
- if (FLOW_SEQ_KEYS.has(key) && isSeq(pair.value)) {
- pair.value.flow = true;
- } else if (FLOW_MAP_KEYS.has(key) && isMap(pair.value)) {
- pair.value.flow = true;
+ } else if (isMap(node)) {
+ for (const pair of node.items) {
+ const key = isScalar(pair.key) ? pair.key.value : undefined;
+ if (typeof key !== "string") {
+ continue;
+ }
+ if (FLOW_SEQ_KEYS.has(key) && isSeq(pair.value)) {
+ pair.value.flow = true;
+ } else if (FLOW_MAP_KEYS.has(key) && isMap(pair.value)) {
+ pair.value.flow = true;
+ }
+ formatCollections(pair.value);
}
}
- return node;
}
/**
@@ -171,12 +190,14 @@ function renderFresh(entries: ModelsByProvider): string {
/**
* Insert new entries into an existing document, creating provider sections if
- * needed. Preserves comments and ordering of unchanged sections.
+ * needed, and refresh existing metadata. Preserves curated fields and comments.
*/
-function insertIntoDocument(
+function updateDocument(
yamlText: string,
newEntries: ModelsByProvider,
-): string {
+ modelsDev: ModelsDevApi,
+ providers: readonly string[] | undefined,
+): { yaml: string; updated: number } {
const doc = parseDocument(yamlText);
if (doc.contents == null) {
// Bootstrap an empty map at the root.
@@ -188,6 +209,7 @@ function insertIntoDocument(
);
}
const root = doc.contents as unknown as YAMLMap;
+ const updated = refreshMetadata(doc, root, modelsDev, providers);
for (const [provider, models] of Object.entries(newEntries)) {
if (models.length === 0) {
@@ -215,7 +237,83 @@ function insertIntoDocument(
seq.items.unshift(...newItems);
}
- return doc.toString({ lineWidth: 0, flowCollectionPadding: false });
+ return {
+ yaml:
+ updated > 0 || Object.keys(newEntries).length > 0
+ ? doc.toString({ lineWidth: 0, flowCollectionPadding: false })
+ : yamlText,
+ updated,
+ };
+}
+
+/** Refresh only sourced metadata, preserving curation and unknown values. */
+function refreshMetadata(
+ doc: Document,
+ root: YAMLMap,
+ modelsDev: ModelsDevApi,
+ providers: readonly string[] | undefined,
+): number {
+ let updated = 0;
+ const providerFilter = providers ? new Set(providers) : null;
+ for (const pair of root.items) {
+ const provider = isScalar(pair.key) ? pair.key.value : undefined;
+ if (typeof provider !== "string" || !isSeq(pair.value)) {
+ continue;
+ }
+ if (providerFilter && !providerFilter.has(provider)) {
+ continue;
+ }
+ const sourceProviders = Object.entries(PROVIDER_MAP)
+ .filter(([, target]) => target === provider)
+ .map(([source]) => source);
+ for (const item of pair.value.items) {
+ if (!isMap(item)) {
+ continue;
+ }
+ const modelId = item.get("model");
+ if (typeof modelId !== "string") {
+ continue;
+ }
+ // Same first-source precedence as new models; no cross-provider fallback.
+ const source = sourceProviders
+ .map((id) => modelsDev[id]?.models[modelId])
+ .find((model) => model !== undefined);
+ if (!source) {
+ continue;
+ }
+ const existing = ExistingMetadataSchema.safeParse(item.toJSON());
+ if (!existing.success) {
+ Logger.warn(
+ `Skipping metadata refresh for ${provider}/${modelId}: ${existing.error.issues[0]?.message}`,
+ );
+ continue;
+ }
+ let changed = false;
+ const metadataValues = deriveMetadataUpdates(source, existing.data);
+ for (const [field, value] of Object.entries(metadataValues)) {
+ const previous = item.get(field, true);
+ if (JSON.stringify(previous?.toJSON()) === JSON.stringify(value)) {
+ continue;
+ }
+ const metadata = doc.createNode({ [field]: value });
+ formatCollections(metadata);
+ if (!isMap(metadata)) {
+ continue;
+ }
+ const replacement = metadata.get(field, true);
+ if (previous && replacement) {
+ replacement.comment = previous.comment;
+ replacement.commentBefore = previous.commentBefore;
+ }
+ item.set(field, replacement);
+ changed = true;
+ }
+ if (changed) {
+ updated++;
+ }
+ }
+ }
+ return updated;
}
function findProviderSeq(root: YAMLMap, provider: string): YAMLSeq | null {
@@ -241,9 +339,13 @@ export async function syncModels(options: SyncOptions): Promise<SyncResult> {
modelsYamlPath,
write = true,
mode = "append",
+ metadataOnly = false,
maxPerProvider,
providers,
} = options;
+ if (metadataOnly && mode === "replace") {
+ throw new Error("Metadata-only sync cannot replace the catalog");
+ }
const modelsDev = options.modelsDev ?? (await fetchModelsDev());
// `replace` mode pretends the file is empty so everything is treated as new.
@@ -251,25 +353,24 @@ export async function syncModels(options: SyncOptions): Promise<SyncResult> {
mode === "replace" ? "" : readFileSync(modelsYamlPath, "utf-8");
const existing = parseExistingModels(existingText);
const summary = mergeModels(existing, modelsDev, {
- maxPerProvider,
+ maxPerProvider: metadataOnly ? 0 : maxPerProvider,
providers,
});
const addedCount = countEntries(summary.newEntries);
const isFresh = mode === "replace" || existingText.trim() === "";
- const yaml = isFresh
- ? renderFresh(summary.newEntries)
- : addedCount > 0
- ? insertIntoDocument(existingText, summary.newEntries)
- : existingText;
+ const { yaml, updated } = isFresh
+ ? { yaml: renderFresh(summary.newEntries), updated: 0 }
+ : updateDocument(existingText, summary.newEntries, modelsDev, providers);
- if (write && (addedCount > 0 || mode === "replace")) {
+ if (write && (addedCount > 0 || updated > 0 || mode === "replace")) {
writeFileSync(modelsYamlPath, yaml);
}
return {
added: addedCount,
preserved: summary.preservedCount,
+ updated,
yaml,
};
}
@@ -290,10 +391,10 @@ async function main(): Promise<void> {
});
Logger.info(
- `Sync complete: added ${result.added} new model(s), preserved ${result.preserved} existing entries.`,
+ `Sync complete: added ${result.added} new model(s), refreshed metadata for ${result.updated}, preserved ${result.preserved} existing entries.`,
);
Logger.info(
- result.added > 0
+ result.added > 0 || result.updated > 0
? "Review the diff (git diff packages/llm-info/data/models.yml) and open a PR."
: "No changes — models.yml is up to date.",
);