Skip to content

fix(catalog): bind inline provider enums from command-code 1.94 - #344

Merged
BrainerVirus merged 5 commits into
mainfrom
fix/catalog-inline-enum-bindings
Dec 4, 2026
Merged

BrainerVirus merged 5 commits into
mainfrom
fix/catalog-inline-enum-bindings

Conversation

@BrainerVirus

Copy link
Copy Markdown
Owner

Problem

command-code@1.94.0 defines its provider enum inline:

X_=(Q_={ANTHROPIC:"anthropic",OPENAI:"openai",VERCEL_AI_GATEWAY:"vercel-ai-gateway",OPENROUTER:"openrouter"}).VERCEL_AI_GATEWAY

The catalog reads provider:Q_.ANTHROPIC and provider:X_. An earlier rich enum (Bi={...}) wins extractBestProviderEnum, so Q_ was never bound and the sync failed with Could not evaluate model catalog: Q_ is not defined.

Change

  • src/catalog.ts: new extractEnumBindings finds outer=(inner={...}) before the catalog anchor using the balanced-brace scan, binds inner to the object and outer to the member's string value, and feeds them into buildEvalContext. This is the extractor part of fix(catalog): parse 1.94.0 inline enum bindings and add API-only SKUs #340 only: no API_ONLY_MODELS, no hardcoded rows, no FORK.md.
  • tests/unit/catalog.test.ts: regression fixture with the earlier qs/Bi enums followed by the real Q_/X_ shape. It fails on main with Q_ is not defined and passes here.
  • docs/specs/2026-09-20-catalog-freshness.md: documents the supported binding shapes, including the inline enum.
  • Regenerated models.json / manifest.json / _version.txt with bun run sync -- --remote: 125 CLI candidates intersected with 111 live IDs gives 106 models, command-code@1.94.0, status healthy. recursive/flint-v1.0:free is removed and amazon/ergo-1.0 and zai-org/GLM-5.4 are added. Every published ID is in the live /provider/v1/models list.

API-only IDs that remain unpublished, per the spec (no CLI metadata): minimax/minimax-m4, recursive/flint-v1.1:free, reflection/beam-contributor:free, subquadratic/subq-savant-1.4, thinkingmachines/inkling-2-small.

Supersedes #340.

Verification

  • bun run check: pass (275 tests)
  • bun test tests/unit/catalog.test.ts tests/unit/sync-models.test.ts: pass (38)
  • loadCatalogFromBundle on the real 1.94.0 dist/cli.mjs returns 125 entries

Co-authored-by: Multfinite 17569259+Multfinite@users.noreply.github.com

BrainerVirus and others added 5 commits December 4, 2026 15:23
Co-authored-by: Multfinite <17569259+Multfinite@users.noreply.github.com>
Workit-Session: ses_dbdda4daaffexKPxS5Z9LKhpI2:ses_dbdb64884ffeMNw51fReXEvm1T
Workit-Session: ses_dbdda4daaffexKPxS5Z9LKhpI2:ses_dbdb64884ffeMNw51fReXEvm1T
Workit-Session: ses_dbdda4daaffexKPxS5Z9LKhpI2
… source

Co-Authored-By: Claude <noreply@anthropic.com>
Workit-Session: ses_dbdda4daaffexKPxS5Z9LKhpI2:ses_dbda73d6fffeREpCn308MkgZ81
@BrainerVirus
BrainerVirus merged commit a2bf486 into main Dec 4, 2026
5 checks passed
@BrainerVirus
BrainerVirus deleted the fix/catalog-inline-enum-bindings branch December 4, 2026 18:41
@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.12.55 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant