docs: document the generation model catalogue endpoints - #130
Open
dazzatronus wants to merge 3 commits into
Open
docs: document the generation model catalogue endpoints#130dazzatronus wants to merge 3 commits into
dazzatronus wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
statuscannot vary: no model carries one, and the handler reads it through a cast to a property the interface never declares, so everything resolves toactive.typeworks, but each entry already carries its type and the catalogue is a dozen cached entries, so the filter saves a client nothing.expandstays — option schemas are the bulk of an entry.Pricing is its own schema because its shape carries a rule:
creditsis a number when a model charges flatly and an object keyed by option value when it does not, withtieredBynaming the selector. That tells a reader there is no formula to evaluate.optionsstays 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.