: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(signals): raise the default per-run gateway token cap to $10 (#89684)
Brandon0624616878b4
diff --git a/posthog/settings/temporal.py b/posthog/settings/temporal.pyindex 2fa88b15c779..2c829c6356dc 100644--- a/posthog/settings/temporal.py+++ b/posthog/settings/temporal.py@@ -70,9 +70,11 @@ SANDBOX_AI_GATEWAY_PRODUCTS: str | None = get_from_env("SANDBOX_AI_GATEWAY_PRODUSANDBOX_AI_GATEWAY_MINT_KEY: str | None = get_from_env("SANDBOX_AI_GATEWAY_MINT_KEY", None, optional=True)# Per-run spend cap and token lifetime for minted scoped tokens. The cap bounds one# runaway run; the daily bound per team is cap x the scheduler's runs-per-day limit.+# The cap must fit a run's real spend plus its in-flight admission holds: a cap near+# typical spend ends runs after the work is written and before it is committed.# TTL 0 (the default) derives TASKS_MAX_RUN_DURATION_SECONDS + 1h so a capped run# never outlives its token; a positive value overrides.-SANDBOX_AI_GATEWAY_TOKEN_CAP_USD: str = get_from_env("SANDBOX_AI_GATEWAY_TOKEN_CAP_USD", "5")+SANDBOX_AI_GATEWAY_TOKEN_CAP_USD: str = get_from_env("SANDBOX_AI_GATEWAY_TOKEN_CAP_USD", "10")# Per-team per-run cap overrides as a JSON object of team id to dollars, e.g. {"2": "10"}.SANDBOX_AI_GATEWAY_TOKEN_CAP_USD_OVERRIDES: str = get_from_env("SANDBOX_AI_GATEWAY_TOKEN_CAP_USD_OVERRIDES", "")SANDBOX_AI_GATEWAY_TOKEN_TTL_SECONDS: int = get_from_env("SANDBOX_AI_GATEWAY_TOKEN_TTL_SECONDS", 0, type_cast=int)