From a90027c67a7af30fc7ac31246965597fcf4f257d Mon Sep 17 00:00:00 2001 From: "ellipsis-dev[bot]" Date: Sun, 2 Aug 2026 23:21:49 +0000 Subject: [PATCH] Sync v1 REST client with API spec: model manufacturer 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 --- src/lib/types.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/lib/types.ts b/src/lib/types.ts index 54c9a89..59f7208 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -374,13 +374,31 @@ export interface ListAgentTemplatesResponse { first_run_yaml: string } +// USD cents per 1M tokens, one field per pricing lane. A provider without +// prompt caching reports 0 for the cache lanes. +export interface ModelRateCard { + input_cents_per_1m_tokens: number + cache_write_5m_cents_per_1m_tokens: number + cache_write_1h_cents_per_1m_tokens: number + cache_read_cents_per_1m_tokens: number + output_cents_per_1m_tokens: number +} + +// Who built the model, for per-vendor display. Not who serves it: the GPT +// models reach us through Bedrock, so routing would attribute an OpenAI model +// to AWS. A union rather than an enum, so an unrecognized value is a type +// error here instead of silently rendering as a known vendor. +export type ModelManufacturer = 'anthropic' | 'openai' | 'zai' + // One model a customer may select for their agent, from the registry behind // the dashboard's rate table. `is_default_agent_model` marks what the server // resolves "Default" to. export interface SupportedModel { id: string display_name: string + manufacturer: ModelManufacturer is_default_agent_model: boolean + rate_card: ModelRateCard } export interface GetSupportedModelsResponse {