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.

feat(replay-vision): tiered gemini model lineup with unified pricing config (#72713)

Arno Hillenf8c6d2ad4e07
diff --git a/products/replay/skills/investigating-replay/SKILL.md b/products/replay/skills/investigating-replay/SKILL.md
index d2d76b76ecab..7fb856c2956a 100644
--- a/products/replay/skills/investigating-replay/SKILL.md
+++ b/products/replay/skills/investigating-replay/SKILL.md
@@ -199,7 +199,7 @@ with a throwaway scanner — but **ask the user's permission before creating any
"prompt": "Summarize what the user was trying to do, whether they succeeded, and any friction they hit."
},
"query": { "kind": "RecordingsQuery" },
- "model": "gemini-3-flash-preview",
+ "model": "gemini-3.6-flash",
"enabled": false
}
```
diff --git a/products/replay_vision/backend/api/scanners.py b/products/replay_vision/backend/api/scanners.py
index 80c330cf0b71..3f0692fc672b 100644
--- a/products/replay_vision/backend/api/scanners.py
+++ b/products/replay_vision/backend/api/scanners.py
@@ -621,7 +621,7 @@ class EstimateRequestSerializer(serializers.Serializer):
model = serializers.ChoiceField(
choices=ScannerModel.choices,
required=False,
- default=ScannerModel.GEMINI_3_FLASH,
+ default=ScannerModel.GEMINI_3_6_FLASH,
help_text="Proposed model; determines `credits_per_observation` in the response.",
)
diff --git a/products/replay_vision/backend/billing.py b/products/replay_vision/backend/billing.py
index bea7334684bb..cb20b40db45b 100644
--- a/products/replay_vision/backend/billing.py
+++ b/products/replay_vision/backend/billing.py
@@ -5,8 +5,10 @@ model-dependent number of credits, frozen onto its receipt at success time so la
price changes never reprice history.
"""
+import math
+from dataclasses import dataclass
from datetime import datetime
-from typing import cast
+from typing import Literal, cast
from django.db.models import Case, IntegerField, Sum, Value, When
from django.db.models.functions import Coalesce
@@ -20,14 +22,78 @@ logger = structlog.get_logger(__name__)
CREDITS_PER_DOLLAR = 100 # 1 credit = $0.01, matching ai_credits
+# Google's list prices, tracked from GEMINI_PRICING_URL (standard tier, prompts <= 200k tokens).
+GEMINI_PRICING_URL = "https://ai.google.dev/gemini-api/docs/pricing"
+
+
+GeminiTier = Literal["flash lite", "flash", "pro"]
+
+
+@dataclass(frozen=True)
+class GeminiModelInfo:
+ tier: GeminiTier
+ input_usd_per_1m: float # Google list price per 1M input tokens
+ output_usd_per_1m: float # Google list price per 1M output tokens
+ credits_per_observation: int # what we charge (1 credit = $0.01)
+ retired: bool = False # unselectable, but frozen snapshots/receipts still need its price
+
+
+# Per-model source of truth. Non-retired rows are the lineup, one model per Google tier, and must
+# mirror `ScannerModel`. No pro option on purpose: Google's only pro model is a preview id, and
+# preview retirements have burned us before.
+#
+# | model | tier | $/1M in | $/1M out | credits/observation |
+# |------------------------------|------------|---------|----------|---------------------|
+# | gemini-3.5-flash-lite | flash lite | 0.30 | 2.50 | 2 |
+# | gemini-3.6-flash | flash | 1.50 | 7.50 | 15 |
+# | gemini-2.5-flash | (retired) | 0.30 | 2.50 | 2 |
+# | gemini-3-flash-preview | (retired) | 0.50 | 3.00 | 5 |
+# | gemini-3.5-flash | (retired) | 1.50 | 9.00 | 15 |
+# | gemini-3.1-flash-lite-preview| (retired) | 0.25 | 1.50 | 2 |
+#
+# Credit prices are hand-set to keep the price points users already know (2 budget, 15 flash);
+# `suggested_observation_credits` reproduces 15 at TARGET_MARGIN and is the tool for repricing.
+GEMINI_MODELS: dict[str, GeminiModelInfo] = {
+ ScannerModel.GEMINI_3_5_FLASH_LITE: GeminiModelInfo(
+ tier="flash lite", input_usd_per_1m=0.30, output_usd_per_1m=2.50, credits_per_observation=2
+ ),
+ ScannerModel.GEMINI_3_6_FLASH: GeminiModelInfo(
+ tier="flash", input_usd_per_1m=1.50, output_usd_per_1m=7.50, credits_per_observation=15
+ ),
+ "gemini-2.5-flash": GeminiModelInfo(
+ tier="flash", input_usd_per_1m=0.30, output_usd_per_1m=2.50, credits_per_observation=2, retired=True
+ ),
+ "gemini-3-flash-preview": GeminiModelInfo(
+ tier="flash", input_usd_per_1m=0.50, output_usd_per_1m=3.00, credits_per_observation=5, retired=True
+ ),
+ "gemini-3.5-flash": GeminiModelInfo(
+ tier="flash", input_usd_per_1m=1.50, output_usd_per_1m=9.00, credits_per_observation=15, retired=True
+ ),
+ "gemini-3.1-flash-lite-preview": GeminiModelInfo(
+ tier="flash lite", input_usd_per_1m=0.25, output_usd_per_1m=1.50, credits_per_observation=2, retired=True
+ ),
+}
+
+# Typical observation shape, measured from production LLM analytics; the rasterized video dominates input.
+AVG_INPUT_TOKENS_PER_OBSERVATION = 25_000
+AVG_OUTPUT_TOKENS_PER_OBSERVATION = 200
+
+# Sale price = provider token cost x this. The headroom pays for what token prices don't cover
+# (rasterizing, video cache storage, retries) plus margin.
+TARGET_MARGIN = 3.75
+
+
+def suggested_observation_credits(info: GeminiModelInfo, margin: float = TARGET_MARGIN) -> int:
+ """Suggested credits per observation for a model, derived from its token prices and a target margin."""
+ input_cost_usd = AVG_INPUT_TOKENS_PER_OBSERVATION * info.input_usd_per_1m / 1_000_000
+ output_cost_usd = AVG_OUTPUT_TOKENS_PER_OBSERVATION * info.output_usd_per_1m / 1_000_000
+ return max(1, math.ceil((input_cost_usd + output_cost_usd) * margin * CREDITS_PER_DOLLAR))
+
+
# Keyed on the raw model-id string (not the enum) because frozen `scanner_snapshot`s and
-# receipts outlive enum members; retired ids must keep pricing in-flight observations.
+# receipts outlive enum members; retired ids keep pricing in-flight observations.
OBSERVATION_CREDITS_BY_MODEL: dict[str, int] = {
- ScannerModel.GEMINI_2_5_FLASH: 2,
- ScannerModel.GEMINI_3_FLASH: 5,
- ScannerModel.GEMINI_3_5_FLASH: 15,
- # Retired ids, kept for observations frozen before the lineup change.
- "gemini-3.1-flash-lite-preview": 2,
+ model: info.credits_per_observation for model, info in GEMINI_MODELS.items()
}
# Unknown models bill at the highest known price: never underbill on a mapping gap.
diff --git a/products/replay_vision/backend/feedback_themes.py b/products/replay_vision/backend/feedback_themes.py
index 955dd16805b7..0ad569a7adaf 100644
--- a/products/replay_vision/backend/feedback_themes.py
+++ b/products/replay_vision/backend/feedback_themes.py
@@ -23,7 +23,7 @@ from products.replay_vision.backend.models.replay_scanner import ReplayScanner
logger = structlog.get_logger(__name__)
-_THEMES_MODEL = "gemini-3.1-flash-lite-preview"
+_THEMES_MODEL = "gemini-3.5-flash-lite"
_MODEL_CALL_TIMEOUT_MS = 90_000
MIN_FEEDBACK_FOR_THEMES = 3
_MAX_FEEDBACK_COMMENTS = 100
diff --git a/products/replay_vision/backend/migrations/0051_alter_replayscanner_model.py b/products/replay_vision/backend/migrations/0051_alter_replayscanner_model.py
new file mode 100644
index 000000000000..1dad9f4ad119
--- /dev/null
+++ b/products/replay_vision/backend/migrations/0051_alter_replayscanner_model.py
@@ -0,0 +1,23 @@
+# Generated by Django 5.2.14 on 2026-07-21 20:13
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("replay_vision", "0050_replayobservation_created_task_id"),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name="replayscanner",
+ name="model",
+ field=models.CharField(
+ choices=[
+ ("gemini-3.5-flash-lite", "Gemini 3.5 Flash Lite"),
+ ("gemini-3.6-flash", "Gemini 3.6 Flash"),
+ ],
+ max_length=64,
+ ),
+ ),
+ ]
diff --git a/products/replay_vision/backend/migrations/0052_remap_scanner_models.py b/products/replay_vision/backend/migrations/0052_remap_scanner_models.py
new file mode 100644
index 000000000000..61d71a76c99c
--- /dev/null
+++ b/products/replay_vision/backend/migrations/0052_remap_scanner_models.py
@@ -0,0 +1,25 @@
+from django.db import migrations
+
+# Superseded models move to their tier's successor (2.5 Flash is shut down by Google on 2026-10-16,
+# the other two are replaced by 3.6 Flash). Frozen observation snapshots keep the old ids.
+_MODEL_REMAP = {
+ "gemini-2.5-flash": "gemini-3.5-flash-lite",
+ "gemini-3-flash-preview": "gemini-3.6-flash",
+ "gemini-3.5-flash": "gemini-3.6-flash",
+}
+
+
+def remap_scanner_models(apps, schema_editor):
+ ReplayScanner = apps.get_model("replay_vision", "ReplayScanner")
+ for old, new in _MODEL_REMAP.items():
+ ReplayScanner.objects.filter(model=old).update(model=new)
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("replay_vision", "0051_alter_replayscanner_model"),
+ ]
+
+ operations = [
+ migrations.RunPython(remap_scanner_models, migrations.RunPython.noop, elidable=True),
+ ]
diff --git a/products/replay_vision/backend/migrations/max_migration.txt b/products/replay_vision/backend/migrations/max_migration.txt
index bb61c902c335..e2971e31a9ba 100644
--- a/products/replay_vision/backend/migrations/max_migration.txt
+++ b/products/replay_vision/backend/migrations/max_migration.txt
@@ -1 +1 @@
-0050_replayobservation_created_task_id
+0052_remap_scanner_models
diff --git a/products/replay_vision/backend/models/replay_scanner.py b/products/replay_vision/backend/models/replay_scanner.py
index 14b9c7a0d586..0dbf615c5770 100644
--- a/products/replay_vision/backend/models/replay_scanner.py
+++ b/products/replay_vision/backend/models/replay_scanner.py
@@ -32,11 +32,11 @@ class ScannerProvider(models.TextChoices):
class ScannerModel(models.TextChoices):
- """Priced per observation in `billing.OBSERVATION_CREDITS_BY_MODEL`; new members need a price there."""
+ """One model per Google tier, cheapest first. Members must mirror `billing.GEMINI_MODELS`; when
+ Google supersedes a model, swap the member and remap existing scanners in a migration (see 0052)."""
- GEMINI_2_5_FLASH = "gemini-2.5-flash", "Gemini 2.5 Flash"
- GEMINI_3_FLASH = "gemini-3-flash-preview", "Gemini 3 Flash"
- GEMINI_3_5_FLASH = "gemini-3.5-flash", "Gemini 3.5 Flash"
+ GEMINI_3_5_FLASH_LITE = "gemini-3.5-flash-lite", "Gemini 3.5 Flash Lite"
+ GEMINI_3_6_FLASH = "gemini-3.6-flash", "Gemini 3.6 Flash"
def initial_watermark() -> "datetime":
diff --git a/products/replay_vision/backend/prompt_suggestions.py b/products/replay_vision/backend/prompt_suggestions.py
index 2a2f55349c89..e5f69f64489f 100644
--- a/products/replay_vision/backend/prompt_suggestions.py
+++ b/products/replay_vision/backend/prompt_suggestions.py
@@ -45,10 +45,10 @@ from products.replay_vision.backend.proposers import get_proposer
logger = structlog.get_logger(__name__)
-_SUGGESTION_MODEL = "gemini-3.1-flash-lite-preview"
+_SUGGESTION_MODEL = "gemini-3.5-flash-lite"
_MODEL_CALL_TIMEOUT_MS = 90_000
# The agentic path digs through sessions before rewriting, so give it the stronger model.
-_AGENT_MODEL = "gemini-3-flash-preview"
+_AGENT_MODEL = "gemini-3.6-flash"
_MAX_RATED_SESSIONS = 20
_MAX_REASONING_CHARS = 280
_MAX_DISMISSED_EXAMPLES = 3
diff --git a/products/replay_vision/backend/tag_suggestions.py b/products/replay_vision/backend/tag_suggestions.py
index ed92c59479f5..551f875556b3 100644
--- a/products/replay_vision/backend/tag_suggestions.py
+++ b/products/replay_vision/backend/tag_suggestions.py
@@ -34,7 +34,7 @@ from ee.hogai.utils.untrusted import neutralize_markup
logger = structlog.get_logger(__name__)
# Cheap, fast model — this is an interactive form helper, not a recording scan.
-_SUGGESTION_MODEL = "gemini-3.1-flash-lite-preview"
+_SUGGESTION_MODEL = "gemini-3.5-flash-lite"
_MODEL_CALL_TIMEOUT_MS = 90_000
_MAX_SUGGESTIONS = 8
# Bounds on assembled context so a large team/scanner can't blow up the prompt.
diff --git a/products/replay_vision/backend/tests/test_api.py b/products/replay_vision/backend/tests/test_api.py
index cb187c939e7e..ffeb0a29fc9f 100644
--- a/products/replay_vision/backend/tests/test_api.py
+++ b/products/replay_vision/backend/tests/test_api.py
@@ -68,7 +68,7 @@ class _VisionAPITestCase(APIBaseTest):
"name": "my-scanner",
"scanner_type": ScannerType.MONITOR,
"scanner_config": {"prompt": "did the user check out?"},
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
}
defaults.update(overrides)
return ReplayScanner.objects.create(**defaults)
@@ -82,7 +82,7 @@ class TestReplayScannerViewSet(_VisionAPITestCase):
"name": "checkout-monitor",
"scanner_type": ScannerType.MONITOR,
"scanner_config": {"prompt": "did checkout complete?"},
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
},
format="json",
)
@@ -102,7 +102,7 @@ class TestReplayScannerViewSet(_VisionAPITestCase):
"name": "watermark-seed",
"scanner_type": ScannerType.MONITOR,
"scanner_config": {"prompt": "did checkout complete?"},
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
},
format="json",
)
@@ -116,7 +116,7 @@ class TestReplayScannerViewSet(_VisionAPITestCase):
"name": f"missing-{missing_field}",
"scanner_type": ScannerType.MONITOR,
"scanner_config": {"prompt": "p"},
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
}
del payload[missing_field]
resp = self.client.post(self.scanners_url, data=payload, format="json")
@@ -130,7 +130,7 @@ class TestReplayScannerViewSet(_VisionAPITestCase):
"name": "explicit-provider",
"scanner_type": ScannerType.MONITOR,
"scanner_config": {"prompt": "p"},
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
"provider": ScannerProvider.GOOGLE,
},
format="json",
@@ -146,7 +146,7 @@ class TestReplayScannerViewSet(_VisionAPITestCase):
"name": f"rate-{value}",
"scanner_type": ScannerType.MONITOR,
"scanner_config": {"prompt": "p"},
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
"sampling_rate": value,
},
format="json",
@@ -162,7 +162,7 @@ class TestReplayScannerViewSet(_VisionAPITestCase):
"name": f"rate-ok-{value}",
"scanner_type": ScannerType.MONITOR,
"scanner_config": {"prompt": "p"},
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
"sampling_rate": value,
},
format="json",
@@ -178,7 +178,7 @@ class TestReplayScannerViewSet(_VisionAPITestCase):
"name": "dup",
"scanner_type": ScannerType.MONITOR,
"scanner_config": {"prompt": "p"},
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
},
format="json",
)
@@ -193,7 +193,7 @@ class TestReplayScannerViewSet(_VisionAPITestCase):
name="theirs",
scanner_type=ScannerType.MONITOR,
scanner_config={"prompt": "p"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
)
resp = self.client.get(self.scanners_url)
self.assertEqual(resp.status_code, 200)
@@ -245,7 +245,7 @@ class TestReplayScannerViewSet(_VisionAPITestCase):
"name": f"valid-{label}",
"scanner_type": scanner_type,
"scanner_config": scanner_config,
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
},
format="json",
)
@@ -269,7 +269,7 @@ class TestReplayScannerViewSet(_VisionAPITestCase):
"name": f"invalid-{label}",
"scanner_type": scanner_type,
"scanner_config": scanner_config,
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
},
format="json",
)
@@ -379,7 +379,7 @@ class TestReplayScannerViewSet(_VisionAPITestCase):
"name": f"invalid-{label}",
"scanner_type": scanner_type,
"scanner_config": scanner_config,
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
},
format="json",
)
@@ -418,7 +418,7 @@ class TestReplayScannerViewSet(_VisionAPITestCase):
"name": "with-query",
"scanner_type": ScannerType.MONITOR,
"scanner_config": {"prompt": "p"},
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
"query": {"filter_test_accounts": True},
},
format="json",
@@ -434,7 +434,7 @@ class TestReplayScannerViewSet(_VisionAPITestCase):
"name": "stripped",
"scanner_type": ScannerType.MONITOR,
"scanner_config": {"prompt": "p"},
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
"query": {"date_from": "-7d", "date_to": "-1d", "filter_test_accounts": True},
},
format="json",
@@ -452,7 +452,7 @@ class TestReplayScannerViewSet(_VisionAPITestCase):
"name": "bad-query",
"scanner_type": ScannerType.MONITOR,
"scanner_config": {"prompt": "p"},
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
"query": {"this_field_does_not_exist": True},
},
format="json",
@@ -646,7 +646,7 @@ class TestReplayScannerViewSet(_VisionAPITestCase):
"name": "needs-recording-read",
"scanner_type": ScannerType.MONITOR,
"scanner_config": {"prompt": "p"},
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
},
format="json",
)
@@ -685,7 +685,7 @@ class TestScannerDigestProvisioning(_VisionAPITestCase):
"name": "checkout-monitor",
"scanner_type": ScannerType.MONITOR,
"scanner_config": {"prompt": "did checkout complete?"},
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
}
def test_create_provisions_daily_digest(self) -> None:
@@ -723,7 +723,7 @@ class TestScannerEstimatePersistence(_VisionAPITestCase):
"name": "estimate-persistence",
"scanner_type": ScannerType.MONITOR,
"scanner_config": {"prompt": "p"},
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
}
payload.update(overrides)
return payload
@@ -807,7 +807,7 @@ class TestScannerSignalSourceEnablement(_VisionAPITestCase):
"name": "signal-enablement",
"scanner_type": ScannerType.MONITOR,
"scanner_config": {"prompt": "p"},
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
}
payload.update(overrides)
return payload
@@ -935,7 +935,7 @@ class TestReplayObservationViewSet(_VisionAPITestCase):
name="theirs",
scanner_type=ScannerType.MONITOR,
scanner_config={"prompt": "p"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
)
resp = self.client.get(self.observations_url(str(other_scanner.id)))
self.assertEqual(resp.status_code, 404)
@@ -1571,7 +1571,7 @@ class TestObserveActionFeatureFlag(APIBaseTest):
name="off",
scanner_type=ScannerType.MONITOR,
scanner_config={"prompt": "p"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
)
resp = self.client.post(
f"/api/environments/{self.team.id}/vision/scanners/{scanner.id}/observe/",
@@ -1796,7 +1796,7 @@ class TestSessionReplayObservationViewSet(_VisionAPITestCase):
name="theirs",
scanner_type=ScannerType.MONITOR,
scanner_config={"prompt": "p"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
)
ReplayObservation.objects.create(
scanner=other_scanner,
@@ -1940,20 +1940,20 @@ class TestReplayScannerEstimateAction(ClickhouseTestMixin, _VisionAPITestCase):
self.assertEqual(body["window_days"], 30)
self.assertEqual(body["estimated_observations_per_month"], 3)
# Defaults to the baseline model when the request names none.
- self.assertEqual(body["credits_per_observation"], 5)
- self.assertEqual(body["estimated_credits_per_month"], 15)
+ self.assertEqual(body["credits_per_observation"], 15)
+ self.assertEqual(body["estimated_credits_per_month"], 45)
def test_estimate_prices_credits_at_proposed_model(self) -> None:
for index in range(3):
self._ingest_session(days_ago=index + 1)
self._ingest_session(days_ago=40)
- resp = self.client.post(self.estimate_url, data={"model": "gemini-3.5-flash"}, format="json")
+ resp = self.client.post(self.estimate_url, data={"model": "gemini-3.5-flash-lite"}, format="json")
self.assertEqual(resp.status_code, 200)
body = resp.json()
- self.assertEqual(body["credits_per_observation"], 15)
- self.assertEqual(body["estimated_credits_per_month"], body["estimated_observations_per_month"] * 15)
+ self.assertEqual(body["credits_per_observation"], 2)
+ self.assertEqual(body["estimated_credits_per_month"], body["estimated_observations_per_month"] * 2)
def test_estimate_applies_sampling(self) -> None:
for index in range(4):
@@ -1979,7 +1979,7 @@ class TestReplayScannerEstimateAction(ClickhouseTestMixin, _VisionAPITestCase):
name=name,
scanner_type=ScannerType.MONITOR,
scanner_config={"prompt": "p"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
enabled=enabled,
estimated_monthly_observations=estimate,
)
@@ -1988,13 +1988,13 @@ class TestReplayScannerEstimateAction(ClickhouseTestMixin, _VisionAPITestCase):
make("b", enabled=True, estimate=250)
make("disabled", enabled=False, estimate=999) # disabled scanners don't count
- # New scanner (no scanner_id): others = both enabled scanners, credit-weighted at 5/observation.
+ # New scanner (no scanner_id): others = both enabled scanners, credit-weighted at 15/observation.
new_body = self.client.post(self.estimate_url, data={}, format="json").json()
- self.assertEqual(new_body["other_enabled_scanners_monthly_credits"], 350 * 5)
+ self.assertEqual(new_body["other_enabled_scanners_monthly_credits"], 350 * 15)
# Editing scanner `a`: its own stored estimate is excluded so the forecast won't double-count it.
edit_body = self.client.post(self.estimate_url, data={"scanner_id": str(a.id)}, format="json").json()
- self.assertEqual(edit_body["other_enabled_scanners_monthly_credits"], 250 * 5)
+ self.assertEqual(edit_body["other_enabled_scanners_monthly_credits"], 250 * 15)
def test_estimate_rejects_scanner_id_outside_the_request_team(self) -> None:
# A scanner_id from another team (even same org) must be rejected, not silently excluded from the others-sum.
@@ -2004,7 +2004,7 @@ class TestReplayScannerEstimateAction(ClickhouseTestMixin, _VisionAPITestCase):
name="theirs",
scanner_type=ScannerType.MONITOR,
scanner_config={"prompt": "p"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
enabled=True,
estimated_monthly_observations=500,
)
diff --git a/products/replay_vision/backend/tests/test_billing.py b/products/replay_vision/backend/tests/test_billing.py
index 4154c9a4be11..aaf125faf8a2 100644
--- a/products/replay_vision/backend/tests/test_billing.py
+++ b/products/replay_vision/backend/tests/test_billing.py
@@ -7,9 +7,11 @@ from django.utils import timezone
from products.replay_vision.backend.billing import (
_FALLBACK_CREDITS,
+ GEMINI_MODELS,
OBSERVATION_CREDITS_BY_MODEL,
get_replay_vision_credits_by_team,
observation_credits_for_model,
+ suggested_observation_credits,
)
from products.replay_vision.backend.models.replay_observation_usage import ReplayObservationUsage
from products.replay_vision.backend.models.replay_scanner import ScannerModel
@@ -21,7 +23,7 @@ class TestReplayVisionBillingUsage(APIBaseTest):
*,
team_id: int | None,
created_at: datetime,
- model: str = ScannerModel.GEMINI_3_FLASH,
+ model: str = ScannerModel.GEMINI_3_6_FLASH,
credits: int | None = None,
) -> None:
receipt = ReplayObservationUsage.objects.create(
@@ -40,13 +42,13 @@ class TestReplayVisionBillingUsage(APIBaseTest):
begin = now - timedelta(days=1)
end = now + timedelta(days=1)
# Two in-window at different model prices, one out-of-window, one for another team.
- self._receipt(team_id=self.team.id, created_at=now, model=ScannerModel.GEMINI_3_FLASH)
- self._receipt(team_id=self.team.id, created_at=now, model=ScannerModel.GEMINI_3_5_FLASH)
+ self._receipt(team_id=self.team.id, created_at=now, model=ScannerModel.GEMINI_3_6_FLASH)
+ self._receipt(team_id=self.team.id, created_at=now, model=ScannerModel.GEMINI_3_5_FLASH_LITE)
self._receipt(team_id=self.team.id, created_at=now - timedelta(days=3))
- self._receipt(team_id=self.team.id + 1, created_at=now, model=ScannerModel.GEMINI_2_5_FLASH)
+ self._receipt(team_id=self.team.id + 1, created_at=now, model=ScannerModel.GEMINI_3_6_FLASH)
result = dict(get_replay_vision_credits_by_team(begin, end))
- assert result == {self.team.id: 5 + 15, self.team.id + 1: 2}
+ assert result == {self.team.id: 15 + 2, self.team.id + 1: 15}
def test_sums_frozen_receipt_credits_not_live_prices(self) -> None:
# A receipt priced before a table change keeps billing at its frozen amount.
@@ -61,7 +63,7 @@ class TestReplayVisionBillingUsage(APIBaseTest):
self._receipt(team_id=self.team.id, created_at=now)
result = get_replay_vision_credits_by_team(now - timedelta(hours=1), now + timedelta(hours=1))
- assert result == [(self.team.id, 5)]
+ assert result == [(self.team.id, 15)]
def test_window_is_end_exclusive(self) -> None:
boundary = datetime(2026, 7, 1, tzinfo=UTC)
@@ -74,7 +76,17 @@ class TestReplayVisionBillingUsage(APIBaseTest):
assert _FALLBACK_CREDITS == max(OBSERVATION_CREDITS_BY_MODEL.values())
-def test_every_scanner_model_has_a_credit_price() -> None:
- # A new ScannerModel member without a price would bill at the max fallback; catch it at PR time.
- unpriced = set(ScannerModel.values) - set(OBSERVATION_CREDITS_BY_MODEL)
- assert not unpriced, f"ScannerModel members missing from OBSERVATION_CREDITS_BY_MODEL: {unpriced}"
+def test_gemini_models_config_mirrors_scanner_model_enum() -> None:
+ # A new ScannerModel member without a GEMINI_MODELS row would bill at the max fallback, and a row
+ # left non-retired after its enum member is removed would misrepresent the lineup; catch both at PR time.
+ current = {model for model, info in GEMINI_MODELS.items() if not info.retired}
+ assert current == set(ScannerModel.values), (
+ f"GEMINI_MODELS current lineup {current} does not mirror ScannerModel {set(ScannerModel.values)}"
+ )
+
+
+def test_flash_credit_price_tracks_the_margin_formula() -> None:
+ # The flash price is contractually the formula output (the budget tier is pinned below it), so a
+ # token price or margin change here must come with a conscious repricing, not silently stale credits.
+ flash = GEMINI_MODELS[ScannerModel.GEMINI_3_6_FLASH]
+ assert flash.credits_per_observation == suggested_observation_credits(flash)
diff --git a/products/replay_vision/backend/tests/test_estimate_refresh.py b/products/replay_vision/backend/tests/test_estimate_refresh.py
index 305ccb410222..9a2242c3f610 100644
--- a/products/replay_vision/backend/tests/test_estimate_refresh.py
+++ b/products/replay_vision/backend/tests/test_estimate_refresh.py
@@ -49,7 +49,7 @@ def _make_scanner(**overrides: Any) -> ReplayScanner:
"name": "estimate-scanner",
"scanner_type": ScannerType.MONITOR,
"scanner_config": {"prompt": "p"},
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
}
defaults.update(overrides)
return ReplayScanner.objects.create(**defaults)
diff --git a/products/replay_vision/backend/tests/test_facade.py b/products/replay_vision/backend/tests/test_facade.py
index a28d8ef98d98..788b10b3e49e 100644
--- a/products/replay_vision/backend/tests/test_facade.py
+++ b/products/replay_vision/backend/tests/test_facade.py
@@ -31,7 +31,7 @@ class TestFetchPageSessionObservations(APIBaseTest):
name=name,
scanner_type=scanner_type,
scanner_config={"prompt": "summarize the session"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
)
def _observation(self, scanner: ReplayScanner, session_id: str, model_output: dict) -> ReplayObservation:
diff --git a/products/replay_vision/backend/tests/test_impact.py b/products/replay_vision/backend/tests/test_impact.py
index 9ccd830bfe8a..c7d249660f12 100644
--- a/products/replay_vision/backend/tests/test_impact.py
+++ b/products/replay_vision/backend/tests/test_impact.py
@@ -39,7 +39,7 @@ class _ImpactTestCase(APIBaseTest):
name=f"impact-{scanner_type}-{ReplayScanner.objects.count()}",
scanner_type=scanner_type,
scanner_config={"prompt": "p"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
)
def _make_observation(
diff --git a/products/replay_vision/backend/tests/test_max_tools.py b/products/replay_vision/backend/tests/test_max_tools.py
index cb7c5616a5e4..b0aae04db8f9 100644
--- a/products/replay_vision/backend/tests/test_max_tools.py
+++ b/products/replay_vision/backend/tests/test_max_tools.py
@@ -101,7 +101,7 @@ class TestSearchReplayVisionObservationsTool(BaseTest):
name=name,
scanner_type=scanner_type,
scanner_config={"prompt": "rate frustration"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
)
def _create_observation(self, scanner: ReplayScanner, session_id: str, model_output: dict) -> ReplayObservation:
diff --git a/products/replay_vision/backend/tests/test_migration_backfill.py b/products/replay_vision/backend/tests/test_migration_backfill.py
index 681b749b0014..88a0ed5ce678 100644
--- a/products/replay_vision/backend/tests/test_migration_backfill.py
+++ b/products/replay_vision/backend/tests/test_migration_backfill.py
@@ -28,7 +28,7 @@ class TestReceiptBackfillMigrations(APIBaseTest):
name="s",
scanner_type=ScannerType.MONITOR,
scanner_config={"prompt": "p"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
)
obs = ReplayObservation.objects.create(
scanner=scanner,
diff --git a/products/replay_vision/backend/tests/test_models.py b/products/replay_vision/backend/tests/test_models.py
index e15413f4560f..fef418c5cd9a 100644
--- a/products/replay_vision/backend/tests/test_models.py
+++ b/products/replay_vision/backend/tests/test_models.py
@@ -19,7 +19,7 @@ def _make_scanner(team, **overrides) -> ReplayScanner:
"name": "my-scanner",
"scanner_type": ScannerType.MONITOR,
"scanner_config": {"prompt": "test"},
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
}
defaults.update(overrides)
return ReplayScanner.objects.create(**defaults)
@@ -52,7 +52,7 @@ class TestReplayScanner(BaseTest):
name="shared",
scanner_type=ScannerType.MONITOR,
scanner_config={"prompt": "test"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
)
def test_str_includes_name_and_type(self) -> None:
@@ -85,7 +85,7 @@ class TestReplayScanner(BaseTest):
("scanner_config", {"prompt": "different prompt"}),
("query", {"properties": [{"key": "foo"}]}),
("sampling_rate", 0.25),
- ("model", ScannerModel.GEMINI_2_5_FLASH),
+ ("model", ScannerModel.GEMINI_3_5_FLASH_LITE),
("emits_signals", True),
]
)
@@ -198,7 +198,7 @@ class TestReplayObservation(BaseTest):
name="other-scanner",
scanner_type=ScannerType.MONITOR,
scanner_config={"prompt": "test"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
)
self._create_observation(scanner_a, session_id="shared-session")
self._create_observation(scanner_b, session_id="shared-session")
@@ -265,7 +265,7 @@ class TestReplayObservation(BaseTest):
name="doomed",
scanner_type=ScannerType.MONITOR,
scanner_config={"prompt": "test"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
)
self._create_observation(scanner, session_id="doomed-session")
scanner_id = scanner.id
diff --git a/products/replay_vision/backend/tests/test_quota.py b/products/replay_vision/backend/tests/test_quota.py
index 8ce30ca2f1ee..c55ff21d6aa4 100644
--- a/products/replay_vision/backend/tests/test_quota.py
+++ b/products/replay_vision/backend/tests/test_quota.py
@@ -38,7 +38,7 @@ class _VisionQuotaTestCase(APIBaseTest):
name="quota-test-scanner",
scanner_type=ScannerType.MONITOR,
scanner_config={"prompt": "p"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
)
def tearDown(self) -> None:
@@ -109,13 +109,12 @@ class _VisionQuotaTestCase(APIBaseTest):
class TestComputeQuotaSnapshot(_VisionQuotaTestCase):
@parameterized.expand(
[
- (ObservationStatus.SUCCEEDED, ScannerModel.GEMINI_2_5_FLASH, 2),
- (ObservationStatus.SUCCEEDED, ScannerModel.GEMINI_3_FLASH, 5),
- (ObservationStatus.SUCCEEDED, ScannerModel.GEMINI_3_5_FLASH, 15),
- (ObservationStatus.PENDING, ScannerModel.GEMINI_3_5_FLASH, 15),
- (ObservationStatus.RUNNING, ScannerModel.GEMINI_3_FLASH, 5),
- (ObservationStatus.FAILED, ScannerModel.GEMINI_3_FLASH, 0),
- (ObservationStatus.INELIGIBLE, ScannerModel.GEMINI_3_FLASH, 0),
+ (ObservationStatus.SUCCEEDED, ScannerModel.GEMINI_3_5_FLASH_LITE, 2),
+ (ObservationStatus.SUCCEEDED, ScannerModel.GEMINI_3_6_FLASH, 15),
+ (ObservationStatus.PENDING, ScannerModel.GEMINI_3_5_FLASH_LITE, 2),
+ (ObservationStatus.RUNNING, ScannerModel.GEMINI_3_6_FLASH, 15),
+ (ObservationStatus.FAILED, ScannerModel.GEMINI_3_6_FLASH, 0),
+ (ObservationStatus.INELIGIBLE, ScannerModel.GEMINI_3_6_FLASH, 0),
]
)
def test_credits_priced_by_model_for_succeeded_and_in_flight(
@@ -160,7 +159,7 @@ class TestComputeQuotaSnapshot(_VisionQuotaTestCase):
self._make_observation(
status=ObservationStatus.SUCCEEDED, completed_at=timezone.now(), created_at=snapshot.period_end
)
- assert compute_quota_snapshot(organization_id=self.organization.id).credits_used == 5
+ assert compute_quota_snapshot(organization_id=self.organization.id).credits_used == 15
def test_other_orgs_observations_not_counted(self) -> None:
other_org = Organization.objects.create(name="other-org")
@@ -170,7 +169,7 @@ class TestComputeQuotaSnapshot(_VisionQuotaTestCase):
name="other-scanner",
scanner_type=ScannerType.MONITOR,
scanner_config={"prompt": "p"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
)
other_obs = ReplayObservation.objects.create(
scanner=other_scanner,
@@ -203,13 +202,13 @@ class TestComputeQuotaSnapshot(_VisionQuotaTestCase):
assert compute_quota_snapshot(organization_id=self.organization.id).credits_used == expected
def test_exhausted_when_usage_meets_quota(self) -> None:
- with patch("products.replay_vision.backend.quota.MONTHLY_CREDIT_QUOTA", 10):
+ with patch("products.replay_vision.backend.quota.MONTHLY_CREDIT_QUOTA", 30):
self._make_observation(status=ObservationStatus.SUCCEEDED, completed_at=timezone.now())
self._make_observation(status=ObservationStatus.SUCCEEDED, completed_at=timezone.now())
snapshot = compute_quota_snapshot(organization_id=self.organization.id)
- assert snapshot.credits_used == 10
+ assert snapshot.credits_used == 30
assert snapshot.exhausted is True
assert snapshot.remaining == 0
@@ -217,31 +216,31 @@ class TestComputeQuotaSnapshot(_VisionQuotaTestCase):
# Deleting a scanner cascade-deletes its observations, but the usage they spent must not be refunded.
for _ in range(3):
self._make_observation(status=ObservationStatus.SUCCEEDED, completed_at=timezone.now())
- assert compute_quota_snapshot(organization_id=self.organization.id).credits_used == 15
+ assert compute_quota_snapshot(organization_id=self.organization.id).credits_used == 45
self.scanner.delete()
assert ReplayObservation.objects.filter(team=self.team).count() == 0 # observations cascade-deleted
- assert compute_quota_snapshot(organization_id=self.organization.id).credits_used == 15 # receipts survive
+ assert compute_quota_snapshot(organization_id=self.organization.id).credits_used == 45 # receipts survive
def test_deleting_observation_does_not_refund_spent_usage(self) -> None:
observation = self._make_observation(status=ObservationStatus.SUCCEEDED, completed_at=timezone.now())
- assert compute_quota_snapshot(organization_id=self.organization.id).credits_used == 5
+ assert compute_quota_snapshot(organization_id=self.organization.id).credits_used == 15
observation.delete() # e.g. the admin recording-delete flow
- assert compute_quota_snapshot(organization_id=self.organization.id).credits_used == 5
+ assert compute_quota_snapshot(organization_id=self.organization.id).credits_used == 15
def test_no_double_count_across_pending_to_succeeded(self) -> None:
observation = self._make_observation(status=ObservationStatus.PENDING)
- assert compute_quota_snapshot(organization_id=self.organization.id).credits_used == 5 # reserved in-flight
+ assert compute_quota_snapshot(organization_id=self.organization.id).credits_used == 15 # reserved in-flight
- # The success transition flips status and writes the receipt, so the total stays 5.
+ # The success transition flips status and writes the receipt, so the total stays 15.
ReplayObservation.objects.filter(pk=observation.pk).update(
status=ObservationStatus.SUCCEEDED, completed_at=timezone.now()
)
self._make_receipt(observation)
- assert compute_quota_snapshot(organization_id=self.organization.id).credits_used == 5
+ assert compute_quota_snapshot(organization_id=self.organization.id).credits_used == 15
class TestBillingSyncedQuota(_VisionQuotaTestCase):
@@ -337,7 +336,7 @@ class TestProjectedMonthlyObservations(_VisionQuotaTestCase):
name: str,
enabled: bool = True,
estimate: int | None = None,
- model: ScannerModel = ScannerModel.GEMINI_3_FLASH,
+ model: ScannerModel = ScannerModel.GEMINI_3_6_FLASH,
) -> None:
scanner = ReplayScanner.objects.create(
team=team,
@@ -355,9 +354,9 @@ class TestProjectedMonthlyObservations(_VisionQuotaTestCase):
def test_sums_credit_weighted_estimates_across_org_teams(self) -> None:
other_team = Team.objects.create(organization=self.organization, name="second-team")
self._make_scanner(team=self.team, name="a", estimate=100) # 100 × 5 credits
- self._make_scanner(team=other_team, name="b", estimate=250, model=ScannerModel.GEMINI_3_5_FLASH) # 250 × 15
+ self._make_scanner(team=other_team, name="b", estimate=250, model=ScannerModel.GEMINI_3_5_FLASH_LITE) # 250 × 2
snapshot = compute_quota_snapshot(organization_id=self.organization.id)
- assert snapshot.projected_monthly_credits == 100 * 5 + 250 * 15
+ assert snapshot.projected_monthly_credits == 100 * 15 + 250 * 2
def test_disabled_and_unestimated_scanners_contribute_zero(self) -> None:
self._make_scanner(team=self.team, name="disabled", enabled=False, estimate=500)
@@ -432,7 +431,7 @@ class TestQuotaGrants(_VisionQuotaTestCase):
assert expected_field in cm.exception.message_dict
def test_grant_pushes_exhaustion_back(self) -> None:
- with patch("products.replay_vision.backend.quota.MONTHLY_CREDIT_QUOTA", 10):
+ with patch("products.replay_vision.backend.quota.MONTHLY_CREDIT_QUOTA", 30):
self._make_observation(status=ObservationStatus.SUCCEEDED, completed_at=timezone.now())
self._make_observation(status=ObservationStatus.SUCCEEDED, completed_at=timezone.now())
assert compute_quota_snapshot(organization_id=self.organization.id).exhausted is True
@@ -495,15 +494,15 @@ class TestVisionQuotaEndpoint(_VisionQuotaTestCase):
estimated_monthly_observations=120, estimated_at=timezone.now()
)
resp = self.client.get(self.quota_url)
- assert resp.json()["projected_monthly_credits"] == 120 * 5
+ assert resp.json()["projected_monthly_credits"] == 120 * 15
def test_reflects_recent_succeeded_observations(self) -> None:
for _ in range(3):
self._make_observation(status=ObservationStatus.SUCCEEDED, completed_at=timezone.now())
resp = self.client.get(self.quota_url)
- assert resp.json()["credits_used"] == 15
- assert resp.json()["remaining"] == MONTHLY_CREDIT_QUOTA - 15
+ assert resp.json()["credits_used"] == 45
+ assert resp.json()["remaining"] == MONTHLY_CREDIT_QUOTA - 45
def test_requires_feature_flag(self) -> None:
with patch(
@@ -539,9 +538,9 @@ class TestObserveQuotaEnforcement(_VisionQuotaTestCase):
def test_returns_402_when_observation_would_exceed_remaining(
self, mock_sync_connect: MagicMock, mock_async_to_sync: MagicMock
) -> None:
- # Not exhausted (5 of 8 used), but the next 5-credit observation would land at 10 > 8. The precheck
+ # Not exhausted (15 of 25 used), but the next 15-credit observation would land at 30 > 25. The precheck
# must reject it rather than only blocking once fully exhausted.
- with patch("products.replay_vision.backend.quota.MONTHLY_CREDIT_QUOTA", 8):
+ with patch("products.replay_vision.backend.quota.MONTHLY_CREDIT_QUOTA", 25):
self._make_observation(status=ObservationStatus.SUCCEEDED, completed_at=timezone.now())
assert not compute_quota_snapshot(organization_id=self.organization.id).exhausted
diff --git a/products/replay_vision/backend/tests/test_reconciler.py b/products/replay_vision/backend/tests/test_reconciler.py
index 1d43f85d5fbf..99af61129450 100644
--- a/products/replay_vision/backend/tests/test_reconciler.py
+++ b/products/replay_vision/backend/tests/test_reconciler.py
@@ -70,7 +70,7 @@ def _make_scanner(team: Team, **overrides: Any) -> ReplayScanner:
"name": "reconciler-scanner",
"scanner_type": ScannerType.MONITOR,
"scanner_config": {"prompt": "p"},
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
}
defaults.update(overrides)
return ReplayScanner.objects.create(**defaults)
diff --git a/products/replay_vision/backend/tests/test_scanners.py b/products/replay_vision/backend/tests/test_scanners.py
index 07364fda40d1..d2b32343d7c2 100644
--- a/products/replay_vision/backend/tests/test_scanners.py
+++ b/products/replay_vision/backend/tests/test_scanners.py
@@ -28,7 +28,7 @@ def _build_replay_scanner(**overrides) -> ReplayScanner:
"name": "test-scanner",
"scanner_type": ScannerType.MONITOR,
"scanner_config": {"prompt": "did the user export?"},
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
"emits_signals": False,
}
defaults.update(overrides)
diff --git a/products/replay_vision/backend/tests/test_schedule.py b/products/replay_vision/backend/tests/test_schedule.py
index 5640ee86695d..a3a8ab9475c6 100644
--- a/products/replay_vision/backend/tests/test_schedule.py
+++ b/products/replay_vision/backend/tests/test_schedule.py
@@ -46,7 +46,7 @@ def _make_scanner(team: Team, **overrides: Any) -> ReplayScanner:
"name": "schedule-scanner",
"scanner_type": ScannerType.MONITOR,
"scanner_config": {"prompt": "p"},
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
}
defaults.update(overrides)
return ReplayScanner.objects.create(**defaults)
diff --git a/products/replay_vision/backend/tests/test_sweep.py b/products/replay_vision/backend/tests/test_sweep.py
index bf6410cca80a..fed90cce958a 100644
--- a/products/replay_vision/backend/tests/test_sweep.py
+++ b/products/replay_vision/backend/tests/test_sweep.py
@@ -48,7 +48,7 @@ def _make_scanner(**overrides) -> ReplayScanner:
"name": "sweep-scanner",
"scanner_type": ScannerType.MONITOR,
"scanner_config": {"prompt": "p"},
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
}
defaults.update(overrides)
return ReplayScanner.objects.create(**defaults)
diff --git a/products/replay_vision/backend/tests/test_temporal.py b/products/replay_vision/backend/tests/test_temporal.py
index 23efbbbedf66..f93bea51e3f4 100644
--- a/products/replay_vision/backend/tests/test_temporal.py
+++ b/products/replay_vision/backend/tests/test_temporal.py
@@ -145,7 +145,7 @@ def _make_scanner(**overrides) -> ReplayScanner:
"name": "t",
"scanner_type": ScannerType.MONITOR,
"scanner_config": {"prompt": "p"},
- "model": ScannerModel.GEMINI_3_FLASH,
+ "model": ScannerModel.GEMINI_3_6_FLASH,
}
defaults.update(overrides)
return ReplayScanner.objects.create(**defaults)
@@ -172,7 +172,7 @@ class TestCountInFlightAppliesActivity:
name="sibling",
scanner_type=ScannerType.MONITOR,
scanner_config={"prompt": "p"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
)
other_team_scanner = _make_scanner() # fresh org+team
_make_observation(scanner, session_id="s1", status=ObservationStatus.PENDING)
diff --git a/products/replay_vision/backend/tests/test_vision_action_alerts.py b/products/replay_vision/backend/tests/test_vision_action_alerts.py
index 8974bb65cef8..294d568fff41 100644
--- a/products/replay_vision/backend/tests/test_vision_action_alerts.py
+++ b/products/replay_vision/backend/tests/test_vision_action_alerts.py
@@ -33,7 +33,7 @@ class TestVisionActionAlerts(BaseTest):
name=name,
scanner_type=scanner_type,
scanner_config={"prompt": "watch"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
)
def _observation(
diff --git a/products/replay_vision/backend/tests/test_vision_action_delivery.py b/products/replay_vision/backend/tests/test_vision_action_delivery.py
index c233a87b7339..928aca66ed8b 100644
--- a/products/replay_vision/backend/tests/test_vision_action_delivery.py
+++ b/products/replay_vision/backend/tests/test_vision_action_delivery.py
@@ -49,7 +49,7 @@ class TestVisionActionDelivery(APIBaseTest):
name="my-scanner",
scanner_type=ScannerType.MONITOR,
scanner_config={"prompt": "did the user check out?"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
)
def _create_slack_integration(self) -> Integration:
diff --git a/products/replay_vision/backend/tests/test_vision_action_engine.py b/products/replay_vision/backend/tests/test_vision_action_engine.py
index cc845d793397..8e99cf09b6ac 100644
--- a/products/replay_vision/backend/tests/test_vision_action_engine.py
+++ b/products/replay_vision/backend/tests/test_vision_action_engine.py
@@ -45,7 +45,7 @@ def _action(team, **overrides) -> VisionAction:
name=f"scanner-{uuid.uuid4().hex[:8]}",
scanner_type=ScannerType.SUMMARIZER,
scanner_config={"prompt": "x"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
)
defaults: dict = {"team": team, "name": "a", "trigger_config": {"rrule": DAILY, "timezone": "UTC"}}
defaults.update(overrides)
@@ -60,7 +60,7 @@ def _scanner(team) -> ReplayScanner:
name=f"scanner-{uuid.uuid4().hex[:8]}",
scanner_type=ScannerType.SUMMARIZER,
scanner_config={"prompt": "x"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
)
diff --git a/products/replay_vision/backend/tests/test_vision_action_models.py b/products/replay_vision/backend/tests/test_vision_action_models.py
index 673b36fc1b7c..d54375e6d3c9 100644
--- a/products/replay_vision/backend/tests/test_vision_action_models.py
+++ b/products/replay_vision/backend/tests/test_vision_action_models.py
@@ -31,7 +31,7 @@ def _make_action(team, **overrides) -> VisionAction:
name=f"scanner-{uuid.uuid4().hex[:8]}",
scanner_type=ScannerType.SUMMARIZER,
scanner_config={"prompt": "x"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
)
defaults: dict = {
"team": team,
@@ -151,7 +151,7 @@ class TestVisionActionModel(BaseTest):
name="scanner",
scanner_type=ScannerType.SUMMARIZER,
scanner_config={"prompt": "x"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
)
action = self._create_action(scanner=scanner)
scanner.delete()
diff --git a/products/replay_vision/backend/tests/test_vision_action_synthesis.py b/products/replay_vision/backend/tests/test_vision_action_synthesis.py
index 086204314005..278134a60c35 100644
--- a/products/replay_vision/backend/tests/test_vision_action_synthesis.py
+++ b/products/replay_vision/backend/tests/test_vision_action_synthesis.py
@@ -54,7 +54,7 @@ class TestVisionActionSynthesis(BaseTest):
name="summarizer",
scanner_type=ScannerType.SUMMARIZER,
scanner_config={"prompt": "summarize"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
)
def _observation(self, summary: str, title: str | None = None, session_id: str = "s1") -> ReplayObservation:
@@ -456,7 +456,7 @@ class TestVisionActionSynthesis(BaseTest):
name="hidden",
scanner_type=ScannerType.CLASSIFIER,
scanner_config={"prompt": "classify"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
)
self._observation("visible scanner output", session_id="visible")
ReplayObservation.objects.create(
diff --git a/products/replay_vision/backend/tests/test_vision_actions_api.py b/products/replay_vision/backend/tests/test_vision_actions_api.py
index 881214e8e00a..86534f751a4d 100644
--- a/products/replay_vision/backend/tests/test_vision_actions_api.py
+++ b/products/replay_vision/backend/tests/test_vision_actions_api.py
@@ -50,7 +50,7 @@ class _VisionActionAPITestCase(APIBaseTest):
name=name,
scanner_type=ScannerType.MONITOR,
scanner_config={"prompt": "did the user check out?"},
- model=ScannerModel.GEMINI_3_FLASH,
+ model=ScannerModel.GEMINI_3_6_FLASH,
)
def _create_slack_integration(self, team: Team | None = None) -> Integration:
diff --git a/products/replay_vision/frontend/generated/api.schemas.ts b/products/replay_vision/frontend/generated/api.schemas.ts
index cfb2c8c2b119..3634f1d734f3 100644
--- a/products/replay_vision/frontend/generated/api.schemas.ts
+++ b/products/replay_vision/frontend/generated/api.schemas.ts
@@ -701,16 +701,14 @@ export const ScannerProviderEnumApi = {
} as const
/**
- * * `gemini-2.5-flash` - Gemini 2.5 Flash
- * * `gemini-3-flash-preview` - Gemini 3 Flash
- * * `gemini-3.5-flash` - Gemini 3.5 Flash
+ * * `gemini-3.5-flash-lite` - Gemini 3.5 Flash Lite
+ * * `gemini-3.6-flash` - Gemini 3.6 Flash
*/
export type ScannerModelEnumApi = (typeof ScannerModelEnumApi)[keyof typeof ScannerModelEnumApi]
export const ScannerModelEnumApi = {
- Gemini25Flash: 'gemini-2.5-flash',
- Gemini3FlashPreview: 'gemini-3-flash-preview',
- Gemini35Flash: 'gemini-3.5-flash',
+ Gemini35FlashLite: 'gemini-3.5-flash-lite',
+ Gemini36Flash: 'gemini-3.6-flash',
} as const
export interface FeedbackThemeSessionApi {
@@ -781,9 +779,8 @@ export interface ReplayScannerApi {
provider?: ScannerProviderEnumApi
/** Concrete model to use for this scanner.
*
- * * `gemini-2.5-flash` - Gemini 2.5 Flash
- * * `gemini-3-flash-preview` - Gemini 3 Flash
- * * `gemini-3.5-flash` - Gemini 3.5 Flash */
+ * * `gemini-3.5-flash-lite` - Gemini 3.5 Flash Lite
+ * * `gemini-3.6-flash` - Gemini 3.6 Flash */
model: ScannerModelEnumApi
/** When false, the reconciler removes the scanner's Temporal schedule. On-demand triggers still work. */
enabled?: boolean
@@ -865,9 +862,8 @@ export interface PatchedReplayScannerApi {
provider?: ScannerProviderEnumApi
/** Concrete model to use for this scanner.
*
- * * `gemini-2.5-flash` - Gemini 2.5 Flash
- * * `gemini-3-flash-preview` - Gemini 3 Flash
- * * `gemini-3.5-flash` - Gemini 3.5 Flash */
+ * * `gemini-3.5-flash-lite` - Gemini 3.5 Flash Lite
+ * * `gemini-3.6-flash` - Gemini 3.6 Flash */
model?: ScannerModelEnumApi
/** When false, the reconciler removes the scanner's Temporal schedule. On-demand triggers still work. */
enabled?: boolean
@@ -1298,9 +1294,8 @@ export interface EstimateRequestApi {
scanner_id?: string | null
/** Proposed model; determines `credits_per_observation` in the response.
*
- * * `gemini-2.5-flash` - Gemini 2.5 Flash
- * * `gemini-3-flash-preview` - Gemini 3 Flash
- * * `gemini-3.5-flash` - Gemini 3.5 Flash */
+ * * `gemini-3.5-flash-lite` - Gemini 3.5 Flash Lite
+ * * `gemini-3.6-flash` - Gemini 3.6 Flash */
model?: ScannerModelEnumApi
}
diff --git a/products/replay_vision/frontend/generated/api.zod.ts b/products/replay_vision/frontend/generated/api.zod.ts
index 0a0b1dfa11c6..968ce9672b03 100644
--- a/products/replay_vision/frontend/generated/api.zod.ts
+++ b/products/replay_vision/frontend/generated/api.zod.ts
@@ -410,12 +410,10 @@ export const VisionScannersCreateBody = /* @__PURE__ */ zod.object({
.optional()
.describe('LLM provider. v1 is Google-only.\n\n\* `google` - Google'),
model: zod
- .enum(['gemini-2.5-flash', 'gemini-3-flash-preview', 'gemini-3.5-flash'])
+ .enum(['gemini-3.5-flash-lite', 'gemini-3.6-flash'])
+ .describe('\* `gemini-3.5-flash-lite` - Gemini 3.5 Flash Lite\n\* `gemini-3.6-flash` - Gemini 3.6 Flash')
.describe(
- '\* `gemini-2.5-flash` - Gemini 2.5 Flash\n\* `gemini-3-flash-preview` - Gemini 3 Flash\n\* `gemini-3.5-flash` - Gemini 3.5 Flash'
- )
- .describe(
- 'Concrete model to use for this scanner.\n\n\* `gemini-2.5-flash` - Gemini 2.5 Flash\n\* `gemini-3-flash-preview` - Gemini 3 Flash\n\* `gemini-3.5-flash` - Gemini 3.5 Flash'
+ 'Concrete model to use for this scanner.\n\n\* `gemini-3.5-flash-lite` - Gemini 3.5 Flash Lite\n\* `gemini-3.6-flash` - Gemini 3.6 Flash'
),
enabled: zod
.boolean()
@@ -492,13 +490,11 @@ export const VisionScannersPartialUpdateBody = /* @__PURE__ */ zod.object({
.optional()
.describe('LLM provider. v1 is Google-only.\n\n\* `google` - Google'),
model: zod
- .enum(['gemini-2.5-flash', 'gemini-3-flash-preview', 'gemini-3.5-flash'])
- .describe(
- '\* `gemini-2.5-flash` - Gemini 2.5 Flash\n\* `gemini-3-flash-preview` - Gemini 3 Flash\n\* `gemini-3.5-flash` - Gemini 3.5 Flash'
- )
+ .enum(['gemini-3.5-flash-lite', 'gemini-3.6-flash'])
+ .describe('\* `gemini-3.5-flash-lite` - Gemini 3.5 Flash Lite\n\* `gemini-3.6-flash` - Gemini 3.6 Flash')
.optional()
.describe(
- 'Concrete model to use for this scanner.\n\n\* `gemini-2.5-flash` - Gemini 2.5 Flash\n\* `gemini-3-flash-preview` - Gemini 3 Flash\n\* `gemini-3.5-flash` - Gemini 3.5 Flash'
+ 'Concrete model to use for this scanner.\n\n\* `gemini-3.5-flash-lite` - Gemini 3.5 Flash Lite\n\* `gemini-3.6-flash` - Gemini 3.6 Flash'
),
enabled: zod
.boolean()
@@ -624,7 +620,7 @@ export const visionScannersEstimateCreateBodySamplingRateMin = 0
export const visionScannersEstimateCreateBodySamplingRateMax = 1
export const visionScannersEstimateCreateBodySamplingModeDefault = `comprehensive`
-export const visionScannersEstimateCreateBodyModelDefault = `gemini-3-flash-preview`
+export const visionScannersEstimateCreateBodyModelDefault = `gemini-3.6-flash`
export const VisionScannersEstimateCreateBody = /* @__PURE__ */ zod
.object({
@@ -654,13 +650,11 @@ export const VisionScannersEstimateCreateBody = /* @__PURE__ */ zod
"The scanner being edited, excluded from `other_enabled_scanners_monthly_credits` so its stored estimate isn't double-counted in the forecast. Omit (or null) when estimating a brand-new scanner."
),
model: zod
- .enum(['gemini-2.5-flash', 'gemini-3-flash-preview', 'gemini-3.5-flash'])
- .describe(
- '\* `gemini-2.5-flash` - Gemini 2.5 Flash\n\* `gemini-3-flash-preview` - Gemini 3 Flash\n\* `gemini-3.5-flash` - Gemini 3.5 Flash'
- )
+ .enum(['gemini-3.5-flash-lite', 'gemini-3.6-flash'])
+ .describe('\* `gemini-3.5-flash-lite` - Gemini 3.5 Flash Lite\n\* `gemini-3.6-flash` - Gemini 3.6 Flash')
.default(visionScannersEstimateCreateBodyModelDefault)
.describe(
- 'Proposed model; determines `credits_per_observation` in the response.\n\n\* `gemini-2.5-flash` - Gemini 2.5 Flash\n\* `gemini-3-flash-preview` - Gemini 3 Flash\n\* `gemini-3.5-flash` - Gemini 3.5 Flash'
+ 'Proposed model; determines `credits_per_observation` in the response.\n\n\* `gemini-3.5-flash-lite` - Gemini 3.5 Flash Lite\n\* `gemini-3.6-flash` - Gemini 3.6 Flash'
),
})
.describe('Body of POST \/vision\/scanners\/estimate\/ — a proposed, unsaved scanner config.')
diff --git a/products/replay_vision/frontend/replay_scanners/ReplayScannersScene.stories.tsx b/products/replay_vision/frontend/replay_scanners/ReplayScannersScene.stories.tsx
index 2bbd0dce245f..f1e4f6406f1c 100644
--- a/products/replay_vision/frontend/replay_scanners/ReplayScannersScene.stories.tsx
+++ b/products/replay_vision/frontend/replay_scanners/ReplayScannersScene.stories.tsx
@@ -35,7 +35,7 @@ const scanner = (overrides: Partial<ReplayScannerApi> = {}): ReplayScannerApi =>
query: null,
sampling_rate: 1,
provider: 'google',
- model: 'gemini-3-flash-preview',
+ model: 'gemini-3.6-flash',
enabled: true,
emits_signals: false,
scanner_version: 1,
diff --git a/products/replay_vision/frontend/replay_scanners/replayScannersLogic.test.ts b/products/replay_vision/frontend/replay_scanners/replayScannersLogic.test.ts
index a90e473b2beb..b2ba36acf089 100644
--- a/products/replay_vision/frontend/replay_scanners/replayScannersLogic.test.ts
+++ b/products/replay_vision/frontend/replay_scanners/replayScannersLogic.test.ts
@@ -44,7 +44,7 @@ function makeScanner(overrides: Partial<ReplayScanner> = {}): ReplayScanner {
sampling_rate: 0.1,
query: null,
provider: 'google',
- model: 'gemini-3-flash-preview',
+ model: 'gemini-3.6-flash',
emits_signals: false,
scanner_version: 1,
last_swept_at: '2026-05-12T00:00:00Z',
diff --git a/products/replay_vision/frontend/replay_scanners/types.ts b/products/replay_vision/frontend/replay_scanners/types.ts
index 4852048ec6cd..6f799ef4f41b 100644
--- a/products/replay_vision/frontend/replay_scanners/types.ts
+++ b/products/replay_vision/frontend/replay_scanners/types.ts
@@ -133,7 +133,7 @@ export function ineligibleKindDescription(kind: IneligibleKind): string {
}
export const DEFAULT_PROVIDER = 'google'
-export const DEFAULT_MODEL: ScannerModelEnumApi = ScannerModelEnumApi.Gemini3FlashPreview
+export const DEFAULT_MODEL: ScannerModelEnumApi = ScannerModelEnumApi.Gemini36Flash
export const ENABLED_OPTIONS: { value: EnabledFilter; label: string }[] = [
{ value: 'enabled', label: 'Enabled' },
@@ -143,15 +143,13 @@ export const ENABLED_OPTIONS: { value: EnabledFilter; label: string }[] = [
// Mirrors the backend `OBSERVATION_CREDITS_BY_MODEL` table (the scanner/estimate API responses are authoritative);
// the picker needs a price per model before anything is saved, so it can't come from a per-instance response.
export const OBSERVATION_CREDITS_BY_MODEL: Record<ScannerModelEnumApi, number> = {
- [ScannerModelEnumApi.Gemini25Flash]: 2,
- [ScannerModelEnumApi.Gemini3FlashPreview]: 5,
- [ScannerModelEnumApi.Gemini35Flash]: 15,
+ [ScannerModelEnumApi.Gemini35FlashLite]: 2,
+ [ScannerModelEnumApi.Gemini36Flash]: 15,
}
const MODEL_NAMES: Record<ScannerModelEnumApi, string> = {
- [ScannerModelEnumApi.Gemini25Flash]: 'Gemini 2.5 Flash',
- [ScannerModelEnumApi.Gemini3FlashPreview]: 'Gemini 3 Flash',
- [ScannerModelEnumApi.Gemini35Flash]: 'Gemini 3.5 Flash',
+ [ScannerModelEnumApi.Gemini35FlashLite]: 'Gemini 3.5 Flash Lite',
+ [ScannerModelEnumApi.Gemini36Flash]: 'Gemini 3.6 Flash',
}
export const MODEL_OPTIONS: { value: ScannerModelEnumApi; label: string }[] = Object.values(ScannerModelEnumApi).map(
@@ -161,6 +159,7 @@ export const MODEL_OPTIONS: { value: ScannerModelEnumApi; label: string }[] = Ob
})
)
+// Falls back to the raw id for retired models frozen in old observation snapshots.
export function modelLabel(model: string | null | undefined): string {
if (!model) {
return '—'
diff --git a/products/replay_vision/skills/creating-replay-vision-scanners/SKILL.md b/products/replay_vision/skills/creating-replay-vision-scanners/SKILL.md
index 9d7d2aeebe04..69f8446984c0 100644
--- a/products/replay_vision/skills/creating-replay-vision-scanners/SKILL.md
+++ b/products/replay_vision/skills/creating-replay-vision-scanners/SKILL.md
@@ -83,7 +83,7 @@ Call `vision-scanners-create`. Minimal example:
"scanner_config": { "prompt": "Flag sessions where the user repeatedly clicks the same element in frustration." },
"query": { "kind": "RecordingsQuery", "events": [{ "id": "$rageclick", "type": "events" }] },
"sampling_rate": 1.0,
- "model": "gemini-3-flash-preview",
+ "model": "gemini-3.6-flash",
"enabled": true
}
```
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index 4e9dd16bb091..09b11da6c6ee 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -23680,17 +23680,15 @@ export namespace Schemas {
} as const;
/**
- * * `gemini-2.5-flash` - Gemini 2.5 Flash
- * * `gemini-3-flash-preview` - Gemini 3 Flash
- * * `gemini-3.5-flash` - Gemini 3.5 Flash
+ * * `gemini-3.5-flash-lite` - Gemini 3.5 Flash Lite
+ * * `gemini-3.6-flash` - Gemini 3.6 Flash
*/
export type ScannerModelEnum = typeof ScannerModelEnum[keyof typeof ScannerModelEnum];
export const ScannerModelEnum = {
- Gemini25Flash: 'gemini-2.5-flash',
- Gemini3FlashPreview: 'gemini-3-flash-preview',
- Gemini35Flash: 'gemini-3.5-flash',
+ Gemini35FlashLite: 'gemini-3.5-flash-lite',
+ Gemini36Flash: 'gemini-3.6-flash',
} as const;
/**
@@ -23718,9 +23716,8 @@ export namespace Schemas {
scanner_id?: string | null;
/** Proposed model; determines `credits_per_observation` in the response.
*
- * * `gemini-2.5-flash` - Gemini 2.5 Flash
- * * `gemini-3-flash-preview` - Gemini 3 Flash
- * * `gemini-3.5-flash` - Gemini 3.5 Flash */
+ * * `gemini-3.5-flash-lite` - Gemini 3.5 Flash Lite
+ * * `gemini-3.6-flash` - Gemini 3.6 Flash */
model?: ScannerModelEnum;
}
@@ -39679,9 +39676,8 @@ export namespace Schemas {
provider?: ScannerProviderEnum;
/** Concrete model to use for this scanner.
*
- * * `gemini-2.5-flash` - Gemini 2.5 Flash
- * * `gemini-3-flash-preview` - Gemini 3 Flash
- * * `gemini-3.5-flash` - Gemini 3.5 Flash */
+ * * `gemini-3.5-flash-lite` - Gemini 3.5 Flash Lite
+ * * `gemini-3.6-flash` - Gemini 3.6 Flash */
model: ScannerModelEnum;
/** When false, the reconciler removes the scanner's Temporal schedule. On-demand triggers still work. */
enabled?: boolean;
@@ -48253,9 +48249,8 @@ export namespace Schemas {
provider?: ScannerProviderEnum;
/** Concrete model to use for this scanner.
*
- * * `gemini-2.5-flash` - Gemini 2.5 Flash
- * * `gemini-3-flash-preview` - Gemini 3 Flash
- * * `gemini-3.5-flash` - Gemini 3.5 Flash */
+ * * `gemini-3.5-flash-lite` - Gemini 3.5 Flash Lite
+ * * `gemini-3.6-flash` - Gemini 3.6 Flash */
model?: ScannerModelEnum;
/** When false, the reconciler removes the scanner's Temporal schedule. On-demand triggers still work. */
enabled?: boolean;
diff --git a/services/mcp/src/generated/replay_vision/api.ts b/services/mcp/src/generated/replay_vision/api.ts
index 4c541c63795f..30eefcc06bb7 100644
--- a/services/mcp/src/generated/replay_vision/api.ts
+++ b/services/mcp/src/generated/replay_vision/api.ts
@@ -243,12 +243,10 @@ export const VisionScannersCreateBody = /* @__PURE__ */ zod.object({
.optional()
.describe('LLM provider. v1 is Google-only.\n\n* `google` - Google'),
model: zod
- .enum(['gemini-2.5-flash', 'gemini-3-flash-preview', 'gemini-3.5-flash'])
+ .enum(['gemini-3.5-flash-lite', 'gemini-3.6-flash'])
+ .describe('* `gemini-3.5-flash-lite` - Gemini 3.5 Flash Lite\n* `gemini-3.6-flash` - Gemini 3.6 Flash')
.describe(
- '* `gemini-2.5-flash` - Gemini 2.5 Flash\n* `gemini-3-flash-preview` - Gemini 3 Flash\n* `gemini-3.5-flash` - Gemini 3.5 Flash'
- )
- .describe(
- 'Concrete model to use for this scanner.\n\n* `gemini-2.5-flash` - Gemini 2.5 Flash\n* `gemini-3-flash-preview` - Gemini 3 Flash\n* `gemini-3.5-flash` - Gemini 3.5 Flash'
+ 'Concrete model to use for this scanner.\n\n* `gemini-3.5-flash-lite` - Gemini 3.5 Flash Lite\n* `gemini-3.6-flash` - Gemini 3.6 Flash'
),
enabled: zod
.boolean()
@@ -346,13 +344,11 @@ export const VisionScannersPartialUpdateBody = /* @__PURE__ */ zod.object({
.optional()
.describe('LLM provider. v1 is Google-only.\n\n* `google` - Google'),
model: zod
- .enum(['gemini-2.5-flash', 'gemini-3-flash-preview', 'gemini-3.5-flash'])
- .describe(
- '* `gemini-2.5-flash` - Gemini 2.5 Flash\n* `gemini-3-flash-preview` - Gemini 3 Flash\n* `gemini-3.5-flash` - Gemini 3.5 Flash'
- )
+ .enum(['gemini-3.5-flash-lite', 'gemini-3.6-flash'])
+ .describe('* `gemini-3.5-flash-lite` - Gemini 3.5 Flash Lite\n* `gemini-3.6-flash` - Gemini 3.6 Flash')
.optional()
.describe(
- 'Concrete model to use for this scanner.\n\n* `gemini-2.5-flash` - Gemini 2.5 Flash\n* `gemini-3-flash-preview` - Gemini 3 Flash\n* `gemini-3.5-flash` - Gemini 3.5 Flash'
+ 'Concrete model to use for this scanner.\n\n* `gemini-3.5-flash-lite` - Gemini 3.5 Flash Lite\n* `gemini-3.6-flash` - Gemini 3.6 Flash'
),
enabled: zod
.boolean()
@@ -744,7 +740,7 @@ export const visionScannersEstimateCreateBodySamplingRateMin = 0
export const visionScannersEstimateCreateBodySamplingRateMax = 1
export const visionScannersEstimateCreateBodySamplingModeDefault = `comprehensive`
-export const visionScannersEstimateCreateBodyModelDefault = `gemini-3-flash-preview`
+export const visionScannersEstimateCreateBodyModelDefault = `gemini-3.6-flash`
export const VisionScannersEstimateCreateBody = /* @__PURE__ */ zod
.object({
@@ -774,13 +770,11 @@ export const VisionScannersEstimateCreateBody = /* @__PURE__ */ zod
"The scanner being edited, excluded from `other_enabled_scanners_monthly_credits` so its stored estimate isn't double-counted in the forecast. Omit (or null) when estimating a brand-new scanner."
),
model: zod
- .enum(['gemini-2.5-flash', 'gemini-3-flash-preview', 'gemini-3.5-flash'])
- .describe(
- '* `gemini-2.5-flash` - Gemini 2.5 Flash\n* `gemini-3-flash-preview` - Gemini 3 Flash\n* `gemini-3.5-flash` - Gemini 3.5 Flash'
- )
+ .enum(['gemini-3.5-flash-lite', 'gemini-3.6-flash'])
+ .describe('* `gemini-3.5-flash-lite` - Gemini 3.5 Flash Lite\n* `gemini-3.6-flash` - Gemini 3.6 Flash')
.default(visionScannersEstimateCreateBodyModelDefault)
.describe(
- 'Proposed model; determines `credits_per_observation` in the response.\n\n* `gemini-2.5-flash` - Gemini 2.5 Flash\n* `gemini-3-flash-preview` - Gemini 3 Flash\n* `gemini-3.5-flash` - Gemini 3.5 Flash'
+ 'Proposed model; determines `credits_per_observation` in the response.\n\n* `gemini-3.5-flash-lite` - Gemini 3.5 Flash Lite\n* `gemini-3.6-flash` - Gemini 3.6 Flash'
),
})
.describe('Body of POST /vision/scanners/estimate/ — a proposed, unsaved scanner config.')