Files
oh-my-pi/packages/catalog
roboomp 930bb33f4a fix(catalog): floored gpt-5.6 codex context window at 372k
Codex discovery under-reports the gpt-5.6 sol/terra/luna window: some
accounts omit `context_window`, others actively return 272000. The #5707
`?? fallback` only fired on absence, so an actively-reported 272000 passed
through and `preferDiscoveryLimit` overwrote the bundled 372K pin at
runtime, dropping compaction from 279000 to 204000 tokens.

Treat GPT_5_6_CONTEXT_WINDOW as a floor for these SKUs via Math.max so
neither omission nor active under-report regresses the real capacity;
other models keep honoring the reported value. Corrected the stale
"omits" comments in codex.ts and generated-policies.ts.

Fixes #6259
2026-07-22 04:03:25 +00:00
..
2026-07-21 22:11:51 +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 (models.dev, 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