Skip to content

: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.

fix(signals): update product config (#61366)

Joshua Snyderb7f72be4881e
diff --git a/services/llm-gateway/src/llm_gateway/products/config.py b/services/llm-gateway/src/llm_gateway/products/config.py
index 1f41bae76a62..5e510e19b32b 100644
--- a/services/llm-gateway/src/llm_gateway/products/config.py
+++ b/services/llm-gateway/src/llm_gateway/products/config.py
@@ -140,10 +140,10 @@ PRODUCTS: Final[dict[str, ProductConfig]] = {
allow_api_keys=True,
),
"signals": ProductConfig(
- allowed_application_ids=None,
+ allowed_application_ids=frozenset({POSTHOG_CODE_US_APP_ID, POSTHOG_CODE_EU_APP_ID}),
allowed_models=None, # any model — the signals pipeline picks models per stage (haiku, sonnet, ...)
allow_api_keys=True,
- billable=True,
+ billable=False,
),
"subscriptions": ProductConfig(
allowed_application_ids=None,
diff --git a/services/llm-gateway/tests/test_product_config.py b/services/llm-gateway/tests/test_product_config.py
index 48fd23527b39..10d01718ad2f 100644
--- a/services/llm-gateway/tests/test_product_config.py
+++ b/services/llm-gateway/tests/test_product_config.py
@@ -58,11 +58,14 @@ class TestCheckProductAccess:
("llma_translation", "personal_api_key", None, "gpt-4.1-mini", True, None),
("llma_translation", "personal_api_key", None, "claude-3-opus", False, "not allowed"),
("llma_translation", "oauth_access_token", "any-app-id", "gpt-4.1-mini", False, "not authorized"),
- # signals allows API keys (shared gateway key) with any model; OAuth rejected (no app IDs configured)
+ # signals allows API keys (shared gateway key) with any model, and OAuth from the
+ # array/twig (posthog_code) app for coding-agent tasks
("signals", "personal_api_key", None, "claude-haiku-4-5", True, None),
("signals", "personal_api_key", None, "claude-sonnet-4-5", True, None),
("signals", "personal_api_key", None, "claude-3-opus", True, None),
("signals", "oauth_access_token", "any-app-id", "claude-haiku-4-5", False, "not authorized"),
+ ("signals", "oauth_access_token", POSTHOG_CODE_US_APP_ID, "claude-haiku-4-5", True, None),
+ ("signals", "oauth_access_token", POSTHOG_CODE_EU_APP_ID, "claude-sonnet-4-5", True, None),
# unknown product
("unknown", "personal_api_key", None, None, False, "Unknown product"),
],