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(tasks): let a personal API key start a run on a Claude plan (#106507)

Tom Owers6591a88bb704
diff --git a/products/tasks/backend/facade/client_provenance.py b/products/tasks/backend/facade/client_provenance.py
index c939fbdd8caf..cace06a6f3e7 100644
--- a/products/tasks/backend/facade/client_provenance.py
+++ b/products/tasks/backend/facade/client_provenance.py
@@ -9,6 +9,33 @@ from posthog.oauth_provenance import (
from products.tasks.backend.models import TaskClientProvenance
+def is_api_key_request(authenticator: object) -> bool:
+ """Whether ``authenticator`` — a request's ``successful_authenticator`` — is a
+ long-lived API key acting as a user.
+
+ "As a user" is the load-bearing half. Callers use this to decide things that are
+ charged or attributed to a person, so a key that resolves to a team or a project
+ rather than a user — ``TeamSecretTokenAuthentication`` hands back a synthetic
+ ``TeamSecretTokenUser``, ``ProjectSecretAPIKeyAuthentication`` is project-scoped —
+ must not qualify, however server-to-server it looks.
+
+ Takes the authenticator rather than the request itself: the facade boundary must not
+ put a DRF type on its signature (products/architecture.md § Facades: The Public
+ Interface), and the authenticator is the only part of the request this needs.
+
+ Personal API keys are the only kind that qualifies today; ``isinstance`` also covers
+ the delegated variant. A future key type (BYOK, say) belongs in the tuple below once
+ it resolves to a real user.
+
+ ``posthog.auth`` is imported inside the function, matching ``posthog.oauth_provenance``:
+ importing it at module level cycles back through the model layer.
+ """
+ from posthog.auth import PersonalAPIKeyAuthentication # noqa: PLC0415 — circular at module level
+
+ user_api_key_authenticators: tuple[type, ...] = (PersonalAPIKeyAuthentication,)
+ return isinstance(authenticator, user_api_key_authenticators)
+
+
def get_task_client_provenance(request: Request) -> TaskClientProvenance | None:
if is_interactive_desktop_grant(request):
return TaskClientProvenance.POSTHOG_DESKTOP
diff --git a/products/tasks/backend/presentation/serializers.py b/products/tasks/backend/presentation/serializers.py
index 07a25eefea90..5913c11baba2 100644
--- a/products/tasks/backend/presentation/serializers.py
+++ b/products/tasks/backend/presentation/serializers.py
@@ -28,7 +28,7 @@ from posthog.temporal.oauth import POSTHOG_CODE_OAUTH_APP_CLIENT_IDS
from products.tasks.backend.facade import api as tasks_facade
from products.tasks.backend.facade.api import CHANNEL_INSTRUCTIONS_MAX_BYTES
-from products.tasks.backend.facade.client_provenance import is_sandbox_oauth_request
+from products.tasks.backend.facade.client_provenance import is_api_key_request, is_sandbox_oauth_request
from products.tasks.backend.facade.contracts import (
ChannelDTO,
ChannelFeedMessageDTO,
@@ -110,6 +110,22 @@ def _is_desktop_app_grant(request: Request) -> bool:
return get_oauth_client_id(request) in POSTHOG_CODE_OAUTH_APP_CLIENT_IDS and is_interactive_desktop_grant(request)
+def _may_select_claude_plan(request: Request) -> bool:
+ """Whether this caller may bill a run to a Claude plan.
+
+ PostHog stores no Claude token: a subscription run asks the person who started it for
+ one over the run's stream, and fails if nobody answers. The caller therefore has to be
+ something that can answer, on behalf of someone whose plan can be billed. Desktop does
+ it interactively; an API key acting as a user is a deliberate server-to-server
+ credential whose owner can run the same relay unattended, which is what internal
+ automation uses.
+
+ Sandbox tokens are excluded by both checks — the agent's own code must never be able to
+ put a run on its owner's plan.
+ """
+ return _is_desktop_app_grant(request) or is_api_key_request(getattr(request, "successful_authenticator", None))
+
+
def _validate_subscription_caller(attrs: dict[str, Any], context: dict[str, Any]) -> None:
request = context.get("request")
if request is None:
@@ -126,12 +142,13 @@ def _validate_subscription_caller(attrs: dict[str, Any], context: dict[str, Any]
raise serializers.ValidationError(
{"claude_model_access": "Open PostHog Desktop to resume this run with your Claude plan."}
)
- if access == "own-subscription" and not _is_desktop_app_grant(request):
+ if access == "own-subscription" and not _may_select_claude_plan(request):
raise serializers.ValidationError(
{
"claude_model_access": (
- "Only PostHog Desktop can start a run on your Claude plan. "
- "Start the task from Desktop, or drop this setting to use PostHog credits."
+ "Only PostHog Desktop or an API key can start a run on your Claude plan. "
+ "Start the task from Desktop, authenticate with an API key, or select "
+ "'posthog-gateway' to use PostHog credits."
)
}
)
@@ -3418,8 +3435,9 @@ class TaskRunPreferencesFieldMixin(serializers.Serializer):
default=None,
help_text=(
"How the Claude runtime pays for model use. 'own-subscription' makes the sandbox "
- "request a Claude token from the creating PostHog Desktop at run start; the token is "
- "sent in flight and never stored on PostHog servers. Only PostHog Desktop can select "
+ "request a Claude token from whoever started the run; Desktop relays it interactively "
+ "and an API key caller relays it unattended. The token is sent in flight and never "
+ "stored on PostHog servers. Only PostHog Desktop and API keys can select "
"'own-subscription'; other callers get a 400. If omitted or null, resumed runs keep "
"their billing choice and new runs use the PostHog gateway."
),
diff --git a/products/tasks/backend/tests/test_api.py b/products/tasks/backend/tests/test_api.py
index 426279d4d2c6..613db9965c8b 100644
--- a/products/tasks/backend/tests/test_api.py
+++ b/products/tasks/backend/tests/test_api.py
@@ -4372,7 +4372,9 @@ class TestTaskAPI(BaseTaskAPITest):
mock_workflow.assert_called_once()
@patch("products.tasks.backend.temporal.client.execute_task_processing_workflow")
- def test_run_endpoint_rejects_claude_plan_from_personal_api_key(self, mock_workflow):
+ def test_run_endpoint_accepts_claude_plan_from_api_key(self, mock_workflow):
+ """Unattended automation has no Desktop to start from, but it can still relay the
+ token its own key's owner saved — so the key is allowed to make the choice."""
task = self.create_task()
api_key_value = generate_random_token_personal()
PersonalAPIKey.objects.create(
@@ -4390,6 +4392,29 @@ class TestTaskAPI(BaseTaskAPITest):
format="json",
)
+ assert response.status_code == status.HTTP_200_OK
+ task_run = TaskRun.objects.get(id=response.json()["latest_run"]["id"])
+ assert task_run.state["claude_model_access"] == "own-subscription"
+ mock_workflow.assert_called_once()
+
+ @patch("products.tasks.backend.temporal.client.execute_task_processing_workflow")
+ def test_run_endpoint_still_rejects_claude_plan_from_a_session(self, mock_workflow):
+ """The relaxation is for Desktop and API keys only. A browser session has nothing
+ that can answer the run's credential request.
+
+ A fresh client with `force_login`, not `self.client`: the shared one is wired up
+ with `force_authenticate`, which leaves no `successful_authenticator` at all, so it
+ would pass this test without ever exercising SessionAuthentication."""
+ task = self.create_task()
+ client = APIClient()
+ client.force_login(self.user)
+
+ response = client.post(
+ f"/api/projects/@current/tasks/{task.id}/run/",
+ {"claude_model_access": "own-subscription"},
+ format="json",
+ )
+
assert response.status_code == status.HTTP_400_BAD_REQUEST
assert response.json()["attr"] == "claude_model_access"
assert not task.runs.exists()
diff --git a/products/tasks/backend/tests/test_client_provenance.py b/products/tasks/backend/tests/test_client_provenance.py
index e025552cf937..3e9f00484fa7 100644
--- a/products/tasks/backend/tests/test_client_provenance.py
+++ b/products/tasks/backend/tests/test_client_provenance.py
@@ -4,7 +4,13 @@ from typing import cast
from parameterized import parameterized
from rest_framework.request import Request
-from posthog.auth import OAuthAccessTokenAuthentication, PersonalAPIKeyAuthentication
+from posthog.auth import (
+ DelegatedPersonalAPIKeyAuthentication,
+ OAuthAccessTokenAuthentication,
+ PersonalAPIKeyAuthentication,
+ ProjectSecretAPIKeyAuthentication,
+ TeamSecretTokenAuthentication,
+)
from posthog.oauth_provenance import SANDBOX_ORIGIN_HEADER, is_sandbox_oauth_request, is_sandbox_origin_request
from posthog.temporal.oauth import (
ARRAY_APP_CLIENT_ID_DEV,
@@ -12,7 +18,7 @@ from posthog.temporal.oauth import (
POSTHOG_DESKTOP_MOBILE_APP_CLIENT_ID_US,
)
-from products.tasks.backend.facade.client_provenance import get_task_client_provenance
+from products.tasks.backend.facade.client_provenance import get_task_client_provenance, is_api_key_request
from products.tasks.backend.models import TaskClientProvenance
@@ -106,3 +112,24 @@ class TestTaskClientProvenance:
assert is_sandbox_origin_request(request)
assert not is_sandbox_oauth_request(request)
+
+
+class TestIsApiKeyRequest:
+ @parameterized.expand(
+ [
+ ("personal_api_key", PersonalAPIKeyAuthentication, True),
+ ("delegated_personal_api_key", DelegatedPersonalAPIKeyAuthentication, True),
+ # Neither of these resolves to a real user — a team secret hands back a synthetic
+ # TeamSecretTokenUser and a PSAK is project-scoped — so neither may stand in for a
+ # person on something billed or attributed to one.
+ ("team_secret_token", TeamSecretTokenAuthentication, False),
+ ("project_secret_api_key", ProjectSecretAPIKeyAuthentication, False),
+ ("oauth", OAuthAccessTokenAuthentication, False),
+ ("unauthenticated", None, False),
+ ]
+ )
+ def test_only_user_bound_api_keys_qualify(
+ self, _name: str, authenticator_type: type | None, expected: bool
+ ) -> None:
+ authenticator = authenticator_type() if authenticator_type else None
+ assert is_api_key_request(authenticator) is expected
diff --git a/products/tasks/backend/tests/test_presentation_serializers.py b/products/tasks/backend/tests/test_presentation_serializers.py
index 17e7fe967479..4dc453b3de01 100644
--- a/products/tasks/backend/tests/test_presentation_serializers.py
+++ b/products/tasks/backend/tests/test_presentation_serializers.py
@@ -8,8 +8,9 @@ from django.test import SimpleTestCase
from django.utils import timezone as django_timezone
from parameterized import parameterized
+from rest_framework import authentication
-from posthog.auth import OAuthAccessTokenAuthentication
+from posthog.auth import OAuthAccessTokenAuthentication, PersonalAPIKeyAuthentication
from posthog.models.oauth import OAuthAccessToken, OAuthApplication
from posthog.temporal.oauth import (
ARRAY_APP_CLIENT_ID_EU,
@@ -204,12 +205,14 @@ class TestTaskRunCreateRequestSerializer(SimpleTestCase):
(TaskRunBootstrapCreateRequestSerializer, False),
(TaskRunCreateRequestSerializer, True),
]
- for caller in ["desktop_us", "desktop_eu", "mobile", "sandbox", "session"]
+ for caller in ["desktop_us", "desktop_eu", "mobile", "sandbox", "session", "api_key"]
]
)
def test_subscription_checks_oauth_origin(self, serializer_class, resume, caller) -> None:
- authenticator = None
- if caller != "session":
+ authenticator: authentication.BaseAuthentication | None = None
+ if caller == "api_key":
+ authenticator = PersonalAPIKeyAuthentication()
+ elif caller != "session":
authenticator = OAuthAccessTokenAuthentication()
authenticator.access_token = OAuthAccessToken(
application=OAuthApplication(
@@ -231,7 +234,9 @@ class TestTaskRunCreateRequestSerializer(SimpleTestCase):
"team": SimpleNamespace(id=1),
},
)
- accepted = caller.startswith("desktop") and not resume
+ # An API key acting as a user may select the plan outright, like Desktop. Resuming
+ # without naming the choice stays sandbox-only for every caller.
+ accepted = (caller.startswith("desktop") or caller == "api_key") and not resume
with patch.object(
tasks_facade,
"get_task_run_claude_model_access",
diff --git a/products/tasks/frontend/generated/api.schemas.ts b/products/tasks/frontend/generated/api.schemas.ts
index e8b54e0c95e8..dd198839cee8 100644
--- a/products/tasks/frontend/generated/api.schemas.ts
+++ b/products/tasks/frontend/generated/api.schemas.ts
@@ -2896,7 +2896,7 @@ export interface ClaudeTaskRunCreateSchemaApi {
* @nullable
*/
benjamin_enabled?: boolean | null
- /** How the Claude runtime pays for model use. 'own-subscription' makes the sandbox request a Claude token from the creating PostHog Desktop at run start; the token is sent in flight and never stored on PostHog servers. Only PostHog Desktop can select 'own-subscription'; other callers get a 400. If omitted or null, resumed runs keep their billing choice and new runs use the PostHog gateway.
+ /** How the Claude runtime pays for model use. 'own-subscription' makes the sandbox request a Claude token from whoever started the run; Desktop relays it interactively and an API key caller relays it unattended. The token is sent in flight and never stored on PostHog servers. Only PostHog Desktop and API keys can select 'own-subscription'; other callers get a 400. If omitted or null, resumed runs keep their billing choice and new runs use the PostHog gateway.
*
* * `posthog-gateway` - posthog-gateway
* * `own-subscription` - own-subscription */
@@ -3039,7 +3039,7 @@ export interface CodexTaskRunCreateSchemaApi {
* @nullable
*/
benjamin_enabled?: boolean | null
- /** How the Claude runtime pays for model use. 'own-subscription' makes the sandbox request a Claude token from the creating PostHog Desktop at run start; the token is sent in flight and never stored on PostHog servers. Only PostHog Desktop can select 'own-subscription'; other callers get a 400. If omitted or null, resumed runs keep their billing choice and new runs use the PostHog gateway.
+ /** How the Claude runtime pays for model use. 'own-subscription' makes the sandbox request a Claude token from whoever started the run; Desktop relays it interactively and an API key caller relays it unattended. The token is sent in flight and never stored on PostHog servers. Only PostHog Desktop and API keys can select 'own-subscription'; other callers get a 400. If omitted or null, resumed runs keep their billing choice and new runs use the PostHog gateway.
*
* * `posthog-gateway` - posthog-gateway
* * `own-subscription` - own-subscription */
@@ -3507,7 +3507,7 @@ export interface TaskRunBootstrapCreateRequestApi {
* @nullable
*/
benjamin_enabled?: boolean | null
- /** How the Claude runtime pays for model use. 'own-subscription' makes the sandbox request a Claude token from the creating PostHog Desktop at run start; the token is sent in flight and never stored on PostHog servers. Only PostHog Desktop can select 'own-subscription'; other callers get a 400. If omitted or null, resumed runs keep their billing choice and new runs use the PostHog gateway.
+ /** How the Claude runtime pays for model use. 'own-subscription' makes the sandbox request a Claude token from whoever started the run; Desktop relays it interactively and an API key caller relays it unattended. The token is sent in flight and never stored on PostHog servers. Only PostHog Desktop and API keys can select 'own-subscription'; other callers get a 400. If omitted or null, resumed runs keep their billing choice and new runs use the PostHog gateway.
*
* * `posthog-gateway` - posthog-gateway
* * `own-subscription` - own-subscription */
diff --git a/products/tasks/frontend/generated/api.zod.ts b/products/tasks/frontend/generated/api.zod.ts
index 582452838bb2..1d1dc510bbc0 100644
--- a/products/tasks/frontend/generated/api.zod.ts
+++ b/products/tasks/frontend/generated/api.zod.ts
@@ -1932,7 +1932,7 @@ export const TasksRunCreateBody = /* @__PURE__ */ zod.union([
])
.optional()
.describe(
- "How the Claude runtime pays for model use. 'own-subscription' makes the sandbox request a Claude token from the creating PostHog Desktop at run start; the token is sent in flight and never stored on PostHog servers. Only PostHog Desktop can select 'own-subscription'; other callers get a 400. If omitted or null, resumed runs keep their billing choice and new runs use the PostHog gateway.\n\n\* `posthog-gateway` - posthog-gateway\n\* `own-subscription` - own-subscription"
+ "How the Claude runtime pays for model use. 'own-subscription' makes the sandbox request a Claude token from whoever started the run; Desktop relays it interactively and an API key caller relays it unattended. The token is sent in flight and never stored on PostHog servers. Only PostHog Desktop and API keys can select 'own-subscription'; other callers get a 400. If omitted or null, resumed runs keep their billing choice and new runs use the PostHog gateway.\n\n\* `posthog-gateway` - posthog-gateway\n\* `own-subscription` - own-subscription"
),
codex_model_access: zod
.union([
@@ -2113,7 +2113,7 @@ export const TasksRunCreateBody = /* @__PURE__ */ zod.union([
])
.optional()
.describe(
- "How the Claude runtime pays for model use. 'own-subscription' makes the sandbox request a Claude token from the creating PostHog Desktop at run start; the token is sent in flight and never stored on PostHog servers. Only PostHog Desktop can select 'own-subscription'; other callers get a 400. If omitted or null, resumed runs keep their billing choice and new runs use the PostHog gateway.\n\n\* `posthog-gateway` - posthog-gateway\n\* `own-subscription` - own-subscription"
+ "How the Claude runtime pays for model use. 'own-subscription' makes the sandbox request a Claude token from whoever started the run; Desktop relays it interactively and an API key caller relays it unattended. The token is sent in flight and never stored on PostHog servers. Only PostHog Desktop and API keys can select 'own-subscription'; other callers get a 400. If omitted or null, resumed runs keep their billing choice and new runs use the PostHog gateway.\n\n\* `posthog-gateway` - posthog-gateway\n\* `own-subscription` - own-subscription"
),
codex_model_access: zod
.union([
@@ -2607,7 +2607,7 @@ export const TasksRunsCreateBody = /* @__PURE__ */ zod
])
.optional()
.describe(
- "How the Claude runtime pays for model use. 'own-subscription' makes the sandbox request a Claude token from the creating PostHog Desktop at run start; the token is sent in flight and never stored on PostHog servers. Only PostHog Desktop can select 'own-subscription'; other callers get a 400. If omitted or null, resumed runs keep their billing choice and new runs use the PostHog gateway.\n\n\* `posthog-gateway` - posthog-gateway\n\* `own-subscription` - own-subscription"
+ "How the Claude runtime pays for model use. 'own-subscription' makes the sandbox request a Claude token from whoever started the run; Desktop relays it interactively and an API key caller relays it unattended. The token is sent in flight and never stored on PostHog servers. Only PostHog Desktop and API keys can select 'own-subscription'; other callers get a 400. If omitted or null, resumed runs keep their billing choice and new runs use the PostHog gateway.\n\n\* `posthog-gateway` - posthog-gateway\n\* `own-subscription` - own-subscription"
),
codex_model_access: zod
.union([
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index de38e6b9e2ca..34efddc8adfa 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -20262,7 +20262,7 @@ export namespace Schemas {
* @nullable
*/
benjamin_enabled?: boolean | null;
- /** How the Claude runtime pays for model use. 'own-subscription' makes the sandbox request a Claude token from the creating PostHog Desktop at run start; the token is sent in flight and never stored on PostHog servers. Only PostHog Desktop can select 'own-subscription'; other callers get a 400. If omitted or null, resumed runs keep their billing choice and new runs use the PostHog gateway.
+ /** How the Claude runtime pays for model use. 'own-subscription' makes the sandbox request a Claude token from whoever started the run; Desktop relays it interactively and an API key caller relays it unattended. The token is sent in flight and never stored on PostHog servers. Only PostHog Desktop and API keys can select 'own-subscription'; other callers get a 400. If omitted or null, resumed runs keep their billing choice and new runs use the PostHog gateway.
*
* * `posthog-gateway` - posthog-gateway
* * `own-subscription` - own-subscription */
@@ -20703,7 +20703,7 @@ export namespace Schemas {
* @nullable
*/
benjamin_enabled?: boolean | null;
- /** How the Claude runtime pays for model use. 'own-subscription' makes the sandbox request a Claude token from the creating PostHog Desktop at run start; the token is sent in flight and never stored on PostHog servers. Only PostHog Desktop can select 'own-subscription'; other callers get a 400. If omitted or null, resumed runs keep their billing choice and new runs use the PostHog gateway.
+ /** How the Claude runtime pays for model use. 'own-subscription' makes the sandbox request a Claude token from whoever started the run; Desktop relays it interactively and an API key caller relays it unattended. The token is sent in flight and never stored on PostHog servers. Only PostHog Desktop and API keys can select 'own-subscription'; other callers get a 400. If omitted or null, resumed runs keep their billing choice and new runs use the PostHog gateway.
*
* * `posthog-gateway` - posthog-gateway
* * `own-subscription` - own-subscription */
@@ -97116,7 +97116,7 @@ export namespace Schemas {
* @nullable
*/
benjamin_enabled?: boolean | null;
- /** How the Claude runtime pays for model use. 'own-subscription' makes the sandbox request a Claude token from the creating PostHog Desktop at run start; the token is sent in flight and never stored on PostHog servers. Only PostHog Desktop can select 'own-subscription'; other callers get a 400. If omitted or null, resumed runs keep their billing choice and new runs use the PostHog gateway.
+ /** How the Claude runtime pays for model use. 'own-subscription' makes the sandbox request a Claude token from whoever started the run; Desktop relays it interactively and an API key caller relays it unattended. The token is sent in flight and never stored on PostHog servers. Only PostHog Desktop and API keys can select 'own-subscription'; other callers get a 400. If omitted or null, resumed runs keep their billing choice and new runs use the PostHog gateway.
*
* * `posthog-gateway` - posthog-gateway
* * `own-subscription` - own-subscription */
diff --git a/services/mcp/src/generated/tasks/api.ts b/services/mcp/src/generated/tasks/api.ts
index 9fdc159d2c5b..6d3e17c535ae 100644
--- a/services/mcp/src/generated/tasks/api.ts
+++ b/services/mcp/src/generated/tasks/api.ts
@@ -1391,7 +1391,7 @@ export const TasksRunCreateBody = () => zod.union([
])
.optional()
.describe(
- "How the Claude runtime pays for model use. 'own-subscription' makes the sandbox request a Claude token from the creating PostHog Desktop at run start; the token is sent in flight and never stored on PostHog servers. Only PostHog Desktop can select 'own-subscription'; other callers get a 400. If omitted or null, resumed runs keep their billing choice and new runs use the PostHog gateway.\n\n\* `posthog-gateway` - posthog-gateway\n\* `own-subscription` - own-subscription"
+ "How the Claude runtime pays for model use. 'own-subscription' makes the sandbox request a Claude token from whoever started the run; Desktop relays it interactively and an API key caller relays it unattended. The token is sent in flight and never stored on PostHog servers. Only PostHog Desktop and API keys can select 'own-subscription'; other callers get a 400. If omitted or null, resumed runs keep their billing choice and new runs use the PostHog gateway.\n\n\* `posthog-gateway` - posthog-gateway\n\* `own-subscription` - own-subscription"
),
codex_model_access: zod
.union([
@@ -1572,7 +1572,7 @@ export const TasksRunCreateBody = () => zod.union([
])
.optional()
.describe(
- "How the Claude runtime pays for model use. 'own-subscription' makes the sandbox request a Claude token from the creating PostHog Desktop at run start; the token is sent in flight and never stored on PostHog servers. Only PostHog Desktop can select 'own-subscription'; other callers get a 400. If omitted or null, resumed runs keep their billing choice and new runs use the PostHog gateway.\n\n\* `posthog-gateway` - posthog-gateway\n\* `own-subscription` - own-subscription"
+ "How the Claude runtime pays for model use. 'own-subscription' makes the sandbox request a Claude token from whoever started the run; Desktop relays it interactively and an API key caller relays it unattended. The token is sent in flight and never stored on PostHog servers. Only PostHog Desktop and API keys can select 'own-subscription'; other callers get a 400. If omitted or null, resumed runs keep their billing choice and new runs use the PostHog gateway.\n\n\* `posthog-gateway` - posthog-gateway\n\* `own-subscription` - own-subscription"
),
codex_model_access: zod
.union([