Repository navigation
Source instrument specs from grid-defaults.json - #5
Merged
Merged
Conversation
Add grid-defaults.json at the repo root: the Grid instrument catalogue (context windows, output caps, modalities, uniform pricing) published by the registry generator from the same source of truth as /v1/models. Wire the CLI to consume it: the static MODEL_SPECS mirror had drifted (prime-tier context published as 128k vs the catalogue's 196,608). resolveGridInstrumentModelSpec now reads a spec map refreshed at startup from the local repo file or GitHub raw (3s timeout, silent fallback), with a corrected built-in mirror for offline runs. A parity test pins the mirror to the committed file so they cannot drift apart again.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Summary
grid-defaults.jsonat the repo root: The Grid's instrument catalogue (context windows, output caps, input modalities, uniform per-1M pricing) published by the registry generator from the same source of truth as the live/v1/modelsendpoint. The generator reconciles this file daily against the source, so drift is caught automatically.MODEL_SPECSmirror ingrid-instruments.tshad drifted — prime-tier instruments were provisioned with a 128,000 context window while the catalogue guarantees 196,608.resolveGridInstrumentModelSpecnow reads a spec map refreshed at CLI startup (local repo file first, then GitHub raw with a 3s timeout, overlapped with the update check so it adds no startup latency), with a corrected built-in fallback for offline runs.grid-defaults-parity.test.ts, which pins the fallback mirror to the committed file so the two can never silently drift apart again, and updates the stale 128k expectations in the doc-parity and model-spec tests to the correct 196,608.Test plan
npm run test:cli— 949 pass, 0 failnpm run typecheck --workspace=@agentsea/cli— cleanrefreshGridInstrumentSpecs(): fallback and refreshed values agree (agent-prime 196,608; agent-max 1,000,000; unknown slug falls back to defaults)