Skip to content

Conversation

@carlos-marchal-ph
Copy link
Contributor

Update LLM provider SDKs to latest major versions

  • openai: 1.102.0 → 2.7.1
  • anthropic: 0.64.0 → 0.72.0
  • google-genai: 1.32.0 → 1.49.0
  • langchain-core: 0.3.75 → 1.0.3
  • langchain-openai: 0.3.32 → 1.0.2
  • langchain-anthropic: 0.3.19 → 1.0.1
  • langchain-community: 0.3.29 → 0.4.1
  • langgraph: 0.6.6 → 1.0.2

Tested locally with llm-analytics-tools to verify the major updates didn't break anything.

@carlos-marchal-ph carlos-marchal-ph requested a review from a team November 6, 2025 14:45
@carlos-marchal-ph carlos-marchal-ph self-assigned this Nov 6, 2025
@carlos-marchal-ph carlos-marchal-ph changed the title chore: update LLM SDKs chore(llma): update SDKs Nov 6, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a 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

Edit Code Review Agent Settings | Greptile

@@ -1,8 +1,8 @@
try:
import langchain # noqa: F401
import langchain_core # noqa: F401
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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

Copy link
Contributor

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?

Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

@andrewm4894 andrewm4894 left a 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.

Copy link
Member

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

@carlos-marchal-ph
Copy link
Contributor Author

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",
Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

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
Copy link
Member

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

@carlos-marchal-ph carlos-marchal-ph enabled auto-merge (squash) November 11, 2025 18:10
@carlos-marchal-ph carlos-marchal-ph merged commit 4820336 into master Nov 11, 2025
10 checks passed
@carlos-marchal-ph carlos-marchal-ph deleted the chore(llma)/update-sdks branch November 11, 2025 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants