Skip to content

Sync v1 REST client with API spec - #99

Merged
hbrooks merged 1 commit into
mainfrom
sync/v1-model-manufacturer
Aug 3, 2026
Merged

Sync v1 REST client with API spec#99
hbrooks merged 1 commit into
mainfrom
sync/v1-model-manufacturer

Conversation

@ellipsis-dev

@ellipsis-dev ellipsis-dev Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Syncs the hand-maintained v1 client with the spec after ellipsis-dev/ellipsis#6106, which added manufacturer to the GET /v1/models response.

Changed

src/lib/types.ts only — no endpoint was added, removed, or re-pathed, so src/lib/api.ts needed no change.

SupportedModel

  • Added manufacturer: ModelManufacturer (required) — new on SupportedModelApi in models_router.py. Required in the spec, so required here.
  • Added rate_card: ModelRateCard — see note below.

ModelManufacturer (new) — 'anthropic' | 'openai' | 'zai', mirroring the ModelManufacturer StrEnum. A string union rather than an enum, matching how packages/shared mirrors it and how SessionSearchScope / AnalyticsAccountType are already declared in this file. The enum serializes to its lowercase values on the wire.

ModelRateCard (new) — the five pricing lanes from ModelRateCardApi.

Note: rate_card was pre-existing drift

rate_card is not from #6106 — the endpoint has served it since the rate table shipped, but this client never declared it. Since the spec is the source of truth and the field sits on the same response model, it's corrected here. Flagging it separately so review isn't misled into attributing it to the trigger PR.

Out of scope

  • ModelSpec.manufacturer and the derived MODEL_MANUFACTURERS map are internal registry structures, not exposed on any /v1 route — nothing to mirror.
  • No run-stream / WebSocket frame changes in #6106, so src/lib/ws.ts is untouched.

Verification

  • bun run typecheck — clean
  • bun run test — 426 passed (23 files)

Triggered by ellipsis-dev/ellipsis#6106.

GET /v1/models gained a required `manufacturer` field on each model
(ellipsis-dev/ellipsis#6106). Mirror it as a string union so an
unrecognized vendor is a type error rather than a silent mislabel.

Also fills in `rate_card`, which the endpoint has served all along but
this client never declared.

Co-Authored-By: Claude <noreply@anthropic.com>
@hbrooks
hbrooks merged commit 13af996 into main Aug 3, 2026
1 check passed
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