Skip to content

Releases: PostHog/posthog-python

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 <radu@raicea.com>

* 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 <radu@raicea.com>
Co-authored-by: Andrew Maguire <andrewm4894@gmail.com>

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

6.7.11

28 Oct 13:06
105090a

Choose a tag to compare

chore: bump version to 6.7.11 for AI framework feature (#354)

Update version and changelog for PR #347

6.7.10

24 Oct 13:50
6af129f

Choose a tag to compare

v6.7.10

fix(django): make middleware truly hybrid-compatible with sync and as…