Skip to content

docs: document the generation model catalogue endpoints - #130

Open
dazzatronus wants to merge 3 commits into
mainfrom
derk/eng-869-models-paths
Open

docs: document the generation model catalogue endpoints#130
dazzatronus wants to merge 3 commits into
mainfrom
derk/eng-869-models-paths

Conversation

@dazzatronus

@dazzatronus dazzatronus commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

The model catalogue endpoints ship in the API but appear in no published schema, so the clients meant to drop their hardcoded model lists have nothing to generate against.

Documented as they behave, read off the merged handler rather than the design.

Two filters the handler accepts are left undocumented and a follow-up removes them. status cannot vary: no model carries one, and the handler reads it through a cast to a property the interface never declares, so everything resolves to active. type works, but each entry already carries its type and the catalogue is a dozen cached entries, so the filter saves a client nothing.

expand stays — option schemas are the bulk of an entry.

Pricing is its own schema because its shape carries a rule: credits is a number when a model charges flatly and an object keyed by option value when it does not, with tieredBy naming the selector. That tells a reader there is no formula to evaluate.

options stays free-form: it holds a per-model schema the registry generates, and pinning it here would duplicate a contract that can only drift.

Verify: pnpm build && pnpm test && pnpm test:smoke — 71 checks pass, both operations reach the generated types.

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