-
Couldn't load subscription status.
- Fork 28
chore: Use orval to replace ts-to-zod
#880
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
4d64917 to
be740b2
Compare
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.
Can you also remove this schema-tests package from pnpm workspaces file?
This check is still failing. Since exporting it originally was a mistake anyway, I would remove it from the index.ts. Is also a quick win. |
Cloud SDK PR is still not merged, thus, this error. But I can remove it and import from internal in orchestration. If not using alias, we will be importing |
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.
LGTM 🚀
GitHub seems to have a bug preventing me merge the PR even when it is approved. Try dismissing the review.
Context
Closes SAP/ai-sdk-js-backlog#367.
What this PR does and why it is needed
In favor of Zod v4 (currently imported from Zod package v3 with the path
zod/v4), we replacedts-to-zodwithorval.As discussed with @deekshas8 , we decided to also remove the schema tests.
We now generate zod schema for prompt-registry as
promptTemplatePostRequestSchemaaka. the newregistryControllerPromptControllerCreateUpdatePromptTemplateBodyzod schema is used in Orchestration package for supporting prompt template in JSON string.Sidenote:
We cannot at this point move to Zod package version v4 yet, as LangChain still depends on Zod package v3 (but support v4 contained by the v3 package). The
toJSONSchema()won't parsedescriptionetc. in properties correctly if we provide a zod object created by package v4. I described this also in #854 (comment).🤯 Notice: Zod package v4 ≠ Zod v4. Zod v4 can come from Zod package v4 or Zod package v3.