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.
name: fill-model-descriptions
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
Fill Model Descriptions
Goal
Keep descriptions in packages/llm-info/data/models.yml concise and accurate. Fill empty descriptions and refresh existing descriptions when newly added models or authoritative documentation make them obsolete. Source descriptions from OpenRouter first, then provider documentation as a fallback.
Scope and Contract
- Fill every empty
descriptionfor which a confident source is available. - 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. - 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 and skip the description workflow.
Workflow
Read
packages/llm-info/data/models.yml. Parse it with theyamllibrary'sparseDocument(NOTparse) so formatting and comments are preserved on write-back.Collect and review descriptions:
- Build one worklist of
{ provider, model }pairs containing every entry wheredescriptionis empty. - Review related existing entries in the same model families for claims made obsolete by the new entries. Also review descriptions affected by a factual change found in authoritative documentation, and add every obsolete entry to the same worklist.
- Build one worklist of
Source descriptions in this priority order:
a. OpenRouter —
GET https://openrouter.ai/api/v1/models(no auth required). Build a lookup keyed by lowercasedid. For each{ provider, model }, try candidates in this order:${vendor}/${model}wherevendorcomes from the Vendor Map below.${vendor}/${model.replaceAll('-', '.')}(some OR ids use.separators, e.g.claude-3.5-sonnet).- For Bedrock entries with region/alias prefixes (
us.,eu.,jp.,global.,anthropic.,minimax.,mistral.,zai.,nvidia.), strip the prefix and retry with the appropriate vendor. - For Google entries with
@defaultsuffix (e.g.claude-opus-4-7@default), strip the suffix and tryanthropic/${rest}. These are Vertex-hosted Anthropic models — descriptions should note they are Vertex AI only (not Gemini API).
b. Provider docs — if no OpenRouter hit, search the canonical provider's docs page (anthropic.com/news, platform.openai.com/docs/models, ai.google.dev/gemini-api/docs/models, mistral.ai/news, x.ai/blog, etc.) for the model's one-line summary. Use the
WebSearchorWebFetchtool.c. Skip — if neither source has a confident answer, leave
description: ""and record the{ provider, model }for the final summary. Empty is better than wrong.Truncate each sourced description per the rules in the "Truncation" section.
Write the YAML back using targeted
Pairmutations on the parsedDocument, not text replacement. Reference implementation:packages/llm-info/src/sync-models.tsshows how to load a Document, mutate sequence/map nodes, and stringify with{ lineWidth: 0, flowCollectionPadding: false }to preserve formatting.Validate by running:
pnpm --filter @marimo-team/llm-info testThe
schema.test.tstest will catch any structural drift.Report to the user:
- How many empty descriptions were filled.
- 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_optionspreserves upstreamtoggle,effort(with explicit values), andbudget_tokens(with optionalmin/max) controls. Preservenull,default, and the-1automatic-budget sentinel when supplied.limitsmaps upstreamlimit.contextandlimit.output, in tokens. Preserve supplied values, including zero; omitted fields remain unknown.- An explicit
reasoning: falseremoves 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:
| Marimo provider | OpenRouter vendor prefix | Notes |
|---|---|---|
anthropic |
anthropic |
Direct match in most cases |
openai |
openai |
Direct match |
google |
google |
Strip @default suffix if present |
mistral |
mistralai |
Note the ai suffix |
xai |
x-ai |
Hyphenated |
azure |
openai |
Azure mostly re-exposes OpenAI models |
bedrock |
varies | Strip region prefix (us./eu./jp./global.) and use the embedded vendor (anthropic.foo → anthropic/foo) |
github |
varies | Ids like openai/gpt-4.1 carry the vendor; strip the github layer |
openrouter |
embedded in id | Ids like anthropic/claude-opus-4.7-fast already carry the vendor |
wandb |
embedded in id | Ids like deepseek-ai/DeepSeek-V3.1; the prefix is the vendor |
opencode-go |
rarely on OR | Source from provider docs |
ollama |
not on OR | Source from the Ollama model card |
Truncation
- One sentence. Split on
.and take the first. Strip trailing whitespace and any markdown formatting (**,_, backticks). - Hard cap at 200 characters. If the first sentence is longer, cut at the last word boundary before 200 and append
…. - Strip leading articles for consistency: prefer "Frontier reasoning model optimized for…" over "This is a frontier reasoning model optimized for…".
- Prefer capability statements over marketing. If OpenRouter gives "the best model from X" but the provider docs give "optimized for tool use and long-context reasoning", prefer the latter.
Examples
Good (matches the tone of existing hand-curated entries):
Opus model optimized for coding and long-running professional tasksSonnet-class model with strong performance across coding, agents, and professional workLightweight Gemma model trained by Google, designed to run on a single GPUMultimodal Mixture-of-Experts model optimized for complex tool use and reasoning
Bad (do not produce these):
Claude 3.5 Sonnet delivers better-than-Opus capabilities, faster-than-Sonnet speeds, at the same Sonnet prices. Sonnet is particularly good at coding, vision…— too long, contains marketingThe best model from Anthropic— vague, no information contentAn AI model— useless**Claude 3.5 Sonnet** is a _frontier_ model…— markdown not stripped
Quick Reference
- Data file:
packages/llm-info/data/models.yml - Schema:
packages/llm-info/src/index.ts(AiModelinterface) - YAML write reference:
packages/llm-info/src/sync-models.ts(buildEntryNode,addProviderSection) - OpenRouter API:
https://openrouter.ai/api/v1/models(public, no auth) - Validation:
pnpm --filter @marimo-team/llm-info test