Skip to content

[1/2] fix: document the name and description returned for each generation model - #141

Merged
dazzatronus merged 1 commit into
mainfrom
derk/model-display-fields
Sep 25, 2026
Merged

dazzatronus merged 1 commit into
mainfrom
derk/model-display-fields

Conversation

@dazzatronus

@dazzatronus dazzatronus commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

GET /models and GET /models/{id} already return a name and description for each model, but GenerationModel doesn't declare them. The generated zod schema is strict, so the published package rejects every real response from these endpoints.

This declares both as optional strings, with examples taken from the live catalogue.

Verify: pnpm build and pnpm test pass on Node 22. Live /models, /models?expand=options and /models/{id} responses fail generationmodelGenerationModelSchema in 1.18.3 on name and description, and parse with this branch.

Stack

Order PR Adds Why separate
1 #141 current Declares name and description Corrects the spec to the current response
2 #142 Adds available and unavailableReason New field clients will rely on; revertible alone

Merge bottom-up: #141 into main, then retarget #142 to main.

flowchart LR
  A["Client lists generation models<br/>with its API key"] --> B{"Account's plan includes<br/>this kind of generation?"}
  B -- yes --> C["available: true"]
  B -- no --> D["available: false<br/>+ unavailableReason"]
  B -- "can't confirm" --> E["available omitted"]
  C --> F["Offer the model"]
  D --> G["Hide or disable the model"]
  E --> H["Treat as unknown;<br/>generation is still checked"]
Loading

Rules: available and unavailableReason, list endpoint guidance.

@dazzatronus
dazzatronus added this pull request to stack #143 September 25, 2026 10:48
@dazzatronus
dazzatronus merged commit 55b3bf0 into main Sep 25, 2026
1 check passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.18.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant