: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
fix(aio): retry dns failures at custom system one endpoints (#118685)
Bernat Torresed3bbffaa0bf
diff --git a/docs/internal/ai-observability-judge-inputs.md b/docs/internal/ai-observability-judge-inputs.mdindex ac85fb24d9e6..ad7bf86edbf4 100644--- a/docs/internal/ai-observability-judge-inputs.md+++ b/docs/internal/ai-observability-judge-inputs.md@@ -164,6 +164,7 @@ Evaluation events retain model, usage, latency, and error telemetry.If retries fail, the run fails and the evaluation stays enabled.Blocked System One endpoints and redirects disable the evaluation and mark the connection for revalidation, without recording model usage.DNS failures and redirects at OpenRouter's fixed decision endpoint retry without disabling the evaluation or marking its key as failing. Redirects are never followed.+DNS failures at custom System One endpoints also retry without disabling the evaluation or its key.Requests rejected because of an individual input skip that run without changing the shared connection.Invalid probabilities, missing answers, and mismatched answer types skip the item as an unparsable response.Inputs rejected for exceeding the model's context window are skipped.diff --git a/products/ai_observability/backend/llm/decisions.py b/products/ai_observability/backend/llm/decisions.pyindex 7f2a720655e9..53bad19d8f6a 100644--- a/products/ai_observability/backend/llm/decisions.py+++ b/products/ai_observability/backend/llm/decisions.py@@ -132,7 +132,7 @@ class DecisionClient:try:verdict = validate_url_and_pin_ips(base_url)if not verdict.allowed:- if path == "decisions" and verdict.reason == UNRESOLVED_HOST_REASON:+ if verdict.reason == UNRESOLVED_HOST_REASON:raise ProviderHostUnresolvedError()raise SSRFBlockedError(verdict.reason)headers = dict(OPENROUTER_HEADERS) if path == "decisions" else {}diff --git a/products/ai_observability/backend/llm/test/test_decisions.py b/products/ai_observability/backend/llm/test/test_decisions.pyindex 31f13feab313..42fa464b7437 100644--- a/products/ai_observability/backend/llm/test/test_decisions.py+++ b/products/ai_observability/backend/llm/test/test_decisions.py@@ -346,8 +346,9 @@ def test_decision_requests_preserve_error_categories("path,address,error_type",[("decisions", None, ProviderHostUnresolvedError),- ("systemone", None, DecisionEndpointBlockedError),+ ("systemone", None, ProviderHostUnresolvedError),("decisions", "127.0.0.1", DecisionEndpointBlockedError),+ ("systemone", "127.0.0.1", DecisionEndpointBlockedError),],)def test_endpoint_resolution_errors(