feat: expose SDK model registry exports#134
Merged
Merged
Conversation
commit: |
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.
Expose SDK-owned model registry metadata so consumers can rely on canonical model names, alias normalization, and filtered model listings instead of duplicating model literals.
This keeps existing SDK model factories working while adding stable helpers for registry consumers and preserving
*-latestas server-resolved moving targets.Validated with unit tests, typecheck, and build.
Note
Medium Risk
Expands the SDK’s public surface area around model identifiers and adds new alias/listing logic; low runtime risk but moderate compatibility risk for consumers depending on prior exports/types.
Overview
Adds public model-registry exports from the package root (
CanonicalModel,modelAliases,isModel/isCanonicalModel,resolveModelAlias/resolveCanonicalModelAlias, andlistModels) so consumers can normalize model inputs and enumerate available models bykind.Introduces explicit canonical model name schemas (excluding
*-latestand deprecated aliases) while keeping existing model factories and broader model validation accepting legacy/latest names; unit tests are expanded to cover the new helpers, listing behavior, and to assert raw zod schemas are not exported from the root.Reviewed by Cursor Bugbot for commit a3973ff. Bugbot is set up for automated code reviews on this repo. Configure here.