posthog 8.2.6__tar.gz → 8.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {posthog-8.2.6/posthog.egg-info → posthog-8.2.7}/PKG-INFO +1 -1
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/openai/_streaming.py +20 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/openai/openai.py +1 -1
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/openai/openai_async.py +1 -1
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/test_stream_midstream_error.py +244 -0
- posthog-8.2.7/posthog/version.py +1 -0
- {posthog-8.2.6 → posthog-8.2.7/posthog.egg-info}/PKG-INFO +1 -1
- {posthog-8.2.6 → posthog-8.2.7}/pyproject.toml +1 -1
- posthog-8.2.6/posthog/version.py +0 -1
- {posthog-8.2.6 → posthog-8.2.7}/LICENSE +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/MANIFEST.in +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/README.md +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/__init__.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/_async_consumer.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/_async_request.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/_async_utils.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/_disabled_lane_queue.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/_logging.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/_metrics_autocapture.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/__init__.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/anthropic/__init__.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/anthropic/_anthropic_stream.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/anthropic/anthropic.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/anthropic/anthropic_async.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/anthropic/anthropic_converter.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/anthropic/anthropic_providers.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/claude_agent_sdk/__init__.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/claude_agent_sdk/client.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/claude_agent_sdk/formatting.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/claude_agent_sdk/processor.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/evaluations/__init__.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/evaluations/_async_datasets.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/evaluations/_client.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/evaluations/_dataset_serialization.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/evaluations/_dataset_types.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/evaluations/_datasets.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/evaluations/_errors.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/evaluations/_mutations.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/evaluations/_scorer_types.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/evaluations/_scorers.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/evaluations/_serialization.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/evaluations/_tags.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/evaluations/_transport.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/evaluations/_types.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/gateway.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/gemini/__init__.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/gemini/_shared.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/gemini/gemini.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/gemini/gemini_async.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/gemini/gemini_converter.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/langchain/__init__.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/langchain/callbacks.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/langchain/middleware.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/media.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/openai/__init__.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/openai/_embeddings.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/openai/openai_converter.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/openai/openai_providers.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/openai/wrapper_utils.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/openai_agents/__init__.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/openai_agents/processor.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/otel/__init__.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/otel/_privacy.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/otel/_request_context.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/otel/exporter.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/otel/processor.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/otel/spans.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/prompts.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/sanitization.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/stream.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/types.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/ai/utils.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/args.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/async_client.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/bucketed_rate_limiter.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/capture_compression.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/capture_event.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/capture_send.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/client.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/consumer.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/contexts.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/emails.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/exception_capture.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/exception_utils.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/feature_flag_evaluations.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/feature_flags.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/flag_definition_cache.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/integrations/__init__.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/integrations/_tracing_headers.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/integrations/asgi.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/integrations/celery.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/integrations/django.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/integrations/drf.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/integrations/flask.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/integrations/otel.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/__init__.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/_argument_ownership.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/_capture.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/_compatibility.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/_context_parameters.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/_conversation_id.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/_event_types.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/_exceptions.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/_ids.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/_instrument_fastmcp.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/_instrument_lowlevel.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/_instrument_v2.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/_instrumentation.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/_intent.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/_internal.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/_model_parameters.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/_output_instructions.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/_posthog_events.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/_raised_tool_error.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/_sanitization.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/_server_build.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/_sink.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/_tool_input.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/_transport_identity.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/_truncation.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/asgi.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/constants.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/feedback.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/logger.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/posthog_mcp.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/request_headers.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/session.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/session_token.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/tools.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/types.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/mcp/version.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/metrics_capture.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/poller.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/py.typed +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/release_id.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/request.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/__init__.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/__init__.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/claude_agent_sdk/__init__.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/claude_agent_sdk/test_client.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/claude_agent_sdk/test_processor.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/claude_agent_sdk/test_processor_content.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/openai_agents/__init__.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/openai_agents/test_processor.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/otel/__init__.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/otel/conftest.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/otel/test_exporter.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/otel/test_processor.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/otel/test_spans.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/test_async_cancellation.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/test_async_stream_wrapper.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/test_capture_contract.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/test_capture_pipeline.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/test_evaluations.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/test_evaluations_datasets.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/test_evaluations_mutations.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/test_evaluations_scorers.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/test_evaluations_transport.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/test_gateway.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/test_http_status.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/test_media.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/test_privacy_mode.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/test_prompts.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/test_sanitization.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/test_system_prompts.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/test_token_reporting.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/test_tokens_source.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/test_utils.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/ai/utils.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/capture_helpers.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/conftest.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/logging_helpers.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/__init__.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/_helpers.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/_helpers_lowlevel.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/_helpers_v2.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/conftest.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_asgi.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_capture.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_conversation_session.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_defaults.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_error_properties.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_error_status.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_fastmcp.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_fastmcp_tool_errors.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_fastmcp_v2.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_fastmcp_v4.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_features_m4.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_feedback.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_initialize_handshake.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_instrument_lowlevel_ownership.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_instrument_v2.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_instrumentation_fork.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_lib_label.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_lowlevel.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_model_parameters.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_no_crash.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_output_instructions.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_pending_tasks.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_pipeline.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_posthog_mcp.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_request_headers.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_resources.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_review_fixes.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_send_tools_list_event.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_session_token.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_tool_input.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_transport_identity.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_truncation.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_types.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_units.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_unknown_tool.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_v2_lowlevel.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_v2_mcpserver.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_v2_wire_dual_era.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/mcp/test_virtual_tools.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/released_flags_scenarios.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_ai_capture_lane.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_async_client.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_async_consumer.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_async_feature_flags.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_async_request.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_async_utils.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_before_send.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_bucketed_rate_limiter.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_capture_compression.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_capture_event.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_capture_invariants.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_capture_send.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_client.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_client_crap_flags.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_client_fork.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_code_variables.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_consumer.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_contexts.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_emails.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_evaluate_flags.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_event_options.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_exception_capture.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_exception_utils.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_experiment_exposure.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_failed_flag_records.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_feature_flag.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_feature_flag_called_minimization.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_feature_flag_has_experiment.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_feature_flag_result.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_feature_flags.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_feature_flags_regex.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_flag_cache_eviction_reads.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_flag_cache_publication.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_flag_definition_cache.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_flag_payload_parsing.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_flags_released_behaviour.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_flags_v4_response.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_gevent_compat.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_metrics.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_metrics_autocapture.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_module.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_posthog_upgrade_workflow.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_property_matching_version.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_redis_flag_cache_snapshot.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_reference_markdown.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_release_id.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_request.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_server_payload_snapshots.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_size_limited_dict.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_types.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_utils.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/test_utils_acceptance.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/tracing/__init__.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/tracing/conftest.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/tracing/helpers.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/tracing/test_client_traces.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/tracing/test_config.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/tracing/test_export.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/tracing/test_ids.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/tracing/test_limits.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/tracing/test_otlp.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/tracing/test_pipeline.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/tracing/test_sanitize.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/tracing/test_span.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/tracing/test_traceparent.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/test/tracing/test_transport.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/tracing/__init__.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/tracing/_before_span_send.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/tracing/_config.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/tracing/_context.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/tracing/_drops.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/tracing/_export.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/tracing/_ids.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/tracing/_limits.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/tracing/_otlp.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/tracing/_pipeline.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/tracing/_sanitize.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/tracing/_span.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/tracing/_traceparent.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/tracing/_transport.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/tracing/span.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/types.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog/utils.py +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog.egg-info/SOURCES.txt +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog.egg-info/dependency_links.txt +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog.egg-info/requires.txt +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/posthog.egg-info/top_level.txt +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/setup.cfg +0 -0
- {posthog-8.2.6 → posthog-8.2.7}/setup.py +0 -0
|
@@ -14,6 +14,14 @@ from .openai_converter import (
|
|
|
14
14
|
)
|
|
15
15
|
|
|
16
16
|
|
|
17
|
+
class _ResponsesStreamError(RuntimeError):
|
|
18
|
+
"""Retain the provider code for the shared privacy-safe error formatter."""
|
|
19
|
+
|
|
20
|
+
def __init__(self, message: str, *, code: Optional[str] = None) -> None:
|
|
21
|
+
super().__init__(message)
|
|
22
|
+
self.code = code
|
|
23
|
+
|
|
24
|
+
|
|
17
25
|
@dataclass
|
|
18
26
|
class _ResponsesStreamState:
|
|
19
27
|
"""Accumulates state specific to a Responses API stream."""
|
|
@@ -23,11 +31,23 @@ class _ResponsesStreamState:
|
|
|
23
31
|
model: Optional[str] = None
|
|
24
32
|
stop_reason: Optional[str] = None
|
|
25
33
|
service_tier: Optional[str] = None
|
|
34
|
+
failure: Optional[_ResponsesStreamError] = None
|
|
26
35
|
|
|
27
36
|
def process_chunk(self, chunk: Any) -> None:
|
|
28
37
|
response = getattr(chunk, "response", None)
|
|
29
38
|
self._record_response_metadata(response)
|
|
30
39
|
|
|
40
|
+
if getattr(chunk, "type", None) == "response.failed":
|
|
41
|
+
error = getattr(response, "error", None)
|
|
42
|
+
message = getattr(error, "message", None)
|
|
43
|
+
code = getattr(error, "code", None)
|
|
44
|
+
self.failure = _ResponsesStreamError(
|
|
45
|
+
message.strip()
|
|
46
|
+
if isinstance(message, str) and message.strip()
|
|
47
|
+
else "OpenAI response failed",
|
|
48
|
+
code=code if isinstance(code, str) else None,
|
|
49
|
+
)
|
|
50
|
+
|
|
31
51
|
chunk_usage = extract_openai_usage_from_chunk(chunk, "responses")
|
|
32
52
|
if chunk_usage:
|
|
33
53
|
merge_usage_stats(self.usage_stats, chunk_usage)
|
|
@@ -257,7 +257,7 @@ class WrappedResponses(_OpenAIWrapperResource):
|
|
|
257
257
|
model_from_response=state.model,
|
|
258
258
|
stop_reason=state.stop_reason,
|
|
259
259
|
service_tier=state.service_tier,
|
|
260
|
-
error=error,
|
|
260
|
+
error=error if error is not None else state.failure,
|
|
261
261
|
options=options,
|
|
262
262
|
)
|
|
263
263
|
capture_streaming_event(self._client._ph_client, event_data)
|
|
@@ -258,7 +258,7 @@ class WrappedResponses(_OpenAIWrapperResource):
|
|
|
258
258
|
model_from_response=state.model,
|
|
259
259
|
stop_reason=state.stop_reason,
|
|
260
260
|
service_tier=state.service_tier,
|
|
261
|
-
error=error,
|
|
261
|
+
error=error if error is not None else state.failure,
|
|
262
262
|
options=options,
|
|
263
263
|
)
|
|
264
264
|
capture_streaming_event(self._client._ph_client, event_data)
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"""A stream that raises mid-flight must be captured as an error, not as a 200."""
|
|
2
2
|
|
|
3
|
+
import json
|
|
4
|
+
from types import SimpleNamespace
|
|
3
5
|
from unittest.mock import AsyncMock, MagicMock, patch
|
|
4
6
|
|
|
7
|
+
import httpx
|
|
5
8
|
import pytest
|
|
6
9
|
|
|
7
10
|
from posthog.ai.types import StreamingEventData
|
|
@@ -153,6 +156,247 @@ def test_openai_responses_stream_error(mock_client):
|
|
|
153
156
|
assert props["$ai_error"] == "connection reset"
|
|
154
157
|
|
|
155
158
|
|
|
159
|
+
@pytest.fixture(
|
|
160
|
+
params=[
|
|
161
|
+
pytest.param(
|
|
162
|
+
(
|
|
163
|
+
{"code": "server_error", "message": "provider failed for this input"},
|
|
164
|
+
"provider failed for this input",
|
|
165
|
+
"_ResponsesStreamError server_error",
|
|
166
|
+
),
|
|
167
|
+
id="server-error",
|
|
168
|
+
),
|
|
169
|
+
pytest.param(
|
|
170
|
+
(
|
|
171
|
+
{
|
|
172
|
+
"code": "rate_limit_exceeded",
|
|
173
|
+
"message": "provider failed for this input",
|
|
174
|
+
},
|
|
175
|
+
"provider failed for this input",
|
|
176
|
+
"_ResponsesStreamError rate_limit_exceeded",
|
|
177
|
+
),
|
|
178
|
+
id="rate-limit",
|
|
179
|
+
),
|
|
180
|
+
pytest.param(
|
|
181
|
+
(None, "OpenAI response failed", "_ResponsesStreamError"),
|
|
182
|
+
id="missing-error",
|
|
183
|
+
),
|
|
184
|
+
pytest.param(
|
|
185
|
+
(
|
|
186
|
+
{"code": "server_error", "message": ""},
|
|
187
|
+
"OpenAI response failed",
|
|
188
|
+
"_ResponsesStreamError server_error",
|
|
189
|
+
),
|
|
190
|
+
id="empty-message",
|
|
191
|
+
),
|
|
192
|
+
pytest.param(
|
|
193
|
+
(
|
|
194
|
+
{"code": "server_error", "message": " \t\n "},
|
|
195
|
+
"OpenAI response failed",
|
|
196
|
+
"_ResponsesStreamError server_error",
|
|
197
|
+
),
|
|
198
|
+
id="whitespace-message",
|
|
199
|
+
),
|
|
200
|
+
pytest.param(
|
|
201
|
+
(
|
|
202
|
+
{
|
|
203
|
+
"code": "invalid code containing SECRET_INPUT",
|
|
204
|
+
"message": "provider failed for this input",
|
|
205
|
+
},
|
|
206
|
+
"provider failed for this input",
|
|
207
|
+
"_ResponsesStreamError",
|
|
208
|
+
),
|
|
209
|
+
id="unsafe-code",
|
|
210
|
+
),
|
|
211
|
+
]
|
|
212
|
+
)
|
|
213
|
+
def failed_response_error(request):
|
|
214
|
+
return request.param
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
@pytest.fixture
|
|
218
|
+
def failed_response_transport(failed_response_error):
|
|
219
|
+
error, _, _ = failed_response_error
|
|
220
|
+
event = {
|
|
221
|
+
"type": "response.failed",
|
|
222
|
+
"sequence_number": 1,
|
|
223
|
+
"response": {
|
|
224
|
+
"id": "resp_failed",
|
|
225
|
+
"status": "failed",
|
|
226
|
+
"model": "gpt-4",
|
|
227
|
+
"output": [],
|
|
228
|
+
"error": error,
|
|
229
|
+
},
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
def respond(request):
|
|
233
|
+
return httpx.Response(
|
|
234
|
+
200,
|
|
235
|
+
headers={"content-type": "text/event-stream"},
|
|
236
|
+
text=f"data: {json.dumps(event)}\n\ndata: [DONE]\n\n",
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
return httpx.MockTransport(respond)
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
@pytest.mark.parametrize("privacy_mode", [False, True])
|
|
243
|
+
def test_openai_responses_failed_event(
|
|
244
|
+
mock_client, failed_response_transport, failed_response_error, privacy_mode
|
|
245
|
+
):
|
|
246
|
+
from posthog.ai.openai import OpenAI
|
|
247
|
+
|
|
248
|
+
with OpenAI(
|
|
249
|
+
api_key="test",
|
|
250
|
+
posthog_client=mock_client,
|
|
251
|
+
http_client=httpx.Client(transport=failed_response_transport),
|
|
252
|
+
) as client:
|
|
253
|
+
events = list(
|
|
254
|
+
client.responses.create(
|
|
255
|
+
model="gpt-4",
|
|
256
|
+
input="hi",
|
|
257
|
+
stream=True,
|
|
258
|
+
posthog_distinct_id="user",
|
|
259
|
+
posthog_options={"process_person_profile": True},
|
|
260
|
+
posthog_privacy_mode=privacy_mode,
|
|
261
|
+
)
|
|
262
|
+
)
|
|
263
|
+
|
|
264
|
+
assert [event.type for event in events] == ["response.failed"]
|
|
265
|
+
error, message, privacy_summary = failed_response_error
|
|
266
|
+
if error is None:
|
|
267
|
+
assert events[0].response.error is None
|
|
268
|
+
else:
|
|
269
|
+
assert events[0].response.error.code == error["code"]
|
|
270
|
+
assert events[0].response.error.message == error["message"]
|
|
271
|
+
props = _props(mock_client)
|
|
272
|
+
assert props["$ai_is_error"] is True
|
|
273
|
+
assert props["$ai_http_status"] == 0
|
|
274
|
+
assert props["$ai_stop_reason"] == "failed"
|
|
275
|
+
assert props["$ai_error"] == (privacy_summary if privacy_mode else message)
|
|
276
|
+
assert mock_client.capture_ai.call_args.kwargs["options"]["process_person_profile"]
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
@pytest.mark.asyncio
|
|
280
|
+
@pytest.mark.parametrize("privacy_mode", [False, True])
|
|
281
|
+
async def test_openai_responses_failed_event_async(
|
|
282
|
+
mock_client, failed_response_transport, failed_response_error, privacy_mode
|
|
283
|
+
):
|
|
284
|
+
from posthog.ai.openai import AsyncOpenAI
|
|
285
|
+
|
|
286
|
+
async with AsyncOpenAI(
|
|
287
|
+
api_key="test",
|
|
288
|
+
posthog_client=mock_client,
|
|
289
|
+
http_client=httpx.AsyncClient(transport=failed_response_transport),
|
|
290
|
+
) as client:
|
|
291
|
+
stream = await client.responses.create(
|
|
292
|
+
model="gpt-4",
|
|
293
|
+
input="hi",
|
|
294
|
+
stream=True,
|
|
295
|
+
posthog_distinct_id="user",
|
|
296
|
+
posthog_options={"process_person_profile": True},
|
|
297
|
+
posthog_privacy_mode=privacy_mode,
|
|
298
|
+
)
|
|
299
|
+
events = [event async for event in stream]
|
|
300
|
+
|
|
301
|
+
assert [event.type for event in events] == ["response.failed"]
|
|
302
|
+
error, message, privacy_summary = failed_response_error
|
|
303
|
+
if error is None:
|
|
304
|
+
assert events[0].response.error is None
|
|
305
|
+
else:
|
|
306
|
+
assert events[0].response.error.code == error["code"]
|
|
307
|
+
assert events[0].response.error.message == error["message"]
|
|
308
|
+
props = _props(mock_client)
|
|
309
|
+
assert props["$ai_is_error"] is True
|
|
310
|
+
assert props["$ai_http_status"] == 0
|
|
311
|
+
assert props["$ai_error"] == (privacy_summary if privacy_mode else message)
|
|
312
|
+
assert props["$ai_stop_reason"] == "failed"
|
|
313
|
+
assert mock_client.capture_ai.call_args.kwargs["options"]["process_person_profile"]
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
@pytest.fixture
|
|
317
|
+
def failed_response_chunk():
|
|
318
|
+
return SimpleNamespace(
|
|
319
|
+
type="response.failed",
|
|
320
|
+
response=SimpleNamespace(
|
|
321
|
+
status="failed",
|
|
322
|
+
model="gpt-4",
|
|
323
|
+
output=[],
|
|
324
|
+
usage=None,
|
|
325
|
+
error=SimpleNamespace(code="server_error", message="event failure"),
|
|
326
|
+
),
|
|
327
|
+
)
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
@pytest.mark.parametrize("privacy_mode", [False, True])
|
|
331
|
+
def test_openai_responses_stream_exception_precedence(
|
|
332
|
+
mock_client, failed_response_chunk, privacy_mode
|
|
333
|
+
):
|
|
334
|
+
from posthog.ai.openai import OpenAI
|
|
335
|
+
|
|
336
|
+
failure = _StatusError("stream reset")
|
|
337
|
+
|
|
338
|
+
def stream():
|
|
339
|
+
yield failed_response_chunk
|
|
340
|
+
raise failure
|
|
341
|
+
|
|
342
|
+
with patch("openai.resources.responses.Responses.create", return_value=stream()):
|
|
343
|
+
with OpenAI(api_key="test", posthog_client=mock_client) as client:
|
|
344
|
+
events = client.responses.create(
|
|
345
|
+
model="gpt-4",
|
|
346
|
+
input="hi",
|
|
347
|
+
stream=True,
|
|
348
|
+
posthog_privacy_mode=privacy_mode,
|
|
349
|
+
)
|
|
350
|
+
assert next(events) is failed_response_chunk
|
|
351
|
+
with pytest.raises(_StatusError, match="stream reset") as raised:
|
|
352
|
+
next(events)
|
|
353
|
+
|
|
354
|
+
assert raised.value is failure
|
|
355
|
+
props = _props(mock_client)
|
|
356
|
+
assert props["$ai_is_error"] is True
|
|
357
|
+
assert props["$ai_http_status"] == 529
|
|
358
|
+
assert props["$ai_error"] == (
|
|
359
|
+
"_StatusError: 529" if privacy_mode else "stream reset"
|
|
360
|
+
)
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
@pytest.mark.asyncio
|
|
364
|
+
@pytest.mark.parametrize("privacy_mode", [False, True])
|
|
365
|
+
async def test_openai_responses_stream_exception_precedence_async(
|
|
366
|
+
mock_client, failed_response_chunk, privacy_mode
|
|
367
|
+
):
|
|
368
|
+
from posthog.ai.openai import AsyncOpenAI
|
|
369
|
+
|
|
370
|
+
failure = _StatusError("stream reset")
|
|
371
|
+
|
|
372
|
+
async def stream():
|
|
373
|
+
yield failed_response_chunk
|
|
374
|
+
raise failure
|
|
375
|
+
|
|
376
|
+
async def create(self, **kwargs):
|
|
377
|
+
return stream()
|
|
378
|
+
|
|
379
|
+
with patch("openai.resources.responses.AsyncResponses.create", new=create):
|
|
380
|
+
async with AsyncOpenAI(api_key="test", posthog_client=mock_client) as client:
|
|
381
|
+
events = await client.responses.create(
|
|
382
|
+
model="gpt-4",
|
|
383
|
+
input="hi",
|
|
384
|
+
stream=True,
|
|
385
|
+
posthog_privacy_mode=privacy_mode,
|
|
386
|
+
)
|
|
387
|
+
assert await events.__anext__() is failed_response_chunk
|
|
388
|
+
with pytest.raises(_StatusError, match="stream reset") as raised:
|
|
389
|
+
await events.__anext__()
|
|
390
|
+
|
|
391
|
+
assert raised.value is failure
|
|
392
|
+
props = _props(mock_client)
|
|
393
|
+
assert props["$ai_is_error"] is True
|
|
394
|
+
assert props["$ai_http_status"] == 529
|
|
395
|
+
assert props["$ai_error"] == (
|
|
396
|
+
"_StatusError: 529" if privacy_mode else "stream reset"
|
|
397
|
+
)
|
|
398
|
+
|
|
399
|
+
|
|
156
400
|
def test_anthropic_stream_error(mock_client):
|
|
157
401
|
from posthog.ai.anthropic import Anthropic
|
|
158
402
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
VERSION = "8.2.7"
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "posthog"
|
|
7
|
-
version = "8.2.
|
|
7
|
+
version = "8.2.7"
|
|
8
8
|
description = "Integrate PostHog into any python application."
|
|
9
9
|
authors = [{ name = "PostHog", email = "engineering@posthog.com" }]
|
|
10
10
|
maintainers = [{ name = "PostHog", email = "engineering@posthog.com" }]
|
posthog-8.2.6/posthog/version.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
VERSION = "8.2.6"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|