-
Notifications
You must be signed in to change notification settings - Fork 49
chore(llma): update SDKs #367
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
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.
6 files reviewed, no comments
| @@ -1,8 +1,8 @@ | |||
| try: | |||
| import langchain # noqa: F401 | |||
| import langchain_core # noqa: F401 | |||
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.
@carlos-marchal-ph does this mean we would not support LC <1.* on latest posthog sdk?
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.
That's correct. That's why it's also a major release. It's not ideal but at least it gives user a choice, they can still stay on 6.9. I guess we could backport it and export it as langchain_v0.
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.
hmm just trying to think through users who say have some agents working away using pre 1.0 LC but are doing all new agent dev in LC 1+
what would they do?
i think maybe would be problems for them?
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.
not against any of this but just thinking through what if or worse case scenarios if lots of users start complaining
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.
Nono, makes a lot of sense. I will implement an exported v0 wrapper. A shame that we are shipping all that code though, we really need to rethink how we approach the wrappers at some point.
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.
yeah 100% going to only get more complicated
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.
hmm just trying to think through users who say have some agents working away using pre 1.0 LC but are doing all new agent dev in LC 1+
actually not even sure how possible that is actually - it might sort of be.
@carlos-marchal-ph one option is to just go as-is but we just be ready with a draft pr for the v0 wrapper as a backup in case needed maybe?
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.
eg maybe we just accept that we wont know (since we dont actually have version tracking in the sdk) and just be ready for if it does mess up a lot of folks
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.
That makes sense too. In any case won't merge until Monday just to be safe.
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 - just want to be ready if we do need a follow on PR if we do end up seeing lots of users have issues and needing backwards compatibility with langchain for a bit longer. if so i think we can handle it in a follow on pr perhaps.
we are a bit blind as we dont have version from the sdk so not really any good way for us to know.
so its better on balance i think to try be a bit cleaner like we are in the pr but just be ready for if it does cause issues for some folks.
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.
i've not done a release of the python SDK for ages.
i'd be tempted to make it clear in this changelog note that this removes python 3.9 support.
i'd guess there's no user action on how they use the SDK, just whether we explicitly support the version, so no need for a "how to upgrade from 6 to 7" note
if we wanted to be very neat then we'd have a PR that removes 3.9 support, and then a PR that does the llma upgrades and we release those two changes as v7 but imho just making it clear in the changelog is enough
Co-authored-by: Paul D'Ambra <paul.dambra@gmail.com>
|
Added support for Python 3.14. The only issue is that it's not compatible with Pydantic 1.X. Pydantic is not a direct dependency of our SDK but we do accept Pydantic objects as input from users in case they are using it. I added a warning if we get passed a Pydantic V1 object on Python 3.14, which shouldn't happen with proper dependency management, but just in case. |
pyproject.toml
Outdated
| "types-six", | ||
| "pre-commit", | ||
| "pydantic", | ||
| "pydantic>=2.12", |
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.
so... in order to support 3.14
we're dropping support for pydantic 1.0
if you want to use python <14 you have to upgrade pydantic anyway
let's make that clear in the changelog too... i can imagine that being a pain for people but i also don't know if there's a better way to approach the versioning/support
it would be fine to separate support 3.14 from this PR so you can ship the previous thing
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.
I'm going to separate the PR to make sure to get this right. I'm not sure we really need to drop support for V1 for other versions of Python, as long as we make sure that we are testing against objects from both versions except for 3.14, which as you already said is intrinsically incompatible with V1.
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.
Added support for 3.14 without dropping Pydantic V1 for the rest of versions in #373.
| @@ -1,3 +1,17 @@ | |||
| # 7.0.0 - 2025-11-10 | |||
|
|
|||
| NB Python 3.9 is no longer supported | |||
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.
let's also make clear here that we're dropping pydantic 1.0 support too
Update LLM provider SDKs to latest major versions
Tested locally with
llm-analytics-toolsto verify the major updates didn't break anything.