Repository navigation
fix(catalog): parse 1.94.0 inline enum bindings and add API-only SKUs - #340
Closed
Multfinite wants to merge 2 commits into
Closed
Multfinite wants to merge 2 commits into
Multfinite wants to merge 2 commits into
Conversation
- extractEnumBindings(): inline (Inner={...}) IIFE enums (X_=(Q_={ANTHROPIC:...}).VERCEL_AI_GATEWAY)
now join the eval context before string bindings; fixes 'Q_ is not defined' on
command-code@1.94.0 that broke upstream catalog-sync since Dec 2 (issues BrainerVirus#333-BrainerVirus#339)
- buildEvalContext(): apply enum bindings before extractStringBindings aliases
- API_ONLY_MODELS: 5 provider-API SKUs missing from the 1.94.0 CLI bundle
(flint-v1.1:free, minimax-m4, inkling-2-small, beam-contributor:free, subq-savant-1.4)
- sync: models.json 105 -> 111 from command-code@1.94.0; drops retired
recursive/flint-v1.0:free and stepfun/Step-5-Preview
No code changes. FORK.md previously mixed Russian prose; the fork docs must stay English so the upstream PR references are readable by maintainers. Authored by an AI agent (GLM 5.3 Flash via OpenCode) at the request of @Multfinite.
Owner
|
Thanks @Multfinite (and the agent that prepared this) — this PR identified the real 1.94.0 bundle shape and the API-only model gap. The extractor fix landed via #344, with a regression fixture keyed to the Closing this in favor of the merged implementation. The diagnosis was valuable and directly shaped the fix. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
command-code@1.94.0changed the shape of the minified CLI bundle: the provider enum is now defined as an inline IIFEinstead of the previously recognized
Wt={...}/Bi={...}forms. The catalog extractor collects onlyname="value"string bindings before theSONNET_4_6:{id:"claude-sonnet-4-6"anchor, so evaluating the catalog object failed with:Consequences:
Catalog synchas failed every 6 hours since Dec 2 — issues [catalog-break] command-code@1.94.0 — model extraction failed #333–[catalog-break] command-code@1.94.0 — model extraction failed #339 ([catalog-break] command-code@1.94.0 - model extraction failed)0.12.53(Nov 26), so the plugin still serves the 1.93.4-era catalog (105 models)recursive/flint-v1.0:freeis retired at the API level ("Flint has been retired. Switch to Flint 1.1") but is still advertised by the pluginWhat this does
extractEnumBindings()— new extractor for inline IIFE enum bindingsX_=(Q_={...}).VERCEL_AI_GATEWAY. The object is evaluated and joined into the eval context underQ_,Q_Context, and the outerX_, soprovider:Q_.ANTHROPICinside the catalog resolves. Note the real 1.94.0 shape uses a single paren:X_=(Q_={...})(notX_=((Q_={...}))— my first attempt assumed the double form and silently matched nothing).buildEvalContext()applies enum bindings beforeextractStringBindings()so plain string aliases still resolve on top.API_ONLY_MODELS— 5 SKUs the live provider API serves but the 1.94.0 CLI bundle does not list:recursive/flint-v1.1:free,minimax/minimax-m4,thinkingmachines/inkling-2-small,reflection/beam-contributor:free,subquadratic/subq-savant-1.4. They are merged before the availability filter, so they survivefilterCatalogByAvailabilitywith real metadata; costs are filled by the normal official-docs / models.dev pipeline (same as CLI-derived entries).bun run sync -- --remote:models.json105 → 111 models fromcommand-code@1.94.0; retiredrecursive/flint-v1.0:freeandstepfun/Step-5-Previeware dropped by the live availability filter.Verification
bun test tests/unit/catalog.test.ts— 29 pass, 0 failbun test tests/unit/sync-models.test.ts— 8 pass, 0 failtsc --noEmit,oxlint --deny-warnings,oxfmt --check— cleanbun test tests/unit/— 268 pass / 6 fail, and those 6 fail identically on a clean HEAD worktree (env-dependent:bunnot on the test-spawned PATH, POSIX paths inpluginStateDirexpectations,verify:release-candidateneeds a working pack) — none are touched by this patchopencode modelslists 111commandcode/*models, andcommandcode/flint-v1.1:free+commandcode/glm-5.4return real completions (previouslyflint-v1.0:freefailed with the retirement error)Closes #333, closes #334, closes #335, closes #336, closes #337, closes #338, closes #339