: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(replay-vision): report the calling surface as creation_method outside the app (#96761)
Kim Svatos Duganbc20827a8429
diff --git a/products/replay_vision/backend/api/scanners.py b/products/replay_vision/backend/api/scanners.pyindex a70e2088f994..9dceb93c1c38 100644--- a/products/replay_vision/backend/api/scanners.py+++ b/products/replay_vision/backend/api/scanners.py@@ -29,7 +29,7 @@ from posthog.schema import RecordingsQueryfrom posthog.api.routing import TeamAndOrgViewSetMixinfrom posthog.api.shared import UserBasicSerializerfrom posthog.api.tagged_item import TaggedItemSerializerMixin, set_tags_on_object-from posthog.event_usage import report_user_action+from posthog.event_usage import EventSource, get_event_source, report_user_actionfrom posthog.exceptions import QuotaLimitExceededfrom posthog.models.tag import tagifyfrom posthog.models.tagged_item import TaggedItem@@ -142,6 +142,9 @@ class ScannerCreationMethod(models.TextChoices):Separate from the creation-flow experiment arm, which says only which flow a person was offered.Someone offered the AI flow can still fill the form by hand, so this is what says what they did.++ These are the values a caller may send. The property reported on the event can also hold an+ `EventSource` — see `_reported_creation_method`."""AI = "ai", "AI draft"@@ -149,6 +152,29 @@ class ScannerCreationMethod(models.TextChoices):SCRATCH = "scratch", "From scratch"+def _reported_creation_method(context: dict[str, Any], claimed: str | None) -> str | None:+ """What `creation_method` says on the created event.++ The field answers how a person filled the creation form, so only a request from the app can+ answer it at all. Every other surface reports its own source instead, which keeps the values+ mutually exclusive: `ai`/`template`/`scratch` mean a person in the editor, anything else names+ the caller. An agent creating a scanner over MCP is not someone building one by hand, and+ letting it report `scratch` inflates the hand-built side of the creation-flow comparison.++ Worth the override rather than only filling in a missing value: the wizard creates several times+ more scanners than the app does, and it already sends a method on some of its calls.++ Max reaches the serializer directly with no HTTP request, so it declares its surface in the+ context the same way it passes `user`. Without that it would fall through as unattributed, which+ is the one gap a request-derived source cannot close.+ """+ request = context.get("request")+ source = get_event_source(request) if request is not None else context.get("event_source")+ if source is None:+ return claimed+ return claimed if source == EventSource.WEB else source.value++def _goal_flow_variant(user: User, team: Team) -> str | None:"""The user's arm of the creation-flow experiment, or None when the flag is off for them.@@ -365,7 +391,8 @@ class ReplayScannerSerializer(TaggedItemSerializerMixin, UserAccessControlSerial"How the creator built this scanner: from an AI draft, from a template, or from scratch. ""Reported to product analytics at creation and not stored on the scanner. Independent of ""any experiment the creator is in, since a person offered the AI flow can still fill the "- "form by hand. Ignored on update."+ "form by hand. Only the app can answer this, so a request from anywhere else reports the "+ "calling surface instead of whatever it sends here. Ignored on update."),)scanner_config = serializers.JSONField(@@ -766,11 +793,12 @@ class ReplayScannerSerializer(TaggedItemSerializerMixin, UserAccessControlSerial# read from the flag, so it carries intent to treat and keeps the arms comparable: someone# offered the AI flow counts as treated even when they ignore it. `creation_method` is what# the person actually did, which is what says whether AI-built scanners turn out better.- # None when the caller is not the app, since only the UI knows how the form was filled.+ # It names the calling surface when the caller is not the app, since only the UI knows+ # how the form was filled.{**_scanner_lifecycle_properties(scanner),"creation_flow_variant": _goal_flow_variant(user, team),- "creation_method": creation_method,+ "creation_method": _reported_creation_method(self.context, creation_method),},team=team,request=self.context.get("request"),diff --git a/products/replay_vision/backend/max_tools.py b/products/replay_vision/backend/max_tools.pyindex 849a4eaf5c57..3de156c59337 100644--- a/products/replay_vision/backend/max_tools.py+++ b/products/replay_vision/backend/max_tools.py@@ -10,6 +10,7 @@ from pydantic import BaseModel, Fieldfrom rest_framework.exceptions import Throttledfrom posthog.clickhouse.client.connection import ClickHouseUser+from posthog.event_usage import EventSourcefrom posthog.exceptions import QuotaLimitExceededfrom posthog.models.team import Teamfrom posthog.models.user import User@@ -1080,7 +1081,13 @@ class CreateReplayVisionScannerTool(ReplayVisionGatesMixin, MaxTool):"sampling_rate": sampling_rate,"enabled": enabled,},- context={"get_team": lambda: self._team, "user": self._user},+ # No HTTP request here, so the surface can't be derived from one. Declared instead, or+ # the creation-flow comparison counts a scanner Max made as one nobody can account for.+ context={+ "get_team": lambda: self._team,+ "user": self._user,+ "event_source": EventSource.POSTHOG_AI,+ },)if not serializer.is_valid():return _first_error(serializer.errors), {"error": "invalid_config"}diff --git a/products/replay_vision/backend/tests/test_api.py b/products/replay_vision/backend/tests/test_api.pyindex 24df05c3aef3..021c322c1134 100644--- a/products/replay_vision/backend/tests/test_api.py+++ b/products/replay_vision/backend/tests/test_api.py@@ -15,6 +15,7 @@ from parameterized import parameterizedfrom temporalio.exceptions import WorkflowAlreadyStartedErrorfrom posthog.api.tagged_item import set_tags_on_object+from posthog.event_usage import EventSourcefrom posthog.models import Organization, PersonalAPIKey, Team, Userfrom posthog.models.tagged_item import TaggedItemfrom posthog.models.utils import generate_random_token_personal, hash_key_value, uuid7@@ -1049,31 +1050,72 @@ class TestScannerLifecycleTelemetry(_VisionAPITestCase):expected = flag_value if isinstance(flag_value, str) else Noneself.assertEqual(created[0].kwargs["properties"]["creation_flow_variant"], expected)- def test_create_reports_how_the_scanner_was_built(self):+ @parameterized.expand(+ [+ ("app", {}, "ai", "ai"),+ ("wizard", {"HTTP_USER_AGENT": "posthog/wizard 1.2.3"}, "scratch", "wizard"),+ ]+ )+ def test_create_reports_how_the_scanner_was_built(+ self, _name: str, headers: dict[str, Any], claimed: str, expected: str+ ) -> None:# The arm says which flow the person was offered; this says what they did with it. Someone# offered the AI flow can still fill the form by hand, so a metric comparing AI-built against# hand-built scanners needs this and cannot read it off the arm.+ #+ # Only the app has a form, so a caller that has none reports its surface instead of what it+ # claims. Resolved from a real user agent, since the question is whether a caller's surface+ # reaches the serializer at all — a patched source asserts only that the branch exists.with patch("posthoganalytics.capture") as capture:resp = self.client.post(self.scanners_url,data={- "name": "telemetry-method",+ "name": f"telemetry-method-{_name}","scanner_type": ScannerType.MONITOR,"scanner_config": {"prompt": "did checkout complete?"},"model": ScannerModel.GEMINI_3_8_FLASH,- "creation_method": "ai",+ "creation_method": claimed,},format="json",+ **headers,)self.assertEqual(resp.status_code, 201, resp.json())created = [call for call in capture.call_args_list if call.kwargs.get("event") == "replay_vision_scanner_created"]- self.assertEqual(created[0].kwargs["properties"]["creation_method"], "ai")+ self.assertEqual(created[0].kwargs["properties"]["creation_method"], expected)# Telemetry only: it must not reach the model, whose constructor would reject it.self.assertFalse(hasattr(ReplayScanner.objects.get(id=resp.json()["id"]), "creation_method"))+ def test_create_without_a_request_reports_the_declared_surface(self) -> None:+ # Max reaches the serializer directly, so there is no request to derive a surface from and+ # nothing would be reported at all. It declares one in the context instead, the same way it+ # passes `user`. Left unattributed, its scanners land in the same bucket as the app's.+ self.organization.is_ai_data_processing_approved = True+ self.organization.save()+ serializer = ReplayScannerSerializer(+ data={+ "name": "telemetry-surface-max",+ "scanner_type": ScannerType.MONITOR,+ "scanner_config": {"prompt": "did checkout complete?"},+ "model": ScannerModel.GEMINI_3_8_FLASH,+ },+ context={+ "get_team": lambda: self.team,+ "user": self.user,+ "event_source": EventSource.POSTHOG_AI,+ },+ )+ self.assertTrue(serializer.is_valid(), serializer.errors)+ with patch("posthoganalytics.capture") as capture:+ serializer.save()++ created = [+ call for call in capture.call_args_list if call.kwargs.get("event") == "replay_vision_scanner_created"+ ]+ self.assertEqual(created[0].kwargs["properties"]["creation_method"], "posthog_ai")+def test_update_ignores_how_the_scanner_was_built(self):# The UI PATCHes the whole form back, so an edit resends this. A scanner is built once, and# an unpopped value would land in the edit diff and report a change that never happened.diff --git a/products/replay_vision/frontend/generated/api.schemas.ts b/products/replay_vision/frontend/generated/api.schemas.tsindex 6b1cbf6785ed..d53c582bf5b4 100644--- a/products/replay_vision/frontend/generated/api.schemas.ts+++ b/products/replay_vision/frontend/generated/api.schemas.ts@@ -864,7 +864,7 @@ export interface ReplayScannerApi {* * `scorer` - Scorer* * `summarizer` - Summarizer */scanner_type: ScannerTypeEnumApi- /** How the creator built this scanner: from an AI draft, from a template, or from scratch. Reported to product analytics at creation and not stored on the scanner. Independent of any experiment the creator is in, since a person offered the AI flow can still fill the form by hand. Ignored on update.+ /** How the creator built this scanner: from an AI draft, from a template, or from scratch. Reported to product analytics at creation and not stored on the scanner. Independent of any experiment the creator is in, since a person offered the AI flow can still fill the form by hand. Only the app can answer this, so a request from anywhere else reports the calling surface instead of whatever it sends here. Ignored on update.** * `ai` - AI draft* * `template` - Template@@ -988,7 +988,7 @@ export interface PatchedReplayScannerApi {* * `scorer` - Scorer* * `summarizer` - Summarizer */scanner_type?: ScannerTypeEnumApi- /** How the creator built this scanner: from an AI draft, from a template, or from scratch. Reported to product analytics at creation and not stored on the scanner. Independent of any experiment the creator is in, since a person offered the AI flow can still fill the form by hand. Ignored on update.+ /** How the creator built this scanner: from an AI draft, from a template, or from scratch. Reported to product analytics at creation and not stored on the scanner. Independent of any experiment the creator is in, since a person offered the AI flow can still fill the form by hand. Only the app can answer this, so a request from anywhere else reports the calling surface instead of whatever it sends here. Ignored on update.** * `ai` - AI draft* * `template` - Templatediff --git a/products/replay_vision/frontend/generated/api.zod.ts b/products/replay_vision/frontend/generated/api.zod.tsindex dbaabab614d8..0566fecdb9a5 100644--- a/products/replay_vision/frontend/generated/api.zod.ts+++ b/products/replay_vision/frontend/generated/api.zod.ts@@ -549,7 +549,7 @@ export const VisionScannersCreateBody = /* @__PURE__ */ zod]).optional().describe(- 'How the creator built this scanner: from an AI draft, from a template, or from scratch. Reported to product analytics at creation and not stored on the scanner. Independent of any experiment the creator is in, since a person offered the AI flow can still fill the form by hand. Ignored on update.\n\n\* `ai` - AI draft\n\* `template` - Template\n\* `scratch` - From scratch'+ 'How the creator built this scanner: from an AI draft, from a template, or from scratch. Reported to product analytics at creation and not stored on the scanner. Independent of any experiment the creator is in, since a person offered the AI flow can still fill the form by hand. Only the app can answer this, so a request from anywhere else reports the calling surface instead of whatever it sends here. Ignored on update.\n\n\* `ai` - AI draft\n\* `template` - Template\n\* `scratch` - From scratch'),scanner_config: zod.unknown()@@ -691,7 +691,7 @@ export const VisionScannersPartialUpdateBody = /* @__PURE__ */ zod]).optional().describe(- 'How the creator built this scanner: from an AI draft, from a template, or from scratch. Reported to product analytics at creation and not stored on the scanner. Independent of any experiment the creator is in, since a person offered the AI flow can still fill the form by hand. Ignored on update.\n\n\* `ai` - AI draft\n\* `template` - Template\n\* `scratch` - From scratch'+ 'How the creator built this scanner: from an AI draft, from a template, or from scratch. Reported to product analytics at creation and not stored on the scanner. Independent of any experiment the creator is in, since a person offered the AI flow can still fill the form by hand. Only the app can answer this, so a request from anywhere else reports the calling surface instead of whatever it sends here. Ignored on update.\n\n\* `ai` - AI draft\n\* `template` - Template\n\* `scratch` - From scratch'),scanner_config: zod.unknown()diff --git a/products/replay_vision/frontend/replay_scanners/ScannerEditorScene.tsx b/products/replay_vision/frontend/replay_scanners/ScannerEditorScene.tsxindex 1b8743186e58..fa53bdc78b2b 100644--- a/products/replay_vision/frontend/replay_scanners/ScannerEditorScene.tsx+++ b/products/replay_vision/frontend/replay_scanners/ScannerEditorScene.tsx@@ -221,7 +221,9 @@ export function ScannerEditorSceneComponent(): JSX.Element {</p></div><ScannerTemplatePicker />- <ScannerGoalDraft />+ {/* The goal flow supersedes this box, so someone who has already+ turned it down to build by hand should not be offered it again. */}+ {!goalFlow && <ScannerGoalDraft />}</>)) : step === 'overview' ? (diff --git a/products/replay_vision/frontend/replay_scanners/components/ScannerTypeConfigEditor.tsx b/products/replay_vision/frontend/replay_scanners/components/ScannerTypeConfigEditor.tsxindex d4ceda7fd719..4001b8f18288 100644--- a/products/replay_vision/frontend/replay_scanners/components/ScannerTypeConfigEditor.tsx+++ b/products/replay_vision/frontend/replay_scanners/components/ScannerTypeConfigEditor.tsx@@ -13,8 +13,10 @@ import {LemonTextArea,} from '@posthog/lemon-ui'+import { FEATURE_FLAGS } from 'lib/constants'import { LemonField } from 'lib/lemon-ui/LemonField'import { LemonInputSelect } from 'lib/lemon-ui/LemonInputSelect/LemonInputSelect'+import { featureFlagLogic } from 'lib/logic/featureFlagLogic'import { useMaxTool } from 'scenes/max/useMaxTool'import { iconForType } from '~/layout/panel-layout/ProjectTree/defaultTree'@@ -24,6 +26,19 @@ import { useAttachedContext } from 'products/posthog_ai/frontend/api/logics'import { replayScannerLogic } from '../replayScannerLogic'import { ClassifierScannerConfig, SummarizerScannerConfig, scannerTypeLabel } from '../types'+/** Whether this form should offer no AI help at all.+ *+ * In the goal-based flow the AI path is the flow itself, so someone who turned it down to build by+ * hand gets one path or the other rather than a half-AI middle. Only while creating: editing a+ * saved scanner is not that choice, and someone who did use the flow keeps the entry points so they+ * can rework what it drafted. Multivariate flag, so a truthy check would strip the control arm too+ * and change what the experiment compares. */+function useManualWithoutAi(scannerId: string): boolean {+ const { isNew, goalDraft } = useValues(replayScannerLogic({ id: scannerId }))+ const { featureFlags } = useValues(featureFlagLogic)+ return isNew && !goalDraft && featureFlags[FEATURE_FLAGS.VISION_GOAL_BASED_CREATION_FLOW] === 'test'+}+export const SUMMARIZER_LENGTH_OPTIONS: { value: SummarizerScannerConfig['length']; label: string }[] = [{ value: 'short', label: 'Short (1-2 sentences)' },{ value: 'medium', label: 'Medium (1 paragraph)' },@@ -47,6 +62,7 @@ function ScannerPromptField({const { setScannerValue } = useActions(logic)// The AI already wrote this prompt one step ago, so offering to write it reads as a no-op.const promptWasDrafted = isNew && !!goalDraft+ const manualWithoutAi = useManualWithoutAi(scannerId)const onDraftedPrompt = useCallback((toolOutput: { prompt?: string; error?: string }) => {@@ -91,7 +107,7 @@ function ScannerPromptField({<div className="space-y-2"><div className="flex flex-wrap items-center justify-between gap-2"><label className="text-sm font-medium">{label}</label>- {openMax && (+ {openMax && !manualWithoutAi && (<LemonButtonsize="xsmall"type="secondary"@@ -183,6 +199,7 @@ function ClassifierTagsField({ scannerId }: { scannerId: string }): JSX.Elementconst hasTags = (config?.tags ?? []).length > 0// The draft already filled these in, so the offer is more of them, not a first set.const categoriesWereDrafted = isNew && !!goalDraft && !!config?.tags?.length+ const manualWithoutAi = useManualWithoutAi(scannerId)// The param only survives on a new scanner whose config a valid template prefilled: the picker// drops it when the blank card is chosen, and loadScanner strips it on load when a goal draft// outranks the template or the key is unknown.@@ -205,21 +222,23 @@ function ClassifierTagsField({ scannerId }: { scannerId: string }): JSX.Element>Clear all</LemonButton>- <LemonButton- size="xsmall"- type="secondary"- icon={<IconAI />}- loading={tagSuggestionsLoading}- disabledReason={- hasPrompt ? undefined : 'Add a prompt first so suggestions match your goal'- }- onClick={() => loadTagSuggestions()}- data-attr="replay-vision-suggest-tags-with-ai"- >- {categoriesWereDrafted- ? 'Suggest more categories'- : 'Suggest categories with PostHog AI'}- </LemonButton>+ {!manualWithoutAi && (+ <LemonButton+ size="xsmall"+ type="secondary"+ icon={<IconAI />}+ loading={tagSuggestionsLoading}+ disabledReason={+ hasPrompt ? undefined : 'Add a prompt first so suggestions match your goal'+ }+ onClick={() => loadTagSuggestions()}+ data-attr="replay-vision-suggest-tags-with-ai"+ >+ {categoriesWereDrafted+ ? 'Suggest more categories'+ : 'Suggest categories with PostHog AI'}+ </LemonButton>+ )}</span></span>}diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex c7644bd2774e..a4032ba759e9 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -56963,7 +56963,7 @@ export namespace Schemas {* * `scorer` - Scorer* * `summarizer` - Summarizer */scanner_type: ScannerTypeEnum;- /** How the creator built this scanner: from an AI draft, from a template, or from scratch. Reported to product analytics at creation and not stored on the scanner. Independent of any experiment the creator is in, since a person offered the AI flow can still fill the form by hand. Ignored on update.+ /** How the creator built this scanner: from an AI draft, from a template, or from scratch. Reported to product analytics at creation and not stored on the scanner. Independent of any experiment the creator is in, since a person offered the AI flow can still fill the form by hand. Only the app can answer this, so a request from anywhere else reports the calling surface instead of whatever it sends here. Ignored on update.** * `ai` - AI draft* * `template` - Template@@ -67060,7 +67060,7 @@ export namespace Schemas {* * `scorer` - Scorer* * `summarizer` - Summarizer */scanner_type?: ScannerTypeEnum;- /** How the creator built this scanner: from an AI draft, from a template, or from scratch. Reported to product analytics at creation and not stored on the scanner. Independent of any experiment the creator is in, since a person offered the AI flow can still fill the form by hand. Ignored on update.+ /** How the creator built this scanner: from an AI draft, from a template, or from scratch. Reported to product analytics at creation and not stored on the scanner. Independent of any experiment the creator is in, since a person offered the AI flow can still fill the form by hand. Only the app can answer this, so a request from anywhere else reports the calling surface instead of whatever it sends here. Ignored on update.** * `ai` - AI draft* * `template` - Templatediff --git a/services/mcp/src/generated/replay_vision/api.ts b/services/mcp/src/generated/replay_vision/api.tsindex 99f624c5ecd5..0762d3810dae 100644--- a/services/mcp/src/generated/replay_vision/api.ts+++ b/services/mcp/src/generated/replay_vision/api.ts@@ -324,7 +324,7 @@ export const VisionScannersCreateBody = () => zod]).optional().describe(- 'How the creator built this scanner: from an AI draft, from a template, or from scratch. Reported to product analytics at creation and not stored on the scanner. Independent of any experiment the creator is in, since a person offered the AI flow can still fill the form by hand. Ignored on update.\n\n\* `ai` - AI draft\n\* `template` - Template\n\* `scratch` - From scratch'+ 'How the creator built this scanner: from an AI draft, from a template, or from scratch. Reported to product analytics at creation and not stored on the scanner. Independent of any experiment the creator is in, since a person offered the AI flow can still fill the form by hand. Only the app can answer this, so a request from anywhere else reports the calling surface instead of whatever it sends here. Ignored on update.\n\n\* `ai` - AI draft\n\* `template` - Template\n\* `scratch` - From scratch'),scanner_config: zod.unknown()@@ -487,7 +487,7 @@ export const VisionScannersPartialUpdateBody = () => zod]).optional().describe(- 'How the creator built this scanner: from an AI draft, from a template, or from scratch. Reported to product analytics at creation and not stored on the scanner. Independent of any experiment the creator is in, since a person offered the AI flow can still fill the form by hand. Ignored on update.\n\n\* `ai` - AI draft\n\* `template` - Template\n\* `scratch` - From scratch'+ 'How the creator built this scanner: from an AI draft, from a template, or from scratch. Reported to product analytics at creation and not stored on the scanner. Independent of any experiment the creator is in, since a person offered the AI flow can still fill the form by hand. Only the app can answer this, so a request from anywhere else reports the calling surface instead of whatever it sends here. Ignored on update.\n\n\* `ai` - AI draft\n\* `template` - Template\n\* `scratch` - From scratch'),scanner_config: zod.unknown()diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-create.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-create.jsonindex 66f898156c7e..8b4d40ee7679 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-create.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-create.json@@ -13,7 +13,7 @@"type": "null"}],- "description": "How the creator built this scanner: from an AI draft, from a template, or from scratch. Reported to product analytics at creation and not stored on the scanner. Independent of any experiment the creator is in, since a person offered the AI flow can still fill the form by hand. Ignored on update.\n\n* `ai` - AI draft\n* `template` - Template\n* `scratch` - From scratch"+ "description": "How the creator built this scanner: from an AI draft, from a template, or from scratch. Reported to product analytics at creation and not stored on the scanner. Independent of any experiment the creator is in, since a person offered the AI flow can still fill the form by hand. Only the app can answer this, so a request from anywhere else reports the calling surface instead of whatever it sends here. Ignored on update.\n\n* `ai` - AI draft\n* `template` - Template\n* `scratch` - From scratch"},"credit_limit": {"anyOf": [diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-update.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-update.jsonindex 1d302d0c3a3f..2b2a668f60d8 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-update.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-update.json@@ -12,7 +12,7 @@"type": "null"}],- "description": "How the creator built this scanner: from an AI draft, from a template, or from scratch. Reported to product analytics at creation and not stored on the scanner. Independent of any experiment the creator is in, since a person offered the AI flow can still fill the form by hand. Ignored on update.\n\n* `ai` - AI draft\n* `template` - Template\n* `scratch` - From scratch"+ "description": "How the creator built this scanner: from an AI draft, from a template, or from scratch. Reported to product analytics at creation and not stored on the scanner. Independent of any experiment the creator is in, since a person offered the AI flow can still fill the form by hand. Only the app can answer this, so a request from anywhere else reports the calling surface instead of whatever it sends here. Ignored on update.\n\n* `ai` - AI draft\n* `template` - Template\n* `scratch` - From scratch"},"credit_limit": {"anyOf": [