Skip to content

feat(agent-platform): model selection via spec.models (auto/manual) + runtime fallback#64825

Open
benjackwhite wants to merge 38 commits into
masterfrom
ben/agent-multi-model
Open

feat(agent-platform): model selection via spec.models (auto/manual) + runtime fallback#64825
benjackwhite wants to merge 38 commits into
masterfrom
ben/agent-multi-model

Conversation

@benjackwhite

@benjackwhite benjackwhite commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Draft — posthog-side. The model-config UI (cost-aware catalog browser, priority-list picker, optimize_for control) lives in the code repo (PR #2900). Full design: ~/.claude/plans/agent-multi-model-and-fallback-spec.md.

⚠️ Breaking (pre-release)

spec.model and spec.entrypoint are removed. Model selection is solely via spec.models. Pre-release, so no back-compat shim — all example bundles + tests are migrated in this PR.

What & why

Agents ran on a single spec.model with no fallback when a provider was down. This replaces it with spec.models (an auto/manual policy → a priority-ordered, cross-provider list) and adds session-aware model selection + runtime fallback.

spec.models

  • auto (default): pick a level (low/medium/high); the platform resolves it to a priority-ordered, cross-provider list (MODEL_POLICY_LEVELS) at session start, kept current centrally so auto agents get new models without a new revision.
  • manual: an explicit priority-ordered models[] list, with optional per-model reasoning.
  • optimize_for (both, default cost): session model stability vs. resilience — see below.
  • Defaults to { mode: 'auto', level: 'medium', optimize_for: 'cost' }. modelPolicyToList(spec) is the single resolution point.

Session-sticky selection (optimize_for) — the cost story

Multi-turn agent sessions are dominated by prompt-cache locality: each turn replays a large stable prefix, and cache reads are ~0.1–0.5× of full input. Switching providers mid-session re-reads the whole context cold (full price + a cache-write premium), so the right unit of stability is the session, not the request.

  • cost (default): the first turn walks the list until a model answers, then pins it for the rest of the session — every later turn uses only it, no cross-model failover. One provider, warm cache. If the pinned model is down the turn fails (after pi-ai's same-provider retries) rather than paying a cold re-read on a different provider.
  • availability: leads with the last-served model (sticky, no thrash) but fails over on failure, trading the cold re-read for keeping the session alive.

The pin/lead is derived from the conversation's last-served assistant turn, so it survives suspend→resume.

Runtime fallback

fallbackStreamFn wraps the stream over the resolved list:

  • Fallover only on transient/provider-side failures (5xx / conn / timeout / 429); permanent 4xx and client aborts pass through unchanged.
  • Commit guard: once a content-bearing event is forwarded the turn is committed and it can't fall over (mid-stream provider death stays a failure — fallback targets pre-first-byte failures).
  • Governed by optimize_for: cost pins after the first success (no further failover); availability keeps failover enabled across turns.
  • Single-model lists skip the wrapper entirely.
  • $ai_generation tags the model that actually answered plus $agent_model_attempt / $ai_fallback_from.

Model catalog (single source)

GET …/agent_applications/models/ (→ janitor /models → gateway catalog) feeds both the config UI (REST) and the agent builder (PostHog MCP tool agent-applications-models, now generated + served). Replaces the bespoke native models tool.

Changes

  • Schema (agent-shared/.../spec.ts): remove model + entrypoint; models union (auto/manual) + optimize_for; MODEL_POLICY_LEVELS; modelPolicyToList.
  • Runner (agent-runner): list resolution in worker.ts; loop/fallback-stream.ts (sticky lead + cost/availability, + tests); driver.ts seeds the sticky model from the conversation + per-attempt analytics; analytics-sink.ts fallback props.
  • Django (backend/logic/spec_schema.py + tests): models + optimize_for; relaxed-required via field defaults.
  • MCP (services/mcp): agent-applications-models enabled + regenerated; tool-schema snapshots regenerated for optimize_for.
  • Migrations: all example spec.json (manual single-model preserves their pinned model; agent-builder uses auto/high) and every spec-constructing test/harness → models.
  • Meta-agent: choosing-the-model skill (+ platform-mental-model, cost-and-quota-analysis) updated for the new shape; live-catalog pricing.

Verification

  • All agent-platform TS services typecheck clean; oxlint/oxfmt clean.
  • Tests green: fallback-stream 27, driver 30 (incl. fallback integration + sticky wiring), agent-shared spec + gateway-catalog 111, Python test_spec_schema 46.
  • Merged latest master.

Follow-ups

  • optimize_for v2: cost-aware escalation — for big/async sessions, suspend-and-retry the pinned provider before failing over (the availability cold re-read is bounded to one full-context read, but real); optional per-trigger policy. Documented in the design note.
  • MODEL_POLICY_LEVELS is the v1 backend-owned tiering; can later move to a DB/feature-flag/gateway-owned source.
  • Fallback is reactive (error-code-driven); proactive gateway-health reordering is a follow-up.
  • frontend/generated/* (orval output, currently unimported) still references the old names — regenerate from the OpenAPI when convenient.

🤖 Generated with Claude Code

benjackwhite and others added 4 commits June 19, 2026 12:37
Move `encrypted_env` from AgentApplication to AgentRevision so each revision
runs against its own secret values: a draft can be edited/previewed with its
own secrets without touching the live revision's, a promote carries the
secrets it was tested with, and forking a draft copies the parent's forward.

Backend:
- models: drop AgentApplication.encrypted_env, add AgentRevision.encrypted_env
- migrations (3-step safe pattern): 0004 add revision column, 0005 copy the
  application ciphertext onto its non-archived revisions, 0006 state-only
  remove from application (DB column dropped in a follow-up after a deploy
  cycle, per safe-django-migrations)
- env-keys endpoints (set_env + per-key get/put/delete + list) move from the
  AgentApplicationViewSet to the AgentRevisionViewSet; the promote + validate
  gates read the revision's own env block; new_draft copies the parent
  revision's encrypted_env forward

Runtime (node services):
- the encrypted-env resolver reads off the session's revision, not the app
- SecretResolver / JwtSecretResolver resolve against a { encrypted_env }
  source; authorize() + the auth verifiers + the slack trigger + the failure
  notifier thread the resolved revision through
- NewRevision carries encrypted_env; test-reset schema + harness stamp
  secrets on the revision

Generated: `hogli build:openapi` regenerated the agent_platform frontend types,
MCP orval schemas + tool definitions (env-keys operations now target the
revision), and the tool-schema snapshots.

Extracted from #64453 (dylan/agent-platform) as the standalone secrets-move
half; the preview-mode work stays on that PR, rebased on top of this.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ision

Addresses a Greptile review note: the failure handler resolves the session's
revision (the notifier reads its outbound secret off the revision's
encrypted_env now) and guards `application && revision`. If the revision can't
be loaded, the notification was dropped silently. Add an error-level log on the
application-without-revision path so the skip is observable. Re-fetch (not cache
from the main loop) stays intentional — this catch is reachable before the
revision ever loaded (e.g. a revision_missing failure).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…Auth app

The `allow_agent_approver: False` decide gate required an OAuth bearer to
carry the dedicated `agent_approvals:write` scope. Gate on the app's
staff-set `is_first_party` flag instead: first-party PostHog clients (e.g.
PostHog Code, where a human approves in-app) can decide, while third-party
apps and personal API keys still can't — regardless of scope. PostHog Code
no longer needs to request a dedicated scope (reverted client-side).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

🕸️ Eager graph

How much code each root forces the browser to download and decode through static imports — the regression class total bundle size can't see.

Root Eager closure Δ vs base Budget
entry (logged-out pages, app bootstrap)
src/index.tsx
15.15 MiB · 774 files no change ██████████ 99.3% of 15.26 MiB
authenticated shell (every logged-in page)
src/scenes/AuthenticatedShell.tsx
32.34 MiB · 5,189 files no change ██████████ 99.7% of 32.42 MiB

node_modules/monaco-editor/ stays out of src/index.tsx
src/lib/components/ActivityLog/describers stays out of src/index.tsx
node_modules/monaco-editor/ stays out of src/scenes/AuthenticatedShell.tsx
src/lib/components/ActivityLog/describers stays out of src/scenes/AuthenticatedShell.tsx

Largest files eagerly reachable from src/index.tsx
Size File
899.9 KiB src/styles/global.scss
609.0 KiB public/hedgehog/burning-money-hog.png
541.9 KiB public/hedgehog/waving-hog.png
448.2 KiB public/hedgehog/stop-sign-hog.png
362.0 KiB public/hedgehog/phone-pair-hogs.png
355.9 KiB ../node_modules/.pnpm/@posthog+icons@0.37.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
343.0 KiB src/taxonomy/core-filter-definitions-by-group.json
335.6 KiB public/hedgehog/desk-hog.png
323.2 KiB public/hedgehog/3-bears-hogs.png
298.6 KiB src/lib/api.ts
Largest files eagerly reachable from src/scenes/AuthenticatedShell.tsx
Size File
899.9 KiB src/styles/global.scss
764.5 KiB src/queries/validators.js
609.0 KiB public/hedgehog/burning-money-hog.png
541.9 KiB public/hedgehog/waving-hog.png
448.2 KiB public/hedgehog/stop-sign-hog.png
362.0 KiB public/hedgehog/phone-pair-hogs.png
355.9 KiB ../node_modules/.pnpm/@posthog+icons@0.37.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
343.0 KiB src/taxonomy/core-filter-definitions-by-group.json
335.6 KiB public/hedgehog/desk-hog.png
323.2 KiB public/hedgehog/3-bears-hogs.png

Posted automatically by check-eager-graph · sizes are input-source bytes from the esbuild metafile · part of #32479

@greptile-apps

greptile-apps Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
products/agent_platform/services/agent-runner/src/loop/driver.ts:894-897
The `reason` parameter (third argument to `onFallback`) is silently dropped in the warning log. When a fallback fires in production the log entry will show which model was skipped and at which index, but not the error that actually caused the skip — making it much harder to distinguish a 429 storm from a 503 outage after the fact.

```suggestion
                onFallback: (fromIndex, fromModel, reason) => {
                    fellBackFrom = fromModel.id
                    runLog.warn({ from: fromModel.id, attempt: fromIndex, reason }, 'model.fallback')
                },
```

### Issue 2 of 2
products/agent_platform/services/agent-shared/src/runtime/analytics-sink.ts:216-218
Guarding a numeric property with a bare truthiness check treats `0` as absent. The driver currently never sends `0` (it sends `undefined` when `modelAttempt` is zero), so this works today. However the `AnalyticsGenerationEvent` type allows any `number` value, so a future call-site that passes `0` would silently drop the property. `!== undefined` matches the intent and is consistent with how every other optional numeric field on this event is guarded above (e.g. `cache_read_tokens`, `cost_usd`).

```suggestion
        if (event.model_attempt !== undefined) {
            base.$agent_model_attempt = event.model_attempt
        }
```

Reviews (1): Last reviewed commit: "chore: update OpenAPI generated types" | Re-trigger Greptile

Comment thread products/agent_platform/services/agent-runner/src/loop/driver.ts Outdated
Comment thread products/agent_platform/services/agent-shared/src/runtime/analytics-sink.ts Outdated
@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Size Change: +383 kB (+0.6%)

Total Size: 64.4 MB

📦 View Changed
Filename Size Change
frontend/dist-report/exporter/_chunks/chunk 2.62 MB +383 kB (+17.12%) ⚠️
ℹ️ View Unchanged
Filename Size
frontend/dist-report/decompression-worker/src/scenes/session-recordings/player/snapshot-processing/decompressionWorker 2.85 kB
frontend/dist-report/exporter/_parent/products/actions/frontend/pages/Action 27.9 kB
frontend/dist-report/exporter/_parent/products/actions/frontend/pages/Actions 5.66 kB
frontend/dist-report/exporter/_parent/products/ai_gateway/frontend/AIGatewayScene 13.2 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/AIObservabilityScene 120 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/AIObservabilitySessionScene 19.4 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/AIObservabilityTraceScene 132 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/AIObservabilityUsers 3.44 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/clusters/AIObservabilityClusterScene 21.8 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/clusters/AIObservabilityClustersScene 53.9 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/datasets/AIObservabilityDatasetScene 20.7 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/datasets/AIObservabilityDatasetsScene 4.07 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/evaluations/AIObservabilityEvaluation 60.6 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/evaluations/AIObservabilityEvaluationsScene 32.8 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/evaluations/EvaluationTemplates 671 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/LLMASessionFeedbackDisplay 4.81 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/playground/AIObservabilityPlaygroundScene 37.5 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/prompts/LLMPromptScene 32.8 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/prompts/LLMPromptsScene 5.21 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/tags/AIObservabilityTag 32 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/tags/AIObservabilityTagsScene 11.8 kB
frontend/dist-report/exporter/_parent/products/business_knowledge/frontend/scenes/BusinessKnowledgeScene 23.3 kB
frontend/dist-report/exporter/_parent/products/conversations/frontend/components/Assignee/CyclotronJobInputAssignee 1.38 kB
frontend/dist-report/exporter/_parent/products/conversations/frontend/components/SlaBusinessHours/CyclotronJobInputBusinessHours 2.69 kB
frontend/dist-report/exporter/_parent/products/conversations/frontend/components/TicketTags/CyclotronJobInputTicketTags 783 B
frontend/dist-report/exporter/_parent/products/conversations/frontend/scenes/settings/SupportSettingsScene 5.73 kB
frontend/dist-report/exporter/_parent/products/conversations/frontend/scenes/ticket/SupportTicketScene 41.4 kB
frontend/dist-report/exporter/_parent/products/conversations/frontend/scenes/tickets/SupportTicketsScene 1.68 kB
frontend/dist-report/exporter/_parent/products/customer_analytics/frontend/CustomerAnalyticsScene 100 kB
frontend/dist-report/exporter/_parent/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/CustomerAnalyticsConfigurationScene 6.48 kB
frontend/dist-report/exporter/_parent/products/customer_analytics/frontend/scenes/CustomerJourneyBuilderScene/CustomerJourneyBuilderScene 6.33 kB
frontend/dist-report/exporter/_parent/products/customer_analytics/frontend/scenes/CustomerJourneyTemplatesScene/CustomerJourneyTemplatesScene 9.23 kB
frontend/dist-report/exporter/_parent/products/data_warehouse/DataWarehouseScene 32.3 kB
frontend/dist-report/exporter/_parent/products/data_warehouse/frontend/scenes/NewSourceScene/NewSourceScene 2.88 kB
frontend/dist-report/exporter/_parent/products/data_warehouse/frontend/scenes/SchemaScene/SchemaScene 34.1 kB
frontend/dist-report/exporter/_parent/products/data_warehouse/frontend/scenes/SourceConnectScene/SourceConnectScene 7 kB
frontend/dist-report/exporter/_parent/products/data_warehouse/frontend/scenes/SourceScene/SourceScene 2.69 kB
frontend/dist-report/exporter/_parent/products/data_warehouse/frontend/scenes/SourcesScene/SourcesScene 7.49 kB
frontend/dist-report/exporter/_parent/products/early_access_features/frontend/EarlyAccessFeature 5.54 kB
frontend/dist-report/exporter/_parent/products/early_access_features/frontend/EarlyAccessFeatures 3.73 kB
frontend/dist-report/exporter/_parent/products/endpoints/frontend/EndpointScene 47.6 kB
frontend/dist-report/exporter/_parent/products/endpoints/frontend/EndpointsScene 27.4 kB
frontend/dist-report/exporter/_parent/products/engineering_analytics/frontend/scenes/EngineeringAnalyticsAuthorScene 5.31 kB
frontend/dist-report/exporter/_parent/products/engineering_analytics/frontend/scenes/EngineeringAnalyticsScene 21.5 kB
frontend/dist-report/exporter/_parent/products/engineering_analytics/frontend/scenes/PullRequestDetailScene 20.8 kB
frontend/dist-report/exporter/_parent/products/engineering_analytics/frontend/scenes/WorkflowRunDetailScene 6.42 kB
frontend/dist-report/exporter/_parent/products/engineering_analytics/frontend/scenes/WorkflowRunsScene 7.94 kB
frontend/dist-report/exporter/_parent/products/error_tracking/frontend/scenes/ErrorTrackingFingerprintsScene/ErrorTrackingIssueFingerprintsScene 7.66 kB
frontend/dist-report/exporter/_parent/products/error_tracking/frontend/scenes/ErrorTrackingIssueScene/ErrorTrackingIssueScene 102 kB
frontend/dist-report/exporter/_parent/products/error_tracking/frontend/scenes/ErrorTrackingScene/ErrorTrackingScene 42.6 kB
frontend/dist-report/exporter/_parent/products/feature_flags/frontend/FeatureFlagTemplatesScene 6.91 kB
frontend/dist-report/exporter/_parent/products/games/368Hedgehogs/368Hedgehogs 5.24 kB
frontend/dist-report/exporter/_parent/products/games/FlappyHog/FlappyHog 5.7 kB
frontend/dist-report/exporter/_parent/products/growth/frontend/IdentityMatchingScene 35.9 kB
frontend/dist-report/exporter/_parent/products/legal_documents/frontend/scenes/LegalDocumentNewScene 60.1 kB
frontend/dist-report/exporter/_parent/products/legal_documents/frontend/scenes/LegalDocumentsScene 6.37 kB
frontend/dist-report/exporter/_parent/products/links/frontend/LinkScene 25.4 kB
frontend/dist-report/exporter/_parent/products/links/frontend/LinksScene 5.15 kB
frontend/dist-report/exporter/_parent/products/live_debugger/frontend/LiveDebugger 19.6 kB
frontend/dist-report/exporter/_parent/products/logs/frontend/LogsScene 22.6 kB
frontend/dist-report/exporter/_parent/products/logs/frontend/scenes/LogsAlertDetailScene/LogsAlertDetailScene 18.5 kB
frontend/dist-report/exporter/_parent/products/logs/frontend/scenes/LogsAlertNotificationDetailScene/LogsAlertNotificationDetailScene 9 kB
frontend/dist-report/exporter/_parent/products/logs/frontend/scenes/LogsSamplingDetailScene/LogsSamplingDetailScene 6.11 kB
frontend/dist-report/exporter/_parent/products/logs/frontend/scenes/LogsSamplingNewScene/LogsSamplingNewScene 3.12 kB
frontend/dist-report/exporter/_parent/products/managed_migrations/frontend/ManagedMigration 15.2 kB
frontend/dist-report/exporter/_parent/products/mcp_analytics/frontend/MCPAnalyticsScene 109 kB
frontend/dist-report/exporter/_parent/products/mcp_analytics/frontend/MCPAnalyticsToolDetail 20.1 kB
frontend/dist-report/exporter/_parent/products/metrics/frontend/MetricsScene 18.1 kB
frontend/dist-report/exporter/_parent/products/posthog_ai/frontend/sandbox/components/tool/builtinToolRenderers 4.48 kB
frontend/dist-report/exporter/_parent/products/posthog_ai/frontend/sandbox/SandboxQuestionRenderer 1.76 kB
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/stickiness/StickinessBarChart/StickinessBarChart 4.17 kB
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/stickiness/StickinessLineChart/StickinessLineChart 4.05 kB
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/trends/TrendsBarChart/TrendsBarChart 9.6 kB
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/trends/TrendsLifecycleChart/TrendsLifecycleChart 5.87 kB
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/trends/TrendsLineChart/TrendsLineChart 5.82 kB
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/trends/TrendsPieChart/TrendsPieChart 5.01 kB
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/trends/TrendsSlopeChart/TrendsSlopeChart 2.6 kB
frontend/dist-report/exporter/_parent/products/replay_vision/frontend/observations/ReplayObservation 17.9 kB
frontend/dist-report/exporter/_parent/products/replay_vision/frontend/replay_scanners/ReplayScanner 41.3 kB
frontend/dist-report/exporter/_parent/products/replay_vision/frontend/replay_scanners/ReplayScannersScene 22.4 kB
frontend/dist-report/exporter/_parent/products/replay_vision/frontend/replay_scanners/ScannerEditorScene 25.2 kB
frontend/dist-report/exporter/_parent/products/revenue_analytics/frontend/revenueAnalyticsLogic 1.49 kB
frontend/dist-report/exporter/_parent/products/revenue_analytics/frontend/RevenueAnalyticsScene 29.8 kB
frontend/dist-report/exporter/_parent/products/session_summaries/frontend/SessionGroupSummariesTable 5.4 kB
frontend/dist-report/exporter/_parent/products/session_summaries/frontend/SessionGroupSummaryScene 23.3 kB
frontend/dist-report/exporter/_parent/products/skills/frontend/LLMSkillScene 1.47 kB
frontend/dist-report/exporter/_parent/products/skills/frontend/LLMSkillsScene 1.48 kB
frontend/dist-report/exporter/_parent/products/tasks/frontend/SlackTaskContextScene 9 kB
frontend/dist-report/exporter/_parent/products/tasks/frontend/TaskTracker 67.9 kB
frontend/dist-report/exporter/_parent/products/tracing/frontend/TracingScene 86.6 kB
frontend/dist-report/exporter/_parent/products/user_interviews/frontend/UserInterview 10.8 kB
frontend/dist-report/exporter/_parent/products/user_interviews/frontend/UserInterviewResponse 8.05 kB
frontend/dist-report/exporter/_parent/products/user_interviews/frontend/UserInterviews 6.46 kB
frontend/dist-report/exporter/_parent/products/visual_review/frontend/scenes/VisualReviewIndexScene 3 kB
frontend/dist-report/exporter/_parent/products/visual_review/frontend/scenes/VisualReviewRunScene 47.2 kB
frontend/dist-report/exporter/_parent/products/visual_review/frontend/scenes/VisualReviewRunsScene 8.23 kB
frontend/dist-report/exporter/_parent/products/visual_review/frontend/scenes/VisualReviewSettingsScene 11.6 kB
frontend/dist-report/exporter/_parent/products/visual_review/frontend/scenes/VisualReviewSnapshotHistoryScene 14.3 kB
frontend/dist-report/exporter/_parent/products/visual_review/frontend/scenes/VisualReviewSnapshotOverviewScene 19.8 kB
frontend/dist-report/exporter/_parent/products/workflows/frontend/TemplateLibrary/MessageTemplate 17 kB
frontend/dist-report/exporter/_parent/products/workflows/frontend/Workflows/WorkflowScene 113 kB
frontend/dist-report/exporter/_parent/products/workflows/frontend/WorkflowsScene 61.4 kB
frontend/dist-report/exporter/src/exporter/exporter 25.9 kB
frontend/dist-report/exporter/src/exporter/scenes/ExporterDashboardScene 6.64 kB
frontend/dist-report/exporter/src/exporter/scenes/ExporterHeatmapScene 20.1 kB
frontend/dist-report/exporter/src/exporter/scenes/ExporterInsightScene 7.21 kB
frontend/dist-report/exporter/src/exporter/scenes/ExporterInterviewScene 310 kB
frontend/dist-report/exporter/src/exporter/scenes/ExporterNotebookScene 2.9 MB
frontend/dist-report/exporter/src/exporter/scenes/ExporterRecordingScene 5.59 kB
frontend/dist-report/exporter/src/exporterSharedChunkAnchors 1.26 kB
frontend/dist-report/exporter/src/lib/components/ActivityLog/describers 129 kB
frontend/dist-report/exporter/src/lib/components/Cards/TextCard/TextCardMarkdownEditor 10.6 kB
frontend/dist-report/exporter/src/lib/components/MonacoDiffEditor 533 B
frontend/dist-report/exporter/src/lib/lemon-ui/LemonMarkdown/MermaidDiagram 2 kB
frontend/dist-report/exporter/src/lib/lemon-ui/LemonTextArea/LemonTextAreaMarkdown 790 B
frontend/dist-report/exporter/src/lib/lemon-ui/Link/Link 415 B
frontend/dist-report/exporter/src/lib/monaco/CodeEditor 448 B
frontend/dist-report/exporter/src/lib/monaco/CodeEditorImpl 26.5 kB
frontend/dist-report/exporter/src/lib/monaco/CodeEditorInline 649 B
frontend/dist-report/exporter/src/lib/monaco/vimMode 211 kB
frontend/dist-report/exporter/src/lib/ui/Button/ButtonPrimitives 482 B
frontend/dist-report/exporter/src/queries/nodes/WebVitals/WebVitals 11.5 kB
frontend/dist-report/exporter/src/queries/nodes/WebVitals/WebVitalsPathBreakdown 4.76 kB
frontend/dist-report/exporter/src/queries/Query/Query 5.08 kB
frontend/dist-report/exporter/src/queries/schema 955 kB
frontend/dist-report/exporter/src/scenes/approvals/changeRequestsLogic 622 B
frontend/dist-report/exporter/src/scenes/authentication/login/loginLogic 569 B
frontend/dist-report/exporter/src/scenes/authentication/shared/passkeyLogic 602 B
frontend/dist-report/exporter/src/scenes/data-pipelines/event-filtering/EventFilterScene 22.8 kB
frontend/dist-report/exporter/src/scenes/data-pipelines/TransformationsScene 8.09 kB
frontend/dist-report/exporter/src/scenes/experiments/notebook/NotebookCompactTable 1.54 kB
frontend/dist-report/exporter/src/scenes/hog-functions/misc/Diff 1.35 kB
frontend/dist-report/exporter/src/scenes/insights/views/BoxPlot/BoxPlot 4.49 kB
frontend/dist-report/exporter/src/scenes/insights/views/CalendarHeatMap/CalendarHeatMap 8.88 kB
frontend/dist-report/exporter/src/scenes/insights/views/RegionMap/RegionMap 30.3 kB
frontend/dist-report/exporter/src/scenes/insights/views/WorldMap/WorldMap 1.04 MB
frontend/dist-report/exporter/src/scenes/max/messages/adapters/CreateInsightWidget 5.73 kB
frontend/dist-report/exporter/src/scenes/max/messages/adapters/CreateNotebookWidget 1.8 kB
frontend/dist-report/exporter/src/scenes/max/messages/adapters/EditDiffRenderer 3.23 kB
frontend/dist-report/exporter/src/scenes/max/messages/adapters/ErrorTrackingWidget 5.55 kB
frontend/dist-report/exporter/src/scenes/max/messages/adapters/QueryWidget 5.67 kB
frontend/dist-report/exporter/src/scenes/max/messages/adapters/SearchSessionRecordingsWidget 5.58 kB
frontend/dist-report/exporter/src/scenes/max/messages/adapters/UpsertDashboardWidget 1.61 kB
frontend/dist-report/exporter/src/scenes/models/ModelsScene 20 kB
frontend/dist-report/exporter/src/scenes/models/NodeDetailScene 19 kB
frontend/dist-report/monaco-editor-worker/src/lib/monaco/workers/monacoEditorWorker 288 kB
frontend/dist-report/monaco-json-worker/src/lib/monaco/workers/monacoJsonWorker 419 kB
frontend/dist-report/monaco-typescript-worker/src/lib/monaco/workers/monacoTsWorker 7.02 MB
frontend/dist-report/posthog-app/_chunks/chunk 2.62 MB
frontend/dist-report/posthog-app/_parent/products/actions/frontend/pages/Action 29.3 kB
frontend/dist-report/posthog-app/_parent/products/actions/frontend/pages/Actions 6.95 kB
frontend/dist-report/posthog-app/_parent/products/ai_gateway/frontend/AIGatewayScene 13.7 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/AIObservabilityScene 122 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/AIObservabilitySessionScene 19.9 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/AIObservabilityTraceScene 133 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/AIObservabilityUsers 4.23 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/clusters/AIObservabilityClusterScene 22.3 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/clusters/AIObservabilityClustersScene 54.4 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/datasets/AIObservabilityDatasetScene 21.2 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/datasets/AIObservabilityDatasetsScene 4.54 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/evaluations/AIObservabilityEvaluation 61.1 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/evaluations/AIObservabilityEvaluationsScene 34.1 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/evaluations/EvaluationTemplates 671 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/LLMASessionFeedbackDisplay 4.81 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/playground/AIObservabilityPlaygroundScene 38.1 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/prompts/LLMPromptScene 34.1 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/prompts/LLMPromptsScene 5.69 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/tags/AIObservabilityTag 33.2 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/tags/AIObservabilityTagsScene 13 kB
frontend/dist-report/posthog-app/_parent/products/business_knowledge/frontend/scenes/BusinessKnowledgeScene 23.8 kB
frontend/dist-report/posthog-app/_parent/products/conversations/frontend/components/Assignee/CyclotronJobInputAssignee 1.38 kB
frontend/dist-report/posthog-app/_parent/products/conversations/frontend/components/SlaBusinessHours/CyclotronJobInputBusinessHours 2.7 kB
frontend/dist-report/posthog-app/_parent/products/conversations/frontend/components/TicketTags/CyclotronJobInputTicketTags 783 B
frontend/dist-report/posthog-app/_parent/products/conversations/frontend/scenes/settings/SupportSettingsScene 7.77 kB
frontend/dist-report/posthog-app/_parent/products/conversations/frontend/scenes/ticket/SupportTicketScene 35.2 kB
frontend/dist-report/posthog-app/_parent/products/conversations/frontend/scenes/tickets/SupportTicketsScene 2.15 kB
frontend/dist-report/posthog-app/_parent/products/customer_analytics/frontend/CustomerAnalyticsScene 100 kB
frontend/dist-report/posthog-app/_parent/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/CustomerAnalyticsConfigurationScene 8.52 kB
frontend/dist-report/posthog-app/_parent/products/customer_analytics/frontend/scenes/CustomerJourneyBuilderScene/CustomerJourneyBuilderScene 7.58 kB
frontend/dist-report/posthog-app/_parent/products/customer_analytics/frontend/scenes/CustomerJourneyTemplatesScene/CustomerJourneyTemplatesScene 10 kB
frontend/dist-report/posthog-app/_parent/products/data_warehouse/DataWarehouseScene 2.04 kB
frontend/dist-report/posthog-app/_parent/products/data_warehouse/frontend/scenes/NewSourceScene/NewSourceScene 3.66 kB
frontend/dist-report/posthog-app/_parent/products/data_warehouse/frontend/scenes/SchemaScene/SchemaScene 34.6 kB
frontend/dist-report/posthog-app/_parent/products/data_warehouse/frontend/scenes/SourceConnectScene/SourceConnectScene 7.71 kB
frontend/dist-report/posthog-app/_parent/products/data_warehouse/frontend/scenes/SourceScene/SourceScene 3.37 kB
frontend/dist-report/posthog-app/_parent/products/data_warehouse/frontend/scenes/SourcesScene/SourcesScene 8.1 kB
frontend/dist-report/posthog-app/_parent/products/early_access_features/frontend/EarlyAccessFeature 6.97 kB
frontend/dist-report/posthog-app/_parent/products/early_access_features/frontend/EarlyAccessFeatures 4.21 kB
frontend/dist-report/posthog-app/_parent/products/endpoints/frontend/EndpointScene 48.9 kB
frontend/dist-report/posthog-app/_parent/products/endpoints/frontend/EndpointsScene 26.7 kB
frontend/dist-report/posthog-app/_parent/products/engineering_analytics/frontend/scenes/EngineeringAnalyticsAuthorScene 5.79 kB
frontend/dist-report/posthog-app/_parent/products/engineering_analytics/frontend/scenes/EngineeringAnalyticsScene 22 kB
frontend/dist-report/posthog-app/_parent/products/engineering_analytics/frontend/scenes/PullRequestDetailScene 21.3 kB
frontend/dist-report/posthog-app/_parent/products/engineering_analytics/frontend/scenes/WorkflowRunDetailScene 6.89 kB
frontend/dist-report/posthog-app/_parent/products/engineering_analytics/frontend/scenes/WorkflowRunsScene 8.42 kB
frontend/dist-report/posthog-app/_parent/products/error_tracking/frontend/scenes/ErrorTrackingFingerprintsScene/ErrorTrackingIssueFingerprintsScene 8.17 kB
frontend/dist-report/posthog-app/_parent/products/error_tracking/frontend/scenes/ErrorTrackingIssueScene/ErrorTrackingIssueScene 103 kB
frontend/dist-report/posthog-app/_parent/products/error_tracking/frontend/scenes/ErrorTrackingScene/ErrorTrackingScene 44.9 kB
frontend/dist-report/posthog-app/_parent/products/feature_flags/frontend/FeatureFlagTemplatesScene 6.92 kB
frontend/dist-report/posthog-app/_parent/products/games/368Hedgehogs/368Hedgehogs 5.24 kB
frontend/dist-report/posthog-app/_parent/products/games/FlappyHog/FlappyHog 5.7 kB
frontend/dist-report/posthog-app/_parent/products/growth/frontend/IdentityMatchingScene 36.3 kB
frontend/dist-report/posthog-app/_parent/products/legal_documents/frontend/scenes/LegalDocumentNewScene 60.6 kB
frontend/dist-report/posthog-app/_parent/products/legal_documents/frontend/scenes/LegalDocumentsScene 6.84 kB
frontend/dist-report/posthog-app/_parent/products/links/frontend/LinkScene 25.9 kB
frontend/dist-report/posthog-app/_parent/products/links/frontend/LinksScene 5.63 kB
frontend/dist-report/posthog-app/_parent/products/live_debugger/frontend/LiveDebugger 20 kB
frontend/dist-report/posthog-app/_parent/products/logs/frontend/components/LogsViewer/LogsViewerModal/LogsViewerModal 2.41 kB
frontend/dist-report/posthog-app/_parent/products/logs/frontend/LogsScene 23.8 kB
frontend/dist-report/posthog-app/_parent/products/logs/frontend/scenes/LogsAlertDetailScene/LogsAlertDetailScene 19.1 kB
frontend/dist-report/posthog-app/_parent/products/logs/frontend/scenes/LogsAlertNotificationDetailScene/LogsAlertNotificationDetailScene 9.54 kB
frontend/dist-report/posthog-app/_parent/products/logs/frontend/scenes/LogsSamplingDetailScene/LogsSamplingDetailScene 6.59 kB
frontend/dist-report/posthog-app/_parent/products/logs/frontend/scenes/LogsSamplingNewScene/LogsSamplingNewScene 3.6 kB
frontend/dist-report/posthog-app/_parent/products/managed_migrations/frontend/ManagedMigration 15.7 kB
frontend/dist-report/posthog-app/_parent/products/mcp_analytics/frontend/MCPAnalyticsScene 110 kB
frontend/dist-report/posthog-app/_parent/products/mcp_analytics/frontend/MCPAnalyticsToolDetail 20.6 kB
frontend/dist-report/posthog-app/_parent/products/metrics/frontend/MetricsScene 18.9 kB
frontend/dist-report/posthog-app/_parent/products/posthog_ai/frontend/sandbox/components/tool/builtinToolRenderers 4.48 kB
frontend/dist-report/posthog-app/_parent/products/posthog_ai/frontend/sandbox/SandboxQuestionRenderer 1.76 kB
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/stickiness/StickinessBarChart/StickinessBarChart 4.62 kB
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/stickiness/StickinessLineChart/StickinessLineChart 4.5 kB
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/trends/TrendsBarChart/TrendsBarChart 10 kB
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/trends/TrendsLifecycleChart/TrendsLifecycleChart 6.31 kB
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/trends/TrendsLineChart/TrendsLineChart 6.27 kB
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/trends/TrendsPieChart/TrendsPieChart 5.45 kB
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/trends/TrendsSlopeChart/TrendsSlopeChart 3 kB
frontend/dist-report/posthog-app/_parent/products/replay_vision/frontend/observations/ReplayObservation 20 kB
frontend/dist-report/posthog-app/_parent/products/replay_vision/frontend/replay_scanners/ReplayScanner 42.6 kB
frontend/dist-report/posthog-app/_parent/products/replay_vision/frontend/replay_scanners/ReplayScannersScene 23.6 kB
frontend/dist-report/posthog-app/_parent/products/replay_vision/frontend/replay_scanners/ScannerEditorScene 25.7 kB
frontend/dist-report/posthog-app/_parent/products/revenue_analytics/frontend/revenueAnalyticsLogic 1.86 kB
frontend/dist-report/posthog-app/_parent/products/revenue_analytics/frontend/RevenueAnalyticsScene 31.1 kB
frontend/dist-report/posthog-app/_parent/products/session_summaries/frontend/SessionGroupSummariesTable 5.88 kB
frontend/dist-report/posthog-app/_parent/products/session_summaries/frontend/SessionGroupSummaryScene 25.3 kB
frontend/dist-report/posthog-app/_parent/products/skills/frontend/LLMSkillScene 1.94 kB
frontend/dist-report/posthog-app/_parent/products/skills/frontend/LLMSkillsScene 1.96 kB
frontend/dist-report/posthog-app/_parent/products/tasks/frontend/SlackTaskContextScene 9.47 kB
frontend/dist-report/posthog-app/_parent/products/tasks/frontend/TaskTracker 27.5 kB
frontend/dist-report/posthog-app/_parent/products/tracing/frontend/TracingScene 87.1 kB
frontend/dist-report/posthog-app/_parent/products/user_interviews/frontend/UserInterview 10.8 kB
frontend/dist-report/posthog-app/_parent/products/user_interviews/frontend/UserInterviewResponse 8.52 kB
frontend/dist-report/posthog-app/_parent/products/user_interviews/frontend/UserInterviews 6.94 kB
frontend/dist-report/posthog-app/_parent/products/visual_review/frontend/scenes/VisualReviewIndexScene 3.48 kB
frontend/dist-report/posthog-app/_parent/products/visual_review/frontend/scenes/VisualReviewRunScene 47.7 kB
frontend/dist-report/posthog-app/_parent/products/visual_review/frontend/scenes/VisualReviewRunsScene 8.71 kB
frontend/dist-report/posthog-app/_parent/products/visual_review/frontend/scenes/VisualReviewSettingsScene 12.1 kB
frontend/dist-report/posthog-app/_parent/products/visual_review/frontend/scenes/VisualReviewSnapshotHistoryScene 14.7 kB
frontend/dist-report/posthog-app/_parent/products/visual_review/frontend/scenes/VisualReviewSnapshotOverviewScene 20.3 kB
frontend/dist-report/posthog-app/_parent/products/workflows/frontend/TemplateLibrary/MessageTemplate 17.6 kB
frontend/dist-report/posthog-app/_parent/products/workflows/frontend/Workflows/WorkflowScene 107 kB
frontend/dist-report/posthog-app/_parent/products/workflows/frontend/WorkflowsScene 62.5 kB
frontend/dist-report/posthog-app/src/index 62.5 kB
frontend/dist-report/posthog-app/src/layout/panel-layout/ai-first/tabs/NavTabChat 7.89 kB
frontend/dist-report/posthog-app/src/lib/components/ActivityLog/describers 130 kB
frontend/dist-report/posthog-app/src/lib/components/Cards/TextCard/TextCardMarkdownEditor 10.6 kB
frontend/dist-report/posthog-app/src/lib/components/MonacoDiffEditor 533 B
frontend/dist-report/posthog-app/src/lib/components/Shortcuts/utils/DebugCHQueriesImpl 20.1 kB
frontend/dist-report/posthog-app/src/lib/components/Support/supportRouterLogic 1.56 kB
frontend/dist-report/posthog-app/src/lib/lemon-ui/LemonMarkdown/MermaidDiagram 2 kB
frontend/dist-report/posthog-app/src/lib/lemon-ui/LemonTextArea/LemonTextAreaMarkdown 790 B
frontend/dist-report/posthog-app/src/lib/lemon-ui/Link/Link 415 B
frontend/dist-report/posthog-app/src/lib/monaco/CodeEditor 448 B
frontend/dist-report/posthog-app/src/lib/monaco/CodeEditorImpl 26.5 kB
frontend/dist-report/posthog-app/src/lib/monaco/CodeEditorInline 649 B
frontend/dist-report/posthog-app/src/lib/monaco/vimMode 211 kB
frontend/dist-report/posthog-app/src/lib/ui/Button/ButtonPrimitives 482 B
frontend/dist-report/posthog-app/src/queries/nodes/WebVitals/WebVitals 12.7 kB
frontend/dist-report/posthog-app/src/queries/nodes/WebVitals/WebVitalsPathBreakdown 5.13 kB
frontend/dist-report/posthog-app/src/queries/Query/Query 6.34 kB
frontend/dist-report/posthog-app/src/queries/schema 955 kB
frontend/dist-report/posthog-app/src/scenes/activity/explore/EventsScene 8.51 kB
frontend/dist-report/posthog-app/src/scenes/activity/explore/SessionsScene 9.85 kB
frontend/dist-report/posthog-app/src/scenes/activity/live/LiveEventsTable 6.58 kB
frontend/dist-report/posthog-app/src/scenes/agentic/AgenticAuthorize 5.51 kB
frontend/dist-report/posthog-app/src/scenes/approvals/ApprovalDetail 17.7 kB
frontend/dist-report/posthog-app/src/scenes/approvals/changeRequestsLogic 622 B
frontend/dist-report/posthog-app/src/scenes/audit-logs/AdvancedActivityLogsScene 43 kB
frontend/dist-report/posthog-app/src/scenes/AuthenticatedShell 207 kB
frontend/dist-report/posthog-app/src/scenes/authentication/account/AccountConnected 3.32 kB
frontend/dist-report/posthog-app/src/scenes/authentication/account/AgenticAccountMismatch 2.43 kB
frontend/dist-report/posthog-app/src/scenes/authentication/account/credential-review/CredentialReview 5.04 kB
frontend/dist-report/posthog-app/src/scenes/authentication/cli/CLIAuthorize 12.1 kB
frontend/dist-report/posthog-app/src/scenes/authentication/cli/CLILive 4.05 kB
frontend/dist-report/posthog-app/src/scenes/authentication/email-mfa-verify/EmailMFAVerify 3.04 kB
frontend/dist-report/posthog-app/src/scenes/authentication/invite-signup/InviteSignup 1.44 kB
frontend/dist-report/posthog-app/src/scenes/authentication/login-2fa/Login2FA 4.74 kB
frontend/dist-report/posthog-app/src/scenes/authentication/login/Login 1.42 kB
frontend/dist-report/posthog-app/src/scenes/authentication/login/loginLogic 569 B
frontend/dist-report/posthog-app/src/scenes/authentication/password-reset/PasswordReset 4.5 kB
frontend/dist-report/posthog-app/src/scenes/authentication/password-reset/PasswordResetComplete 3.06 kB
frontend/dist-report/posthog-app/src/scenes/authentication/shared/passkeyLogic 602 B
frontend/dist-report/posthog-app/src/scenes/authentication/signup/SignupContainer 1.42 kB
frontend/dist-report/posthog-app/src/scenes/authentication/two-factor-reset/TwoFactorReset 4.04 kB
frontend/dist-report/posthog-app/src/scenes/authentication/vercel/VercelConnect 5.03 kB
frontend/dist-report/posthog-app/src/scenes/authentication/vercel/VercelLinkError 2.3 kB
frontend/dist-report/posthog-app/src/scenes/authentication/verify-email/VerifyEmail 1.44 kB
frontend/dist-report/posthog-app/src/scenes/billing/AuthorizationStatus 768 B
frontend/dist-report/posthog-app/src/scenes/billing/Billing 717 B
frontend/dist-report/posthog-app/src/scenes/billing/BillingSection 21.7 kB
frontend/dist-report/posthog-app/src/scenes/code-canvas/CodeCanvasLink 1.89 kB
frontend/dist-report/posthog-app/src/scenes/cohorts/Cohort 33.9 kB
frontend/dist-report/posthog-app/src/scenes/cohorts/CohortCalculationHistory 7.3 kB
frontend/dist-report/posthog-app/src/scenes/cohorts/Cohorts 11 kB
frontend/dist-report/posthog-app/src/scenes/coupons/Coupons 895 B
frontend/dist-report/posthog-app/src/scenes/dashboard/Dashboard 7.76 kB
frontend/dist-report/posthog-app/src/scenes/dashboard/dashboards/Dashboards 22.6 kB
frontend/dist-report/posthog-app/src/scenes/dashboard/dashboards/templates/DashboardTemplateCopyScene 7.02 kB
frontend/dist-report/posthog-app/src/scenes/data-management/DataManagementScene 6.65 kB
frontend/dist-report/posthog-app/src/scenes/data-management/definition/DefinitionEdit 23.3 kB
frontend/dist-report/posthog-app/src/scenes/data-management/definition/DefinitionView 31.5 kB
frontend/dist-report/posthog-app/src/scenes/data-management/MaterializedColumns/MaterializedColumns 12.8 kB
frontend/dist-report/posthog-app/src/scenes/data-management/variables/SqlVariableEditScene 8.5 kB
frontend/dist-report/posthog-app/src/scenes/data-pipelines/batch-exports/BatchExportScene 67.8 kB
frontend/dist-report/posthog-app/src/scenes/data-pipelines/DataPipelinesNewScene 5.25 kB
frontend/dist-report/posthog-app/src/scenes/data-pipelines/DestinationsScene 5.68 kB
frontend/dist-report/posthog-app/src/scenes/data-pipelines/event-filtering/EventFilterScene 23.3 kB
frontend/dist-report/posthog-app/src/scenes/data-pipelines/legacy-plugins/LegacyPluginScene 22 kB
frontend/dist-report/posthog-app/src/scenes/data-pipelines/TransformationsScene 4.88 kB
frontend/dist-report/posthog-app/src/scenes/data-pipelines/WebScriptsScene 5.54 kB
frontend/dist-report/posthog-app/src/scenes/data-warehouse/DataWarehouseScene 2.02 kB
frontend/dist-report/posthog-app/src/scenes/data-warehouse/editor/EditorScene 4.91 kB
frontend/dist-report/posthog-app/src/scenes/debug/DebugScene 25.3 kB
frontend/dist-report/posthog-app/src/scenes/debug/hog/HogRepl 8.95 kB
frontend/dist-report/posthog-app/src/scenes/experiments/Experiment 227 kB
frontend/dist-report/posthog-app/src/scenes/experiments/Experiments 23.3 kB
frontend/dist-report/posthog-app/src/scenes/experiments/notebook/NotebookCompactTable 1.98 kB
frontend/dist-report/posthog-app/src/scenes/experiments/SharedMetrics/SharedMetric 12.3 kB
frontend/dist-report/posthog-app/src/scenes/experiments/SharedMetrics/SharedMetrics 1.81 kB
frontend/dist-report/posthog-app/src/scenes/exports/ExportsScene 5.53 kB
frontend/dist-report/posthog-app/src/scenes/feature-flags/FeatureFlag 117 kB
frontend/dist-report/posthog-app/src/scenes/feature-flags/FeatureFlags 3.9 kB
frontend/dist-report/posthog-app/src/scenes/groups/Group 23.5 kB
frontend/dist-report/posthog-app/src/scenes/groups/Groups 9.48 kB
frontend/dist-report/posthog-app/src/scenes/groups/GroupsNew 8.59 kB
frontend/dist-report/posthog-app/src/scenes/health-alerts/HealthAlertsScene 6.38 kB
frontend/dist-report/posthog-app/src/scenes/health/categoryDetail/HealthCategoryDetailScene 13.2 kB
frontend/dist-report/posthog-app/src/scenes/health/HealthScene 17.1 kB
frontend/dist-report/posthog-app/src/scenes/health/pipelineStatus/PipelineStatusScene 12.2 kB
frontend/dist-report/posthog-app/src/scenes/heatmaps/scenes/heatmap/HeatmapNewScene 5.15 kB
frontend/dist-report/posthog-app/src/scenes/heatmaps/scenes/heatmap/HeatmapRecordingScene 5.15 kB
frontend/dist-report/posthog-app/src/scenes/heatmaps/scenes/heatmap/HeatmapScene 7.87 kB
frontend/dist-report/posthog-app/src/scenes/heatmaps/scenes/heatmaps/HeatmapsScene 5.16 kB
frontend/dist-report/posthog-app/src/scenes/hog-functions/HogFunctionScene 60.6 kB
frontend/dist-report/posthog-app/src/scenes/hog-functions/misc/Diff 1.35 kB
frontend/dist-report/posthog-app/src/scenes/inbox/InboxScene 223 kB
frontend/dist-report/posthog-app/src/scenes/insights/InsightQuickStart/InsightQuickStart 8.16 kB
frontend/dist-report/posthog-app/src/scenes/insights/InsightScene 41.2 kB
frontend/dist-report/posthog-app/src/scenes/insights/views/BoxPlot/BoxPlot 4.93 kB
frontend/dist-report/posthog-app/src/scenes/insights/views/CalendarHeatMap/CalendarHeatMap 9.26 kB
frontend/dist-report/posthog-app/src/scenes/insights/views/RegionMap/RegionMap 30.7 kB
frontend/dist-report/posthog-app/src/scenes/insights/views/WorldMap/WorldMap 6.1 kB
frontend/dist-report/posthog-app/src/scenes/instance/AsyncMigrations/AsyncMigrations 14.3 kB
frontend/dist-report/posthog-app/src/scenes/instance/DeadLetterQueue/DeadLetterQueue 6.65 kB
frontend/dist-report/posthog-app/src/scenes/instance/QueryPerformance/QueryPerformance 12.4 kB
frontend/dist-report/posthog-app/src/scenes/instance/SystemStatus/SystemStatus 18.1 kB
frontend/dist-report/posthog-app/src/scenes/integrations/IntegrationsLandingScene 1.67 kB
frontend/dist-report/posthog-app/src/scenes/IntegrationsRedirect/IntegrationsRedirect 955 B
frontend/dist-report/posthog-app/src/scenes/marketing-analytics/MarketingAnalyticsScene 46.8 kB
frontend/dist-report/posthog-app/src/scenes/max/Max 20.5 kB
frontend/dist-report/posthog-app/src/scenes/max/messages/adapters/CreateInsightWidget 6.99 kB
frontend/dist-report/posthog-app/src/scenes/max/messages/adapters/CreateNotebookWidget 1.8 kB
frontend/dist-report/posthog-app/src/scenes/max/messages/adapters/EditDiffRenderer 3.23 kB
frontend/dist-report/posthog-app/src/scenes/max/messages/adapters/ErrorTrackingWidget 7.56 kB
frontend/dist-report/posthog-app/src/scenes/max/messages/adapters/QueryWidget 6.93 kB
frontend/dist-report/posthog-app/src/scenes/max/messages/adapters/SearchSessionRecordingsWidget 7.58 kB
frontend/dist-report/posthog-app/src/scenes/max/messages/adapters/UpsertDashboardWidget 1.61 kB
frontend/dist-report/posthog-app/src/scenes/models/ModelsScene 20.5 kB
frontend/dist-report/posthog-app/src/scenes/models/NodeDetailScene 19.8 kB
frontend/dist-report/posthog-app/src/scenes/moveToPostHogCloud/MoveToPostHogCloud 4.5 kB
frontend/dist-report/posthog-app/src/scenes/new-tab/NewTabScene 2.76 kB
frontend/dist-report/posthog-app/src/scenes/notebooks/NotebookCanvasScene 12.3 kB
frontend/dist-report/posthog-app/src/scenes/notebooks/NotebookPanel/NotebookPanel 14.3 kB
frontend/dist-report/posthog-app/src/scenes/notebooks/NotebookScene 18 kB
frontend/dist-report/posthog-app/src/scenes/notebooks/NotebooksScene 8.69 kB
frontend/dist-report/posthog-app/src/scenes/oauth/OAuthAuthorize 810 B
frontend/dist-report/posthog-app/src/scenes/onboarding/legacy/coupon/OnboardingCouponRedemption 1.34 kB
frontend/dist-report/posthog-app/src/scenes/onboarding/Onboarding 785 kB
frontend/dist-report/posthog-app/src/scenes/onboarding/shared/sdkHealth/SdkHealthScene 9.04 kB
frontend/dist-report/posthog-app/src/scenes/organization/ConfirmOrganization/ConfirmOrganization 4.5 kB
frontend/dist-report/posthog-app/src/scenes/organization/Create/Create 704 B
frontend/dist-report/posthog-app/src/scenes/organization/Deactivated 1.17 kB
frontend/dist-report/posthog-app/src/scenes/organization/PendingDeletion 2.24 kB
frontend/dist-report/posthog-app/src/scenes/persons/PersonScene 28.4 kB
frontend/dist-report/posthog-app/src/scenes/persons/PersonsScene 11.7 kB
frontend/dist-report/posthog-app/src/scenes/PreflightCheck/PreflightCheck 5.57 kB
frontend/dist-report/posthog-app/src/scenes/product-tours/ProductTour 273 kB
frontend/dist-report/posthog-app/src/scenes/product-tours/ProductTours 5.97 kB
frontend/dist-report/posthog-app/src/scenes/project-homepage/ProjectHomepage 27.2 kB
frontend/dist-report/posthog-app/src/scenes/project/Create/Create 982 B
frontend/dist-report/posthog-app/src/scenes/project/PendingDeletion 2.6 kB
frontend/dist-report/posthog-app/src/scenes/resource-transfer/ResourceTransfer 10.5 kB
frontend/dist-report/posthog-app/src/scenes/saved-insights/SavedInsights 3.47 kB
frontend/dist-report/posthog-app/src/scenes/session-recordings/detail/SessionRecordingDetail 8.55 kB
frontend/dist-report/posthog-app/src/scenes/session-recordings/file-playback/SessionRecordingFilePlaybackScene 11.2 kB
frontend/dist-report/posthog-app/src/scenes/session-recordings/kiosk/SessionRecordingsKiosk 16.6 kB
frontend/dist-report/posthog-app/src/scenes/session-recordings/player/modal/SessionPlayerModal 8.26 kB
frontend/dist-report/posthog-app/src/scenes/session-recordings/player/snapshot-processing/DecompressionWorkerManager 323 B
frontend/dist-report/posthog-app/src/scenes/session-recordings/playlist/SessionRecordingsPlaylistScene 11.7 kB
frontend/dist-report/posthog-app/src/scenes/session-recordings/SessionRecordings 7.68 kB
frontend/dist-report/posthog-app/src/scenes/session-recordings/settings/SessionRecordingsSettingsScene 8.88 kB
frontend/dist-report/posthog-app/src/scenes/sessions/SessionProfileScene 21.8 kB
frontend/dist-report/posthog-app/src/scenes/settings/SettingsMap 6.66 kB
frontend/dist-report/posthog-app/src/scenes/settings/SettingsScene 9.96 kB
frontend/dist-report/posthog-app/src/scenes/sites/Site 1.57 kB
frontend/dist-report/posthog-app/src/scenes/startups/StartupProgram 21.1 kB
frontend/dist-report/posthog-app/src/scenes/StripeConfirmInstall/StripeConfirmInstall 3.7 kB
frontend/dist-report/posthog-app/src/scenes/subscriptions/SubscriptionScene 17.5 kB
frontend/dist-report/posthog-app/src/scenes/subscriptions/SubscriptionsScene 7.02 kB
frontend/dist-report/posthog-app/src/scenes/surveys/forms/SurveyFormBuilder 3.02 kB
frontend/dist-report/posthog-app/src/scenes/surveys/Survey 7.48 kB
frontend/dist-report/posthog-app/src/scenes/surveys/Surveys 27.7 kB
frontend/dist-report/posthog-app/src/scenes/surveys/wizard/SurveyWizard 69.7 kB
frontend/dist-report/posthog-app/src/scenes/themes/CustomCssScene 4.91 kB
frontend/dist-report/posthog-app/src/scenes/toolbar-launch/ToolbarLaunch 3.97 kB
frontend/dist-report/posthog-app/src/scenes/Unsubscribe/Unsubscribe 1.71 kB
frontend/dist-report/posthog-app/src/scenes/web-analytics/SessionAttributionExplorer/SessionAttributionExplorerScene 12.3 kB
frontend/dist-report/posthog-app/src/scenes/web-analytics/WebAnalyticsScene 20.8 kB
frontend/dist-report/posthog-app/src/scenes/wizard/Wizard 4.45 kB
frontend/dist-report/posthog-app/src/sharedChunkAnchors 1.33 kB
frontend/dist-report/render-query/src/render-query/render-query 24.9 MB
frontend/dist-report/toolbar/src/toolbar/toolbar 11.3 MB

compressed-size-action

… skill-read masking

The builder had no machine-readable view of the agent `spec`, so authoring a
revision meant guessing the shape and hitting validation errors one field at a
time (chat-trigger auth, reasoning enum, secrets union, allowed_hosts), then
reverse-engineering other agents' specs to recover the format.

- Add native `@posthog/agent-applications-spec-schema` returning
  `z.toJSONSchema(AgentSpecSchema)` — generated from the canonical Zod source,
  so it can't drift from what the API validates; computed in-process with no
  round-trip. The sibling of `agent-applications-native-tools-list`.
- Wire it into the agent-builder spec + the agent.md tool surface, and trim the
  authoring / editing / mental-model skills that just restated the spec shape,
  pointing them at the tool instead (keeps the judgment, drops the duplication).
- Fix readBundleFile/load-skill collapsing every read failure into a
  permanent-sounding "not found in the bundle": distinguish a genuine 404 (null)
  from an operational error (surfaced as retryable), so a transient store blip
  no longer makes the builder give up and run without its skills.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@benjackwhite benjackwhite changed the title feat(agent-platform): multi-model selection (auto/manual) + runtime fallback feat(agent-platform)!: model selection via model_policy (auto/manual) + runtime fallback Jun 19, 2026
@tests-posthog

tests-posthog Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

⏭️ Skipped snapshot commit because branch advanced to fb519fb while workflow was testing a00a5b1.

The new commit will trigger its own snapshot update workflow.

If you expected this workflow to succeed: This can happen due to concurrent commits. To get a fresh workflow run, either:

  • Merge master into your branch, or
  • Push an empty commit: git commit --allow-empty -m 'trigger CI' && git push

benjackwhite and others added 2 commits June 19, 2026 13:59
…allback

Replace the single `spec.model` with a `model_policy`:
  - `auto` (default): pick a level (low/medium/high); the platform resolves it
    to a priority-ordered, cross-provider model list (MODEL_POLICY_LEVELS) at
    session start, kept current centrally so auto agents get new models without
    a revision.
  - `manual`: an explicit priority-ordered model list, with per-model reasoning.
Legacy `spec.model` still works (normalized to a 1-element manual policy);
`modelPolicyToList(spec)` is the single resolution point.

Runner: resolve the full ordered list once per session and wrap the stream with
`fallbackStreamFn` — on a transient/provider-side failure (5xx/conn/timeout/429)
it retries the next model; permanent 4xx and aborts pass through, and it can't
fall over once the stream has committed (first content event). Single-model
sessions skip the wrapper (identical to today). `$ai_generation` tags the model
that actually answered plus `$agent_model_attempt`/`$ai_fallback_from` markers.

Also: mirror the schema in the Django write-schema (+ tests), and rewrite the
meta-agent `choosing-the-model` skill + example spec.json for the new shape.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… spec.model)

BREAKING (pre-release): `spec.model` is gone. Agents select models solely via
`spec.model_policy` (auto level — the default — or a manual priority list).
`modelPolicyToList(spec)` resolves it; `spec.model_policy` defaults to
`{ mode: 'auto', level: 'medium' }` when omitted.

- zod: drop `model`, `model_policy` carries the auto/medium default, drop the
  legacy `resolveModelPolicy` shim.
- Django write-schema: drop `model`, add `model_policy` to required (relaxed via
  its default); update schema tests.
- Migrate every example spec.json (manual single-model preserves their pinned
  model) and all spec-constructing tests/harness to `model_policy`.
- Update the meta-agent skills that referenced `spec.model`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@benjackwhite benjackwhite force-pushed the ben/agent-multi-model branch from fb519fb to dfd66fd Compare June 19, 2026 12:02
@benjackwhite benjackwhite changed the base branch from master to ben/agent-secrets-per-revision June 19, 2026 12:02
Base automatically changed from ben/agent-secrets-per-revision to master June 19, 2026 12:04
@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

MCP UI Apps size report

App JS CSS
debug 576.7 KB 158.4 KB
action 348.9 KB 158.4 KB
action-list 508.3 KB 158.4 KB
cohort 348.0 KB 158.4 KB
cohort-list 507.4 KB 158.4 KB
email-template 347.8 KB 158.4 KB
error-details 366.1 KB 158.4 KB
error-issue 348.6 KB 158.4 KB
error-issue-list 508.3 KB 158.4 KB
experiment 505.6 KB 158.4 KB
experiment-list 509.1 KB 158.4 KB
experiment-results 507.3 KB 158.4 KB
feature-flag 543.7 KB 158.4 KB
feature-flag-list 547.3 KB 158.4 KB
feature-flag-testing 425.8 KB 158.4 KB
insight-actors 506.3 KB 158.4 KB
invite-email-preview 347.3 KB 158.4 KB
llm-costs 503.7 KB 158.4 KB
session-recording 349.7 KB 158.4 KB
session-summary 355.2 KB 158.4 KB
survey 349.5 KB 158.4 KB
survey-global-stats 506.4 KB 158.4 KB
survey-list 509.0 KB 158.4 KB
survey-stats 506.4 KB 158.4 KB
trace-span 348.4 KB 158.4 KB
trace-span-list 508.3 KB 158.4 KB
workflow 348.3 KB 158.4 KB
workflow-list 507.7 KB 158.4 KB
query-results 676.8 KB 158.4 KB
render-ui 613.0 KB 158.4 KB
visual-review-snapshots 352.8 KB 158.4 KB

benjackwhite and others added 3 commits June 24, 2026 10:52
# Conflicts:
#	products/agent_platform/backend/migrations/max_migration.txt
#	products/agent_platform/backend/presentation/views.py
#	products/agent_platform/backend/tests/test_approvals_api.py
#	products/agent_platform/services/agent-ingress/src/triggers/slack.ts
#	products/agent_platform/services/agent-shared/src/persistence/test-reset.ts
#	products/agent_platform/services/agent-shared/src/runtime/slack-failure-notifier.ts
#	products/agent_platform/services/agent-tests/src/examples/agent-builder/agent.md
#	products/agent_platform/services/agent-tests/src/examples/agent-builder/skills/authoring-new-agents/SKILL.md
#	products/agent_platform/services/agent-tests/src/examples/agent-builder/skills/editing-agents-safely/SKILL.md
#	products/agent_platform/services/agent-tests/src/examples/agent-builder/skills/platform-mental-model/SKILL.md
#	products/agent_platform/services/agent-tests/src/examples/agent-builder/spec.json
#	products/agent_platform/services/agent-tools/src/tools/posthog-spec-schema.v1.test.ts
#	products/agent_platform/services/agent-tools/src/tools/posthog-spec-schema.v1.ts
…aster code

The merge pulled in master code/tests still using the removed top-level
spec.model: the posthog-ai example + its test, the agent-builder inspect
mock fixture, and the spec-schema tool test (asserted model in required).
Converted each to model_policy so the merged tree typechecks and the
example specs stay valid against the branch's schema.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tests-posthog

tests-posthog Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Query snapshots: Backend query snapshots updated

Changes: 2 snapshots (2 modified, 0 added, 0 deleted)

What this means:

  • Query snapshots have been automatically updated to match current output
  • These changes reflect modifications to database queries or schema

Next steps:

  • Review the query changes to ensure they're intentional
  • If unexpected, investigate what caused the query to change

Review snapshot changes →

benjackwhite and others added 2 commits June 24, 2026 12:36
…el availability

The gateway's served-model list becomes the source of truth for what a
model_policy can run; a curated grouping (MODEL_POLICY_LEVELS) is reconciled
against it instead of drifting. Closes the gap where a model string only failed
as a runtime 400 in a user's session (the original `claude-haiku-4-5` /
`gpt-5-thinking` mismatches).

- GatewayCatalog (agent-shared): typed, TTL-cached read of `{gateway}/v1/models`
  via DirectHttpClient; fails open (serves last-good / [] on a blip). Pure
  helpers: acceptedModelIds, isModelServable, validateModelPolicy,
  validateModelLevels (CI guard for tier drift), filterServableEntries.
- Author-time gate: the janitor's validate (+ freeze) rejects a model_policy
  referencing unserved models with `invalid_model`; Django surfaces the
  structured report errors so the author sees which model. model_policy is
  immutable post-freeze, so promote is covered.
- Runtime: the worker filters the resolved model list against the live catalog
  before dispatch (never empties a non-empty list).
- Discovery: `@posthog/agent-applications-models` returns served models +
  per-Mtok pricing + context window via ctx.gatewayCatalog; the
  choosing-the-model skill now points at it. Fixed the drifted `gpt-5-thinking`
  high-tier entry.
- Fixed a pre-existing post-merge regression: TypedSpecSchema (strict) still
  required `model`, rejecting model_policy specs on PUT /bundle.

Frontend model picker deferred (no existing model UI). typecheck clean;
agent-shared 509, agent-tools 114, agent-runner 184, agent-janitor 147.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
# Conflicts:
#	products/agent_platform/services/agent-runner/src/loop/driver.test.ts
#	products/agent_platform/services/agent-runner/src/loop/driver.ts
@benjackwhite benjackwhite changed the title feat(agent-platform)!: model selection via model_policy (auto/manual) + runtime fallback feat(agent-platform): model selection via model_policy (auto/manual) + runtime fallback Jun 24, 2026
benjackwhite and others added 3 commits June 24, 2026 14:24
Two gateway-path bugs in the runner driver:

- Multi-model turns failed every tool call with "Tool posthog_meta-end-turn
  not found". fallbackStreamFn wrapped sanitizingStreamFn, so the fallback's
  re-emitted `done` event resolved result() with the provider-safe tool name
  before the sanitizing layer could translate it back. Reorder so sanitizing
  is outermost (gateway-metadata inner, fallback middle).

- Settled cost was always $0. The runner looked up GET /v1/usage by an id it
  generated itself, but the gateway mints its own settlement reference and
  returns it in the X-Request-ID response header. Capture that via pi-ai's
  onResponse and key the usage lookup by it; keep Idempotency-Key for retry
  dedup, drop the ignored outbound X-Request-Id.

Adds a multi-model regression test (safe tool name echoed through the
fallback wrapper) and updates the gateway-metadata cost tests + a fail-open
case.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…a native tool

Expose the served-model catalog as one source feeding both the config UI (REST)
and the agent builder (PostHog MCP), instead of a bespoke native tool.

- janitor: GET /models → { models (id, provider, context, USD/Mtok pricing),
  levels } from the gateway catalog + MODEL_POLICY_LEVELS (single source).
- Django: GET /agent_applications/models/ (operation_id agent_applications_models)
  proxies the janitor; PAT read-scoped. The PostHog MCP surfaces it as a tool.
- agent-builder: drop the native @posthog/agent-applications-models tool; add
  agent-applications-models to its MCP allowlist (next to get-llm-total-costs).
- remove the native tool (tool + test + registry entry).
- MODEL_POLICY_LEVELS.high → [opus-4.7, gpt-5-pro] (drop the sonnet fallback).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@benjackwhite benjackwhite changed the title feat(agent-platform): model selection via model_policy (auto/manual) + runtime fallback feat(agent-platform): model selection via spec.models (auto/manual) + runtime fallback Jun 24, 2026
@assign-reviewers-posthog assign-reviewers-posthog Bot requested a review from a team June 24, 2026 16:18
- driver.ts: include the fallback `reason` in the `model.fallback` warn log
  so a 429 storm is distinguishable from a 503 outage after the fact.
- analytics-sink.ts: guard `model_attempt` with `!== undefined` (a future
  call-site passing `0` would otherwise silently drop the property).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Reviews (2): Last reviewed commit: "fix(agent-platform): address review — lo..." | Re-trigger Greptile

Comment thread products/agent_platform/backend/logic/spec_schema.py
benjackwhite and others added 2 commits June 25, 2026 08:48
# Conflicts:
#	products/agent_platform/services/agent-runner/src/loop/driver.test.ts
#	products/agent_platform/services/agent-runner/src/loop/driver.ts
@tests-posthog

tests-posthog Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

⏭️ Skipped snapshot commit because branch advanced to bbed7b7 while workflow was testing 0df2f2a.

The new commit will trigger its own snapshot update workflow.

If you expected this workflow to succeed: This can happen due to concurrent commits. To get a fresh workflow run, either:

  • Merge master into your branch, or
  • Push an empty commit: git commit --allow-empty -m 'trigger CI' && git push

1 similar comment
@tests-posthog

tests-posthog Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

⏭️ Skipped snapshot commit because branch advanced to bbed7b7 while workflow was testing 0df2f2a.

The new commit will trigger its own snapshot update workflow.

If you expected this workflow to succeed: This can happen due to concurrent commits. To get a fresh workflow run, either:

  • Merge master into your branch, or
  • Push an empty commit: git commit --allow-empty -m 'trigger CI' && git push

benjackwhite and others added 2 commits June 25, 2026 09:29
…lity, throw path)

- spec.test.ts: unit-test modelPolicyToList — auto-level expansion + order,
  auto/medium default, reasoning precedence (per-entry → policy → spec), manual
  passthrough. It's the spec.models → priority-list contract feeding fallback.
- driver.test.ts: assert the direct-path $ai_generation carries model_attempt
  and fallback_from after a fallover (the AI-observability signal for the feature).
- fallback-stream.test.ts: cover the defensive catch branch — base THROWS
  (vs emits an error event): eligible throw → fallover, non-eligible → surfaced.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tests-posthog

tests-posthog Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Query snapshots: Backend query snapshots updated

Changes: 3 snapshots (2 modified, 1 added, 0 deleted)

What this means:

  • Query snapshots have been automatically updated to match current output
  • These changes reflect modifications to database queries or schema

Next steps:

  • Review the query changes to ensure they're intentional
  • If unexpected, investigate what caused the query to change

Review snapshot changes →

@tests-posthog

tests-posthog Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

⏭️ Skipped snapshot commit because branch advanced to d7656cb while workflow was testing 39ebc97.

The new commit will trigger its own snapshot update workflow.

If you expected this workflow to succeed: This can happen due to concurrent commits. To get a fresh workflow run, either:

  • Merge master into your branch, or
  • Push an empty commit: git commit --allow-empty -m 'trigger CI' && git push

benjackwhite and others added 11 commits June 25, 2026 10:30
…ize_for

Multi-turn agent sessions are dominated by prompt-cache locality: each turn
replays a large stable prefix, and cache reads are ~0.1-0.5x of full input.
Switching providers mid-session re-reads the whole context cold (full price +
a cache-write premium), so the right unit of stability is the session.

Add `spec.models.optimize_for` (default `cost`):
- cost: the first turn walks the priority list until a model answers, then PINS
  that model for the rest of the session — every later turn uses only it, no
  cross-model failover. Keeps one provider's cache warm; if the pinned model is
  down the turn fails (after pi-ai's same-provider retries) rather than paying a
  cold re-read on a different provider.
- availability: leads with the last-served model (sticky, no thrash) but DOES
  fail over on failure, trading the cold re-read for keeping the session alive.

fallbackStreamFn now tracks the served model across turns and orders attempts
accordingly; the pin/lead is seeded from the conversation's last assistant turn
so it survives suspend→resume. Hook indices stay in original policy order, so
$ai_generation's model_attempt/fallback_from keep their meaning.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…st happy-path, stale pin)

- cost: pins the PRIMARY when it serves first and won't fall over on a later
  failure (the common-case guarantee; prior cost tests all started with the
  primary failing).
- availability: a stuck MIDDLE model leads, then the rest follow in original
  priority order ([b, a, c]) — exercises the reorder beyond the 2-model case.
- a stale initialServedId not in the list is ignored → walk from the primary.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…chema

The model-policy fields carried only enum values, so the agent builder editing
a spec saw `optimize_for: [cost, availability]` / `level: [low, medium, high]`
with no rationale — it had to rely on the choosing-the-model skill (which
predates optimize_for entirely). Add JSON-schema descriptions for level,
reasoning, optimize_for, mode, and the manual entries, so the spec is
self-documenting: the descriptions flow spec_schema.py → OpenAPI → the MCP
spec-edit tool input schema → the builder's context. Regenerated MCP types +
tool-schema snapshots.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Resolve conflicts from two master efforts that overlapped this branch's
spec.models work:

- model-pattern PR: master added a `<provider>/<model-id>` regex to
  ModelIdSchema and the Django spec schema, plus model-id tests/fixtures.
  This branch replaces the singular `model` field with the `models`
  policy (auto/manual) and intentionally relaxes ModelIdSchema to
  `min(1)` (validation moves to the gateway catalog). Took this branch's
  `models` shape in spec_schema.py, spec.ts, tests, and the generated
  frontend/MCP types + tool-schema snapshots; reverted ModelIdSchema to
  the loose `min(1)` so manual lists (e.g. `mock-static:hello`) parse.
- remove-is_preview PR (#65978): master removed the `is_preview` session
  marker and `isPreviewSideEffect`. This branch predated it. Applied the
  removal to the two files where the merge had retained it
  (ToolContext.isPreview in tool.ts, build-agent-tools.ts) while keeping
  this branch's new `gatewayCatalog` field and master's
  `webSearchProviders`.

Also corrected two pre-existing latent test assertions surfaced by the
merge (real-PG suites that omit the defaulted `optimize_for: 'cost'` on a
round-tripped manual model policy) in pg-impls.test.ts and the janitor
server.test.ts.

Verified: typecheck across all agent_platform node services; agent-shared
(526), agent-runner (203), agent-janitor (152), MCP (1947) and Django
spec-schema (45) tests pass; ruff clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Wrap the search_text/models round-trip assertion added during the master
merge — it exceeded oxfmt's line width and broke the agent-shared and
frontend format checks.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pre-existing test debt unrelated to the master merge: a few test fixtures
still used the old top-level `model` field (removed in favor of `models`)
or omitted the `optimize_for: 'cost'` default that ModelPolicySchema adds
on parse.

- test_revision_create.py: `_SPEC` POSTs through the validating create
  endpoint, which now 400s on the unknown `model` key. Translated to the
  equivalent manual `models` policy.
- typed-bundle-authoring.test.ts / example-posthog-ai.test.ts: assert the
  `models` shape (not the old `model`) and include the defaulted
  `optimize_for`.

Backend suite passes (149); example-posthog-ai parse test passes;
agent-tests typecheck clean. The typed-bundle cases need the full e2e
stack (Postgres+Redis+Kafka+SeaweedFS+gateway) to run, so those assertion
fixes are verified against the CI failure output, not a local run.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
# Conflicts:
#	products/agent_platform/frontend/generated/api.schemas.ts
#	products/agent_platform/services/agent-tests/src/examples/agent-builder/skills/editing-agents-safely/SKILL.md
#	services/mcp/src/generated/agent_platform/api.ts
The PATCH-spec case sent `{"model": "..."}` at the top level, which the
post-merge schema rejects with `additional properties not allowed` — the
field is now `spec.models` (nested mode/list). Updated the PATCH body
and assertion to the manual-mode shape.
@tests-posthog

tests-posthog Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Query snapshots: Backend query snapshots updated

Changes: 1 snapshots (1 modified, 0 added, 0 deleted)

What this means:

  • Query snapshots have been automatically updated to match current output
  • These changes reflect modifications to database queries or schema

Next steps:

  • Review the query changes to ensure they're intentional
  • If unexpected, investigate what caused the query to change

Review snapshot changes →

- fallback-stream: guard the detached IIFE so no path leaves the stream
  hanging. Post-commit re-throw and any unexpected throw from the
  dispatch loop now surface as a stop=error result via the outer
  `run().catch(...)` (callers awaiting `.result()` previously hung).
- fallback-stream: new `FallbackHooks.onPinLost` fired when the
  session's sticky model is no longer in the policy list. Previously a
  delisted model silently unpinned and lost prompt-cache warmth.
- spec: restore `<provider>/<model-id>` regex on `ModelIdSchema`
  (zod + Python JSON schema). Bare ids freeze fine but the gateway 400s
  on the first session — catch at authoring time, not at runtime.
- gateway-catalog `validateModelPolicy`: format check is now
  unconditional (independent of catalog availability). The fail-open
  on servability still applies, but a malformed id is always wrong.
- Tests: bare id / uppercase provider / missing model id rejection
  cases on both Python and TS schemas; pin-lost callback hookup;
  IIFE guard pinned by post-commit-rejection + sync-throw cases.
- Fix `mock-static:hello` → `mock-static/hello` typo in pg-impls test.

Followups for the PR author (not in this commit):
- No Django data migration for old rows with top-level `spec.model`.
  zod strips unknown keys, so an authored opus pick silently becomes
  the auto/medium default. Worth a one-shot backfill or a fail-loud
  shim before the breaking-change release.
- gateway-catalog `list()` inflight dedup serves stale cache on fetch
  failure; consider surfacing `{value, fresh, lastError}` so the
  caller can log.
@dmarticus

dmarticus commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Items I flagged in review but deliberately left for you — they're judgment calls or larger surface changes you should drive.

1. Gateway catalog inflight dedup serves stale cache on fetch failure

In gateway-catalog.ts, HttpGatewayCatalog.list() (~L262): when two callers race, the second awaits the first's inflight fetch. If that fetch fails and falls back to cache, the second caller gets the stale value with no signal a fresh fetch was just attempted and failed. Most common impact is post-token-rotation, where the stale catalog still references the old auth realm.

Fix changes the list() return shape:

interface CatalogResult {
    models: CatalogModel[]
    fresh: boolean
    lastError?: Error
}

Callers can then log on fresh === false && lastError != null. Worth its own PR since it touches every consumer.

2. Driver fail-open path can ship delisted models to the gateway

Related to the first point. filterServableEntries(modelPolicy, []) returns the full list unfiltered on an empty catalog ("never strand a live session", ~L217). If the catalog is genuinely unreachable (0 entries on a freshly-restarted worker, not stale-cached), the session calls the gateway with an unserved model and gets a runtime 400 instead of a clear policy-resolution error.

Suggestion: distinguish "catalog unreachable" (use cached list, log loudly) from "catalog returned empty" (terminal — refuse to start). Today both look identical downstream.

@tests-posthog

tests-posthog Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Query snapshots: Backend query snapshots updated

Changes: 2 snapshots (2 modified, 0 added, 0 deleted)

What this means:

  • Query snapshots have been automatically updated to match current output
  • These changes reflect modifications to database queries or schema

Next steps:

  • Review the query changes to ensure they're intentional
  • If unexpected, investigate what caused the query to change

Review snapshot changes →

The tightened ModelIdSchema regex (`<provider>/<model-id>`) rejects bare ids
like `x`/`y`, breaking 17 server.test.ts cases on AgentSpecSchema.parse.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants