issue-249: add claude-sonnet-5/claude-opus-5 to Vertex catalog + document adding new Vertex models #250

Merged
david merged 1 commit from chore/issue-249/add-claude-sonnet-5-opus-5-vertex-models-doc into main 2026-08-18 00:01:39 +00:00
Owner

What & why

Anthropic's Claude Sonnet 5 and Claude Opus 5 are available on Google Cloud
Vertex AI (claude-sonnet-5 / claude-opus-5, no date suffix), but pi-loop's
vendored VERTEX_MODELS catalog was frozen at pi-provider-vertex-anthropic@0.1.3
and didn't include them — so PILOOP_MODEL=vertex-anthropic/claude-sonnet-5
(or --model vertex-anthropic/claude-sonnet-5) failed to resolve.

This PR adds both models to the catalog, records the hand-maintained deviation
from upstream, adds regression tests, and documents (in README.md) the process
for adding future Vertex models to the catalog, since it's a manual/hardcoded
list rather than a live lookup.

Per-file breakdown

Modified

  • src/model/vertexAnthropic/models.ts — adds claude-opus-5 and
    claude-sonnet-5 entries to VERTEX_MODELS (reasoning-capable, 1M-token
    context window, 128k max output tokens, matching Anthropic's published
    Vertex AI catalog); adds a provenance comment noting the deviation from
    vendored upstream 0.1.3.
  • NOTICE — adds a "Model catalog deviation" note explaining that
    claude-sonnet-5/claude-opus-5 are hand-added ahead of upstream picking
    them up, with a reminder to reconcile once upstream ships them.
  • src/model/vertexAnthropic/registerVertexAnthropic.test.ts — adds a
    VERTEX_MODELS catalog describe block asserting both new ids are present
    with the expected reasoning/contextWindow/maxTokens, and that they're
    included in the registered provider config.
  • README.md — adds a "⚠️ Adding a new Vertex model (important)" subsection
    under "Claude on Vertex (optional)" documenting that VERTEX_MODELS is a
    hardcoded/vendored snapshot (not a live catalog lookup), and the steps to
    add a new model id (edit models.ts, update NOTICE, add test coverage,
    verify with npm test/npm run lint + a live run).

Added

  • CHANGELOG.md — new file; "Unreleased / Fixed" entry documenting the
    claude-sonnet-5/claude-opus-5 catalog gap and fix.

Testing

  • npm run lint — passes
  • npx vitest run src/model/vertexAnthropic/registerVertexAnthropic.test.ts — 10/10 passing

Closes #249

## What & why Anthropic's Claude Sonnet 5 and Claude Opus 5 are available on Google Cloud Vertex AI (`claude-sonnet-5` / `claude-opus-5`, no date suffix), but pi-loop's vendored `VERTEX_MODELS` catalog was frozen at `pi-provider-vertex-anthropic@0.1.3` and didn't include them — so `PILOOP_MODEL=vertex-anthropic/claude-sonnet-5` (or `--model vertex-anthropic/claude-sonnet-5`) failed to resolve. This PR adds both models to the catalog, records the hand-maintained deviation from upstream, adds regression tests, and documents (in README.md) the process for adding future Vertex models to the catalog, since it's a manual/hardcoded list rather than a live lookup. ## Per-file breakdown **Modified** - `src/model/vertexAnthropic/models.ts` — adds `claude-opus-5` and `claude-sonnet-5` entries to `VERTEX_MODELS` (reasoning-capable, 1M-token context window, 128k max output tokens, matching Anthropic's published Vertex AI catalog); adds a provenance comment noting the deviation from vendored upstream `0.1.3`. - `NOTICE` — adds a "Model catalog deviation" note explaining that `claude-sonnet-5`/`claude-opus-5` are hand-added ahead of upstream picking them up, with a reminder to reconcile once upstream ships them. - `src/model/vertexAnthropic/registerVertexAnthropic.test.ts` — adds a `VERTEX_MODELS catalog` describe block asserting both new ids are present with the expected `reasoning`/`contextWindow`/`maxTokens`, and that they're included in the registered provider config. - `README.md` — adds a "⚠️ Adding a new Vertex model (important)" subsection under "Claude on Vertex (optional)" documenting that `VERTEX_MODELS` is a hardcoded/vendored snapshot (not a live catalog lookup), and the steps to add a new model id (edit `models.ts`, update `NOTICE`, add test coverage, verify with `npm test`/`npm run lint` + a live run). **Added** - `CHANGELOG.md` — new file; "Unreleased / Fixed" entry documenting the `claude-sonnet-5`/`claude-opus-5` catalog gap and fix. ## Testing - `npm run lint` — passes - `npx vitest run src/model/vertexAnthropic/registerVertexAnthropic.test.ts` — 10/10 passing Closes #249
david merged commit 749c5e654c into main 2026-08-18 00:01:39 +00:00
david deleted branch chore/issue-249/add-claude-sonnet-5-opus-5-vertex-models-doc 2026-08-18 00:01:39 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
david/pi-loop!250
No description provided.