anomalyco / anomalyco/models.dev

bun validate accepts limit.output > limit.context (64 published models, incl. a dropped zero on jiekou/claude-haiku-4-5)

Open
#6,073 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
6.9k
Forks
1.7k
Avg merge
3h 21m
Merged PRs (30d)
873

Description

bun validate requires limit.context and limit.output on every resolved provider model (AGENTS.md -> "Required on resolved provider models"), but nothing checks the relation between them. limit.output > limit.context is currently publishable, and 64 text-generation models across 18 providers ship that way in models.dev/api.json right now.

For a text model that's a contradiction: output tokens come out of the context window, so output can't exceed context.

Worked example - the check would have caught a real dropped zero

providers/jiekou/models/claude-haiku-4-5-20251001.toml:

[limit]
context = 20000
output = 64000

Claude Haiku 4.5 has a 200,000-token context window. The catalog already knows this in two other places:

  • models/anthropic/claude-haiku-4-5.toml -> context = 200_000
  • providers/anthropic/models/claude-haiku-4-5-20251001.toml -> context = 200_000

Of the 59 provider entries for this model in api.json, 57 say 200000, one says 192000, and this one says 20000.

The value is imported faithfully from upstream rather than mistyped here: https://api.jiekou.ai/openai/models currently returns "context_size": 20000 for claude-haiku-4-5-20251001, while the same response returns 200000 for its own sibling SKUs claude-haiku-4-5-20251001-dd, -r and -cc. So it's an upstream typo - but it reaches api.json as published fact because nothing downstream contradicts it, and output (64000) > context (20000) was the signal sitting right there in the same file.

Suggested check

In bun validate, per resolved provider model:

if (limit.output > limit.context) fail(`limit.output (${limit.output}) exceeds limit.context (${limit.context})`)

Two caveats, from actually reading the hits rather than just counting them:

  1. Restrict to text generation (modalities.output === ["text"], non-audio input). Embedding entries put the vector dimension in limit.output - azure/cohere-embed-v3-english is 512 -> 1024, digitalocean/e5-large-v2 512 -> 1024 - and ASR entries put decoder frames there (whisper-large-v3, 448 -> 4096). Those trip the rule for an unrelated reason and are probably a separate modelling question, so I've excluded them from the count above.
  2. About 20 of the 64 are near-misses that look like a decimal-vs-binary mismatch: context = 128000 with output = 131072, or 256000/262144. In those the context is likely the wrong field, not the output - but they're still contradictions, and the same check surfaces them.

The 64 entries

full list
provider model limit.context limit.output
302ai gemini-3-pro-image-preview 32,768 64,000
302ai mistral-large-2512 128,000 262,144
cloudflare-ai-gateway deepseek/deepseek-v4-pro 131,072 384,000
cortecs devstral-2512 256,000 262,000
cortecs minimax-m2.5 196,000 196,608
cortecs mistral-nemo-instruct-2407 128,000 131,072
edenai amazon/moonshot.kimi-k2-thinking 128,000 262,144
edenai deepseek/deepseek-chat 131,072 384,000
edenai openai/gpt-4 8,191 8,192
edenai scaleway/deepseek-v4-flash-0731 256,000 384,000
helicone deepseek-tng-r1t2-chimera 130,000 163,840
helicone kimi-k2-thinking 256,000 262,144
huggingface thinkingmachines/Inkling-Small 524,288 1,048,576
jiekou claude-haiku-4-5-20251001 20,000 64,000
llmgateway mistral-large-latest 128,000 262,144
llmgateway-providers mistral/mistral-large-latest 128,000 262,144
merge-gateway qwen/qwen3.8-2.4t-a95b 262,144 1,010,000
nano-gpt Doctor-Shotgun/MS3.2-24B-Magnum-Diamond 16,384 32,768
nano-gpt Gryphe/MythoMax-L2-13b 4,000 4,096
nano-gpt ReadyArt/MS3.2-The-Omega-Directive-24B-Unslop-v2.0 16,384 32,768
nano-gpt TheDrummer/Cydonia-24B-v2 16,384 32,768
nano-gpt TheDrummer/Cydonia-24B-v4 16,384 32,768
nano-gpt TheDrummer/skyfall-36b-v2 32,000 32,768
nano-gpt baseten/Kimi-K2-Instruct-FP4 128,000 131,072
nano-gpt chutesai/Mistral-Small-3.2-24B-Instruct-2506 128,000 131,072
nano-gpt deepseek-ai/DeepSeek-R1-0528 128,000 163,840
nano-gpt deepseek-reasoner 64,000 65,536
nano-gpt mistral-small-31-24b-instruct 128,000 131,072
nano-gpt mistralai/mistral-large 128,000 256,000
nano-gpt mistralai/mistral-saba 32,000 32,768
nano-gpt moonshotai/Kimi-K2-Instruct-0905 256,000 262,144
nano-gpt nvidia/nemotron-3-nano-30b-a3b 256,000 262,144
nano-gpt pamanseau/OpenReasoning-Nemotron-32B 32,768 65,536
nano-gpt perplexity-academic-researcher 127,000 128,000
nano-gpt qwen/Qwen3-235B-A22B-Instruct-2507 256,000 262,144
nano-gpt qwen/Qwen3-235B-A22B-Thinking-2507 256,000 262,144
nano-gpt qwen/Qwen3-Next-80B-A3B-Instruct 256,000 262,144
nano-gpt qwen/Qwen3-VL-235B-A22B-Instruct 128,000 262,144
nano-gpt qwen25-vl-72b-instruct 32,000 32,768
nano-gpt sonar 127,000 128,000
nano-gpt sonar-deep-research 60,000 128,000
nano-gpt sonar-reasoning-pro 127,000 128,000
nano-gpt soob3123/GrayLine-Qwen3-8B 16,384 32,768
nano-gpt unsloth/gemma-3-12b-it 128,000 131,072
nano-gpt z-ai/GLM-4.6-turbo 200,000 204,800
nano-gpt z-ai/GLM-4.6-turbo:thinking 200,000 204,800
nano-gpt z-ai/glm-4.5v 64,000 96,000
nano-gpt z-ai/glm-4.5v:thinking 64,000 96,000
nebius MiniMaxAI/MiniMax-M2.5-fast 8,000 8,192
nebius Qwen/Qwen3-235B-A22B-Thinking-2507-fast 8,000 8,192
nebius Qwen/Qwen3-Next-80B-A3B-Thinking-fast 8,000 8,192
nebius Qwen/Qwen3.5-397B-A17B-fast 8,000 8,192
nebius deepseek-ai/DeepSeek-V3.2-fast 8,000 8,192
nebius openai/gpt-oss-120b-fast 8,000 8,192
novita-ai sao10K/L3-8B-stheno-v3.2 8,192 32,000
poe novita/kimi-k2.5 128,000 262,144
privatemode-ai kimi-k2.6 256,000 262,144
privatemode-ai kimi-latest 256,000 262,144
qiniu-ai meituan/longcat-flash-lite 256,000 320,000
submodel deepseek-ai/DeepSeek-R1-0528 75,000 163,840
submodel deepseek-ai/DeepSeek-V3-0324 75,000 163,840
submodel deepseek-ai/DeepSeek-V3.1 75,000 163,840
tensorx qwen/qwen3-235b-a22b-2507 131,000 262,144
tensorx qwen/qwen3-vl-235b-a22b-instruct 131,000 131,072

Method: https://models.dev/api.json fetched 2026-09-02, filtered to limit.output > limit.context with limit.context > 0, modalities.output == ["text"], no audio input, excluding embedding/rerank/TTS/ASR entries by name. Happy to open a PR for the validator rule if that's useful - I didn't want to guess at where you'd want it in the schema vs. a separate lint step.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the bun validate entry point and read AGENTS.md for the resolved provider model requirements. Inspect the mentioned model TOML files and the generated models.dev/api.json data to understand the existing validation path. Done means text-generation models with limit.output > limit.context are rejected while embedding and audio-related entries remain excluded.

Written by the indexing model from the issue text.

Assessment

Tech stack
bun, typescript
Domain
data, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.