Files
oh-my-pi/packages/catalog
roboomp c00790fa3a fix(catalog): cap ollama cloud deepseek-v4 output at 65536
Ollama Cloud's deepseek-v4-pro and deepseek-v4-flash deployments reject any
output budget above 65536 with HTTP 400, despite advertising a 1M context /
384K output (ollama/ollama#16890). Ollama's /api/show never reports this cap,
so the catalog left the base models at the full context window and the dated
tag deepseek-v4-flash:0731 at a stale 8192 fallback. Pin these ids (base plus
tag variants) to min(contextWindow, 65536) at both runtime discovery and
generation; other cloud models keep their discovered limits.

Fixes #7266
2026-08-01 15:30:17 +00:00
..
2026-08-01 08:35:39 +02:00

@oh-my-pi/pi-catalog

Model catalog for oh-my-pi: bundled model database, provider discovery, model identity, classification, and equivalence.

What's inside

Module Purpose
models.json + models Bundled model database (pricing, context windows, modalities, thinking support)
provider-models Provider catalog descriptors (CATALOG_PROVIDERS), per-provider model resolution rules
discovery Runtime model discovery for OpenAI-compatible endpoints, Gemini, Codex, Cursor, Antigravity, Ollama
identity Model id parsing and classification (family/version), reference resolution, equivalence, selection priority
model-thinking Thinking/reasoning metadata and generated per-model policies
model-manager / model-cache Runtime model registry with discovery refresh and on-disk caching
variant-collapse Collapsing provider-specific variants of the same underlying model
compat Request/response compatibility fixups for OpenAI- and Anthropic-shaped APIs
wire Wire-level helpers: Codex, Gemini headers, GitHub Copilot
effort Reasoning-effort level definitions

Import from subpaths (@oh-my-pi/pi-catalog/<module>) or the root barrel.

models.json is generated

Never edit src/models.json by hand — it is produced from upstream sources (stencil.so, provider catalog discovery, OpenCode docs) by scripts/generate-models.ts and the resolvers in src/provider-models/. Regenerate with:

bun run gen:models

To change an entry, fix the source: resolver overrides in provider-models/openai-compat.ts, provider entries in provider-models/descriptors.ts, generator fixups in scripts/generate-models.ts, or thinking policies in model-thinking.ts.

Install

bun add @oh-my-pi/pi-catalog

Ships TypeScript source directly (no build step); requires Bun ≥ 1.3.14.

References