Skip to content
Source
Sign inSign up
TanStack/schemas

Fill contextWindow, maxOutput, modalities, and request-feature capabilities on grain=provider catalogs #58

Mergedtombeckenhammerged 9 commits intomain fromrefs/pull/58/headmerged by tombeckenham View on GitHub

tombeckenhamcommented

Part of #53. Pricing, prose extraction, and spec-sync re-walk stay on that issue.

What

Native /models payloads publish none of these facts (OpenAI, xAI), or only token limits plus a capability tree (Anthropic), or limits plus thinking and sampling defaults (Gemini). The rest comes from each provider's own published sources, then from the bound generation request schema. No unlabeled third-party catalog: a model catalog that mirrors another one caps its accuracy at theirs.

SourceWhat it fills
Provider /models / extras / docscontextWindow, maxOutput, listing modalities, listing flags
Bound input schema (schemaEndpointId)OpenRouter supported_parameters names (tools, temperature, …) and input modalities still null after listing
OpenRouter catalog (already in D1)Compare only — discrepancies on model detail. Never written onto native rows

Listing/docs win on a field they stated. generated OpenAI-borrowed specs are not walked. Host-native capability objects (FAL, etc.) stay objects.

Each stored value carries fact_sources (migration 0006): per-field and per-flag { derivation, sourceUrl, endpointId, path }. GET /v1/models/{p}/{id} always includes factSources and discrepancies. GET /v1/models?provenance=1 includes factSources on list rows.

Gemini capabilities no longer holds supportedGenerationMethods. The :predict vs :generateContent decision is stored as schema_endpoint_id (migration 0005). The config fallback still reads leftover methods from capabilities so un-repolled Imagen keeps :predict.

Live fill rates (listing/docs only, 2026-09-08)

Schema-walk flags are not in these numbers; they land on the next poll after this ships.

ProvidercontextWindowmaxOutputmodalitiescapabilities
openai102/13110412589
anthropic11/11111111
grok7/120120
gemini54/5454047
groq14/14141410
jina29/2920290
fireworks23/250023
mistral50/500040
moonshot2/2002
sambanova7/7700
hyperbolic5/5001
novita155/156156156134
cohere29/330015

Behaviour notes

  • Production Workers Builds runs bun run deploy:ci, which applies pending D1 migrations then deploys. PR previews do not migrate (shared prod D1).
  • First poll after deploy emits one model.updated per newly filled row.
  • Docs-format drift surfaces as a poll error for that provider, not as silent nulls.

Still on #53 (not this PR)

  1. docs-extracted — leftover prose (Anthropic tools in sentences, OpenAI effort levels, Gemini modalities). Extraction model + verbatim quote, never overwriting a higher rung.
  2. Spec-sync re-walk — schema-derived flags currently refresh on the 15-min model poll. Re-walk bound models when a spec sync updates the input schema.
  3. Pricing — separate slice. Sources already identified on the issue.
    1. Deploying with  Cloudflare Workers  Cloudflare Workers

      The latest updates on your project. Learn more about integrating Git with Workers.

      StatusNameLatest CommitPreview URLUpdated (UTC)
      ✅ Deployment successful!
      View logs
      modelschemas16e29d26Commit Preview URLSep 10 2026, 05:36 AM
    2. tombeckenham changed the title

    3. tombeckenham merged thiseb67a99

    4. tombeckenham closed this

Sign in to join this conversation.