-
Notifications
You must be signed in to change notification settings - Fork 224
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
[Migration]: upgrade pydantic to v2 with sdk compatibility #1705
[Migration]: upgrade pydantic to v2 with sdk compatibility #1705
Conversation
…o __schema_type_properties__ for clarity
…de_schema to be Pydantic v2 compliance
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…to-v2-with-sdk-backward' branch
…dencies comes after agenta installation
…n the appropriate schema due to pydantic v2 upgrade
Candidate fix to #1705 (pydantic v2)
I tested both the previous and current versions of pydantic with two different variants, and both worked with the candidate fix (thank you). However, I'm unable to reproduce the issue that led to the previous solution that I did in the |
Hi @bekossy , When you see this, could you please check why the frontend tests are failing? To reproduce, update the backend environment, |
@aybruhm I was able to reproduce the issue and it turns out that it is from the code and not the tests |
… v1&v2 body schema
Thanks, @bekossy! I've reproduced the issue. Could you please pull and test again? I've fixed the problem. @mmabrouk, the issue was the body schema of the LLM application that was created from the UI. Here it is: It turns out that the body schema for an LLM app created from the UI is different from the one created from the CLI. Next steps for QA:
|
I would say instead of trying to use the templates. A much easier solution is to serve applications from the CLI using the poetry shell with agenta pointing to this branch, then again with the CLI using the production branch and make sure that everything is working. Specifically:
|
That's all I have been doing. :-)
|
Everything LGTM! 👍🏾 |
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.
Great job @aybruhm
I think this only needs cleaning up the changes and it's ready to merge. Then let's update the templates (to catch any potential bugs early).
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.
Thanks @aybruhm for solving this challenging issue, great work!
Description
This PR improves compatibility with the latest version of Pydantic (v2), ensuring the SDK remains up-to-date.
Changes done:
function_signature
to handle type annotations to allow fastapi to translate SDK type.override_schema
to align with Pydantic v2 schema definitions.getBodySchemaName
function inopenapi_parser.ts
to return the appropriate schema$ref
due to the upgrade to Pydantic version 2.Minor Changes done:
docker-assets/
to ensure agenta installation precedes application dependency installation.