Skip to content

Releases: PostHog/posthog-python

7.0.1

15 Nov 12:44
f75c5ef

Choose a tag to compare

  • Try to use repr() when formatting code variables

7.0.0

11 Nov 18:13
4820336

Choose a tag to compare

  • (BREAKING) Python 3.9 is no longer supported

  • chore(llma): 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

6.9.3

11 Nov 17:57
898654a

Choose a tag to compare

v6.9.3

feat(ph-ai): PostHog properties dict in GenerationMetadata (#366)

6.9.2

11 Nov 08:57
6c815df

Choose a tag to compare

v6.9.2

fix(llma): Langchain cache token double subtraction for non-Anthropic…

6.9.1

07 Nov 15:57
88f6069

Choose a tag to compare

fix: code variables without client (#368)

* fix: pass variables from init to client

* chore: version+changelog

6.9.0

06 Nov 15:12
e309bd7

Choose a tag to compare

feat: add code variables capture (#365)

* feat: add code variables capture

* feat: bump version and add changelog

6.8.0

04 Nov 19:43
3d8825f

Choose a tag to compare

feat(llma): send number of web searches (#359)

* feat(llma): send number of web searches

* feat(llma): add more tests

* chore(llma): bump version

* fix(llma): feedback

* fix(llma): fix Gemini

* fix(llma): fix OpenAI's Chat Completions streaming

6.7.14

03 Nov 12:29
98e3226

Choose a tag to compare

v6.7.14

fix(django): handle request.user in async middleware context (#358)

6.7.13

02 Nov 18:58
69293f5

Choose a tag to compare

fix(llma): cache cost calculation in the LangChain callback (#346)

* fix(llma): cache cost calculation in the LangChain callback

* fix: format

* Update posthog/ai/langchain/callbacks.py

Co-authored-by: Radu Raicea <[email protected]>

* Bump version to 6.7.13

Master has already released 6.7.12 with other fixes, so this PR will be 6.7.13

---------

Co-authored-by: Radu Raicea <[email protected]>
Co-authored-by: Andrew Maguire <[email protected]>

6.7.12

02 Nov 17:10
57546d2

Choose a tag to compare

fix(llma): LangChain 1.0+ compatibility for CallbackHandler (#363)

* fix: Add LangChain 1.0+ compatibility for CallbackHandler imports

- Use try/except to import from langchain_core first (LangChain 1.0+)
- Fall back to legacy langchain imports for older versions
- Maintains backward compatibility with LangChain 0.x
- All existing tests pass (45 passed)

Fixes #362

* test: Add regression test for AgentAction/AgentFinish imports

- Tests that AgentAction and AgentFinish can be imported
- Tests on_agent_action and on_agent_finish callbacks with mock data
- Ensures compatibility with both LangChain 0.x and 1.0+
- Catches the import issue that was previously only tested with API keys

This addresses a test coverage gap identified during code review.

* chore: Add CHANGELOG entry for LangChain 1.0+ compatibility fix

* fix: Remove unused type: ignore comments for mypy

The type: ignore comments were only needed when the except block
executes, but CI runs with LangChain 1.0+ so the try block succeeds.
Mypy flags these as unused-ignore errors.

* chore: bump version to 6.7.12 for langchain 1.0 compatibility