-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Exposes SDK validation on models names #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
packages/sdk/src/index.ts
Outdated
| realtimeModels, | ||
| videoModels, | ||
| imageModels, | ||
| modelSchema, | ||
| modelInputSchemas, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to expose this for the isRealtime/isVideo/isImage checks?
Exposing the Zod schemas directly would make Zod - and these specific schemas - part of our public API, which I'm not sure is ideal. It would only benefit our Zod-based consumers, and limit our ability to evolve the schemas freely or, if needed, change Zod in favor of something else in the future.
What do you think? Maybe we should expose more targeted, explicit checks instead?
7e2ff1c to
f2fbe5e
Compare
commit: |
|
fixed @AdirAmsalem |
packages/sdk/src/index.ts
Outdated
| isVideoModel, | ||
| type Model, | ||
| type ModelDefinition, | ||
| modelSchema, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still needed?
packages/sdk/src/index.ts
Outdated
| type VideoModels, | ||
| } from "./shared/model"; | ||
| export type { ModelState } from "./shared/types"; | ||
| export { type ModelState, modelStateSchema } from "./shared/types"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still needed?
Exposes important Zod validation schemas from the SDK.
Enables external consumers to leverage these schemas for consistent data validation, including various model definitions and model state.
Note
Adds
isRealtimeModel,isVideoModel, andisImageModelhelpers and exports them from the SDK.packages/sdk/src/index.ts):isRealtimeModel,isVideoModel,isImageModelfrom./shared/model.packages/sdk/src/shared/model.ts):isRealtimeModel,isVideoModel,isImageModel.Written by Cursor Bugbot for commit ce04941. This will update automatically on new commits. Configure here.