:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(aio): enable multimodal capture on max's llm calls (#73950)
Carlos Marchal677e6cabf212
diff --git a/posthog/apps.py b/posthog/apps.pyindex ca22326a136f..846b93c851eb 100644--- a/posthog/apps.py+++ b/posthog/apps.py@@ -73,6 +73,7 @@ class PostHogConfig(AppConfig):"environment": os.getenv("OTEL_SERVICE_ENVIRONMENT"),}posthoganalytics._use_ai_lane = True # ty: ignore[invalid-assignment]+ posthoganalytics._enable_multimodal_capture = True # ty: ignore[invalid-assignment]# Config for the SDK's `client.metrics` API. The pinned SDK version predates# the metrics API and ignores this attr; once posthoganalytics is bumped todiff --git a/posthog/ph_client.py b/posthog/ph_client.pyindex 97f3161cc1ab..3324a5253c70 100644--- a/posthog/ph_client.py+++ b/posthog/ph_client.py@@ -103,5 +103,6 @@ def get_client(region: str = "US", **kwargs: Any):host=host,super_properties={"region": region},_use_ai_lane=True,+ _enable_multimodal_capture=True,**kwargs,)diff --git a/posthog/test/test_ph_client.py b/posthog/test/test_ph_client.pyindex 9a8f6d642c17..c947deeb5c2d 100644--- a/posthog/test/test_ph_client.py+++ b/posthog/test/test_ph_client.py@@ -10,8 +10,11 @@ class TestAILaneOptIn(SimpleTestCase):for region in ("US", "EU"):client = get_client(region, send=False, enable_local_evaluation=False)self.assertTrue(client._use_ai_lane)+ self.assertTrue(client._enable_multimodal_capture)def test_module_attribute_opts_default_client_into_ai_lane(self):self.assertTrue(posthoganalytics._use_ai_lane)+ self.assertTrue(posthoganalytics._enable_multimodal_capture)client = posthoganalytics.setup()self.assertTrue(client._use_ai_lane)+ self.assertTrue(client._enable_multimodal_capture)diff --git a/pyproject.toml b/pyproject.tomlindex 9202649d19e0..37f58499e9aa 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -100,7 +100,7 @@ dependencies = ["paramiko~=3.5.0","pillow==12.2.0","protobuf~=5.29.6",- "posthoganalytics==7.29.0",+ "posthoganalytics==7.30.1","polars==1.37.1","psycopg2-binary==2.9.10","psycopg[binary]==3.2.4",diff --git a/uv.lock b/uv.lockindex 986fa0469047..27346af5e9bc 100644--- a/uv.lock+++ b/uv.lock@@ -4645,7 +4645,7 @@ name = "nvidia-cudnn-cu12"version = "9.10.2.21"source = { registry = "https://pypi.org/simple" }dependencies = [- { name = "nvidia-cublas-cu12", marker = "platform_machine != 's390x' and sys_platform != 'emscripten'" },+ { name = "nvidia-cublas-cu12" },]wheels = [{ url = "https://files.pythonhosted.org/packages/ba/51/e123d997aa098c61d029f76663dedbfb9bc8dcf8c60cbd6adbe42f76d049/nvidia_cudnn_cu12-9.10.2.21-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:949452be657fa16687d0930933f032835951ef0892b37d2d53824d1a84dc97a8", size = 706758467, upload-time = "2025-06-06T21:54:08.597Z" },@@ -4656,7 +4656,7 @@ name = "nvidia-cufft-cu12"version = "11.3.3.83"source = { registry = "https://pypi.org/simple" }dependencies = [- { name = "nvidia-nvjitlink-cu12", marker = "platform_machine != 's390x' and sys_platform != 'emscripten'" },+ { name = "nvidia-nvjitlink-cu12" },]wheels = [{ url = "https://files.pythonhosted.org/packages/1f/13/ee4e00f30e676b66ae65b4f08cb5bcbb8392c03f54f2d5413ea99a5d1c80/nvidia_cufft_cu12-11.3.3.83-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:4d2dd21ec0b88cf61b62e6b43564355e5222e4a3fb394cac0db101f2dd0d4f74", size = 193118695, upload-time = "2025-03-07T01:45:27.821Z" },@@ -4683,9 +4683,9 @@ name = "nvidia-cusolver-cu12"version = "11.7.3.90"source = { registry = "https://pypi.org/simple" }dependencies = [- { name = "nvidia-cublas-cu12", marker = "platform_machine != 's390x' and sys_platform != 'emscripten'" },- { name = "nvidia-cusparse-cu12", marker = "platform_machine != 's390x' and sys_platform != 'emscripten'" },- { name = "nvidia-nvjitlink-cu12", marker = "platform_machine != 's390x' and sys_platform != 'emscripten'" },+ { name = "nvidia-cublas-cu12" },+ { name = "nvidia-cusparse-cu12" },+ { name = "nvidia-nvjitlink-cu12" },]wheels = [{ url = "https://files.pythonhosted.org/packages/85/48/9a13d2975803e8cf2777d5ed57b87a0b6ca2cc795f9a4f59796a910bfb80/nvidia_cusolver_cu12-11.7.3.90-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:4376c11ad263152bd50ea295c05370360776f8c3427b30991df774f9fb26c450", size = 267506905, upload-time = "2025-03-07T01:47:16.273Z" },@@ -4696,7 +4696,7 @@ name = "nvidia-cusparse-cu12"version = "12.5.8.93"source = { registry = "https://pypi.org/simple" }dependencies = [- { name = "nvidia-nvjitlink-cu12", marker = "platform_machine != 's390x' and sys_platform != 'emscripten'" },+ { name = "nvidia-nvjitlink-cu12" },]wheels = [{ url = "https://files.pythonhosted.org/packages/c2/f5/e1854cb2f2bcd4280c44736c93550cc300ff4b8c95ebe370d0aa7d2b473d/nvidia_cusparse_cu12-12.5.8.93-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1ec05d76bbbd8b61b06a80e1eaf8cf4959c3d4ce8e711b65ebd0443bb0ebb13b", size = 288216466, upload-time = "2025-03-07T01:48:13.779Z" },@@ -5355,7 +5355,7 @@ name = "pexpect"version = "4.9.0"source = { registry = "https://pypi.org/simple" }dependencies = [- { name = "ptyprocess", marker = "sys_platform != 'emscripten'" },+ { name = "ptyprocess" },]sdist = { url = "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz", hash = "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f", size = 166450, upload-time = "2023-11-25T09:07:26.339Z" }wheels = [@@ -5933,7 +5933,7 @@ requires-dist = [{ name = "pixelhog", specifier = "~=1.2.0" },{ name = "playwright", specifier = "~=1.60.0" },{ name = "polars", specifier = "==1.37.1" },- { name = "posthoganalytics", specifier = "==7.29.0" },+ { name = "posthoganalytics", specifier = "==7.30.1" },{ name = "protobuf", specifier = "~=5.29.6" },{ name = "psycopg", extras = ["binary"], specifier = "==3.2.4" },{ name = "psycopg2-binary", specifier = "==2.9.10" },@@ -6094,7 +6094,7 @@ provides-extras = ["dev"][[package]]name = "posthoganalytics"-version = "7.29.0"+version = "7.30.1"source = { registry = "https://pypi.org/simple" }dependencies = [{ name = "backoff" },@@ -6102,9 +6102,9 @@ dependencies = [{ name = "requests" },{ name = "typing-extensions" },]-sdist = { url = "https://files.pythonhosted.org/packages/87/60/614e96eb7700c5e9f2deba7950fd559ca91b5a1e6b1e2d4288d987248086/posthoganalytics-7.29.0.tar.gz", hash = "sha256:2a5c697514333958b81e237004ad068b8dd6fb4bd6c1fea410186e19c818adf6", size = 360552, upload-time = "2026-07-23T15:27:33.829Z" }+sdist = { url = "https://files.pythonhosted.org/packages/ad/c5/01c59158b02c5d645bb3e351b82fc948174c05a1cd0cb21162f4d88fa28f/posthoganalytics-7.30.1.tar.gz", hash = "sha256:17ebed83ba253d5f92baba153b720642a00fdf6fee8bda95957c054c4ea98145", size = 386791, upload-time = "2026-07-27T14:19:39.927Z" }wheels = [- { url = "https://files.pythonhosted.org/packages/7b/7d/06adde30a2f05214ca233b28b5bee0970bbc750a8910cfa1e8c10fa40098/posthoganalytics-7.29.0-py3-none-any.whl", hash = "sha256:dab170775c738ad02af516ee0545e9d4857d6e06ac2ef1edf05ef55a99aeb7ab", size = 432594, upload-time = "2026-07-23T15:27:32.179Z" },+ { url = "https://files.pythonhosted.org/packages/78/f3/a424e140dde29f3737ecd09d3f97d98a1888c05cf18cb918c9191e8f36e1/posthoganalytics-7.30.1-py3-none-any.whl", hash = "sha256:5a3517d204aebfd02c9af8e010c093f2461bce88ea1299b8cdc9419e3405112b", size = 462838, upload-time = "2026-07-27T14:19:38.143Z" },][[package]]@@ -7624,7 +7624,7 @@ name = "shadowcopy"version = "0.0.4"source = { registry = "https://pypi.org/simple" }dependencies = [- { name = "wmi", marker = "sys_platform != 'emscripten'" },+ { name = "wmi" },]sdist = { url = "https://files.pythonhosted.org/packages/12/44/c00420a3b7bcdf830529b933392b566c876a4944a24f31e126eb6fd28647/shadowcopy-0.0.4.tar.gz", hash = "sha256:ed89817dda065f893607a04c0b7d6b3b34c3507a4711f441111a4bcb1b1826c0", size = 4138, upload-time = "2023-07-08T00:01:35.266Z" }wheels = [@@ -8058,7 +8058,7 @@ name = "tbb"version = "2022.3.1"source = { registry = "https://pypi.org/simple" }dependencies = [- { name = "tcmlib", marker = "platform_machine != 's390x' and sys_platform != 'emscripten'" },+ { name = "tcmlib" },]wheels = [{ url = "https://files.pythonhosted.org/packages/08/59/8d381a2cfe8d36c4f4ff9f94769ff2809bfc16014d888360b0e24c7e5c6b/tbb-2022.3.1-py2.py3-none-manylinux_2_28_x86_64.whl", hash = "sha256:534c089eca6bcf148408684c156229d5f09c01d323b685b15739f41985b529d7", size = 4178630, upload-time = "2026-01-22T05:30:20.589Z" },@@ -8440,7 +8440,7 @@ name = "triton"version = "3.4.0"source = { registry = "https://pypi.org/simple" }dependencies = [- { name = "setuptools", marker = "platform_machine != 's390x' and sys_platform != 'emscripten'" },+ { name = "setuptools" },]wheels = [{ url = "https://files.pythonhosted.org/packages/30/7b/0a685684ed5322d2af0bddefed7906674f67974aa88b0fae6e82e3b766f6/triton-3.4.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:00be2964616f4c619193cb0d1b29a99bd4b001d7dc333816073f92cf2a8ccdeb", size = 155569223, upload-time = "2025-07-30T19:58:44.017Z" },@@ -9147,7 +9147,7 @@ name = "wmi"version = "1.5.1"source = { registry = "https://pypi.org/simple" }dependencies = [- { name = "pywin32", marker = "sys_platform != 'emscripten'" },+ { name = "pywin32" },]sdist = { url = "https://files.pythonhosted.org/packages/d4/66/6364deb0a03415f96c66803d8c4379f808f2401da3bdb183348487b10510/WMI-1.5.1.tar.gz", hash = "sha256:b6a6be5711b1b6c8d55bda7a8befd75c48c12b770b9d227d31c1737dbf0d40a6", size = 26254, upload-time = "2020-04-28T08:22:58.096Z" }wheels = [