Skip to content

Source instrument specs from grid-defaults.json - #5

Merged
BarneyChambers merged 1 commit into
mainfrom
feat/grid-defaults-registry
Jul 20, 2026
Merged

BarneyChambers merged 1 commit into
mainfrom
feat/grid-defaults-registry

Conversation

@BarneyChambers

Copy link
Copy Markdown
Contributor

Summary

  • Adds grid-defaults.json at 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/models endpoint. The generator reconciles this file daily against the source, so drift is caught automatically.
  • Wires the CLI to actually consume it. The static MODEL_SPECS mirror in grid-instruments.ts had drifted — prime-tier instruments were provisioned with a 128,000 context window while the catalogue guarantees 196,608. resolveGridInstrumentModelSpec now 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.
  • Adds 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 fail
  • npm run typecheck --workspace=@agentsea/cli — clean
  • Smoke-tested refreshGridInstrumentSpecs(): fallback and refreshed values agree (agent-prime 196,608; agent-max 1,000,000; unknown slug falls back to defaults)

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.
@vercel

vercel Bot commented Jul 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agentsea-ui Ready Ready Preview, Comment Jul 20, 2026 12:52pm

Request Review

@BarneyChambers
BarneyChambers merged commit c48fa22 into main Jul 20, 2026
3 checks passed
@BarneyChambers
BarneyChambers deleted the feat/grid-defaults-registry branch July 20, 2026 12:53

This branch was successfully deployed

1 active deployment
Preview — fa713314 Deployed Jul 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant