Skip to content

Conversation

@VerioN1
Copy link
Contributor

@VerioN1 VerioN1 commented Dec 18, 2025

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, and isImageModel helpers and exports them from the SDK.

  • SDK Exports (packages/sdk/src/index.ts):
    • Export isRealtimeModel, isVideoModel, isImageModel from ./shared/model.
  • Shared Models (packages/sdk/src/shared/model.ts):
    • Add type-guard functions: isRealtimeModel, isVideoModel, isImageModel.

Written by Cursor Bugbot for commit ce04941. This will update automatically on new commits. Configure here.

Comment on lines 34 to 38
realtimeModels,
videoModels,
imageModels,
modelSchema,
modelInputSchemas,
Copy link
Contributor

@AdirAmsalem AdirAmsalem Dec 18, 2025

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?

@VerioN1 VerioN1 force-pushed the feautre/export-zod-schemas branch from 7e2ff1c to f2fbe5e Compare December 18, 2025 07:17
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 18, 2025

Open in StackBlitz

npm i https://pkg.pr.new/DecartAI/sdk/@decartai/sdk@51

commit: ce04941

@VerioN1
Copy link
Contributor Author

VerioN1 commented Dec 18, 2025

fixed @AdirAmsalem

isVideoModel,
type Model,
type ModelDefinition,
modelSchema,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still needed?

type VideoModels,
} from "./shared/model";
export type { ModelState } from "./shared/types";
export { type ModelState, modelStateSchema } from "./shared/types";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still needed?

@VerioN1 VerioN1 changed the title Exposes SDK Zod validation schemas feat: Exposes SDK Zod validation schemas Dec 18, 2025
@VerioN1 VerioN1 merged commit 770ffee into main Dec 18, 2025
4 checks passed
@VerioN1 VerioN1 deleted the feautre/export-zod-schemas branch December 18, 2025 10:59
@VerioN1 VerioN1 changed the title feat: Exposes SDK Zod validation schemas feat: Exposes SDK validation on models names Dec 18, 2025
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.

2 participants