:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(llma): repoint update-ai-costs paths after pipelines move (#65606)
Brandonbe5749515114
diff --git a/.gitattributes b/.gitattributesindex 35267d9eec1a..5ce8329ece19 100644--- a/.gitattributes+++ b/.gitattributes@@ -25,7 +25,7 @@ posthog/schema.py linguist-generatedposthog/temporal/data_imports/sources/generated_configs.py linguist-generatedposthog/temporal/proxy_service/proto/*_pb2*.py linguist-generated-nodejs/src/ingestion/ai/costs/providers/canonical-providers.ts linguist-generated+nodejs/src/ingestion/pipelines/ai/costs/providers/canonical-providers.ts linguist-generatedposthog/hogql/grammar/HogQLLexer.py linguist-generatedposthog/hogql/grammar/HogQLParser.py linguist-generateddiff --git a/.github/CODEOWNERS-soft b/.github/CODEOWNERS-softindex 0a6445c3dabb..1cd2eb772eb6 100644--- a/.github/CODEOWNERS-soft+++ b/.github/CODEOWNERS-soft@@ -201,9 +201,9 @@ services/mcp/src/tools/aiObservability/ @PostHog/team-ai-observabilityservices/mcp/src/ui-apps/apps/generated/llm-costs.tsx @PostHog/team-ai-observability# LLM Gateway - owned by @PostHog/team-ai-gateway-nodejs/src/ingestion/ai/costs/ @PostHog/team-ai-observability @PostHog/team-ai-gateway-nodejs/src/ingestion/ai/costs/scripts/ @PostHog/team-ai-gateway-nodejs/src/ingestion/ai/costs/providers/ @PostHog/team-ai-gateway+nodejs/src/ingestion/pipelines/ai/costs/ @PostHog/team-ai-observability @PostHog/team-ai-gateway+nodejs/src/ingestion/pipelines/ai/costs/scripts/ @PostHog/team-ai-gateway+nodejs/src/ingestion/pipelines/ai/costs/providers/ @PostHog/team-ai-gatewayproducts/ai_observability/backend/api/proxy.py @PostHog/team-ai-gatewayproducts/ai_observability/backend/api/test/test_proxy.py @PostHog/team-ai-gatewayproducts/ai_observability/frontend/playground/ @PostHog/team-ai-gatewaydiff --git a/.github/scripts/assign-reviewers.js b/.github/scripts/assign-reviewers.jsindex 9668b4b8f57e..4badf43425c1 100644--- a/.github/scripts/assign-reviewers.js+++ b/.github/scripts/assign-reviewers.js@@ -22,8 +22,8 @@ const CONFIG = {'**/*.snap','**/*.ambr',// Regenerated wholesale by `pnpm update-ai-costs` from the OpenRouter API.- 'nodejs/src/ingestion/ai/costs/providers/canonical-providers.ts',- 'nodejs/src/ingestion/ai/costs/providers/llm-costs.json',+ 'nodejs/src/ingestion/pipelines/ai/costs/providers/canonical-providers.ts',+ 'nodejs/src/ingestion/pipelines/ai/costs/providers/llm-costs.json',],// An owner is formally requested for review only if their footprint clears// one of these bars; otherwise they are demoted to the explanation commentdiff --git a/.github/scripts/assign-reviewers.test.js b/.github/scripts/assign-reviewers.test.jsindex 502d9ce37774..9fd16ecb078a 100644--- a/.github/scripts/assign-reviewers.test.js+++ b/.github/scripts/assign-reviewers.test.js@@ -30,9 +30,9 @@ describe('assign-reviewers', () => {['uv.lock', true],['posthog/api/test/__snapshots__/test_survey.ambr', true],['frontend/src/scenes/x/Component.test.tsx.snap', true],- ['nodejs/src/ingestion/ai/costs/providers/canonical-providers.ts', true],- ['nodejs/src/ingestion/ai/costs/providers/llm-costs.json', true],- ['nodejs/src/ingestion/ai/costs/providers/manual-providers.ts', false],+ ['nodejs/src/ingestion/pipelines/ai/costs/providers/canonical-providers.ts', true],+ ['nodejs/src/ingestion/pipelines/ai/costs/providers/llm-costs.json', true],+ ['nodejs/src/ingestion/pipelines/ai/costs/providers/manual-providers.ts', false],['posthog/api/survey.py', false],['frontend/src/scenes/surveys/Survey.tsx', false],])('%s -> %s', (filename, expected) => {diff --git a/.github/workflows/update-ai-costs.yml b/.github/workflows/update-ai-costs.ymlindex 7331e38d307c..8307609fa815 100644--- a/.github/workflows/update-ai-costs.yml+++ b/.github/workflows/update-ai-costs.yml@@ -47,18 +47,18 @@ jobs:- name: Format generated filesrun: |cd nodejs- pnpm prettier --write src/ingestion/ai/costs/providers/canonical-providers.ts src/ingestion/ai/costs/providers/llm-costs.json+ pnpm prettier --write src/ingestion/pipelines/ai/costs/providers/canonical-providers.ts src/ingestion/pipelines/ai/costs/providers/llm-costs.json- name: Check for changesid: check-changesrun: |- if git diff --quiet nodejs/src/ingestion/ai/costs/providers/canonical-providers.ts nodejs/src/ingestion/ai/costs/providers/llm-costs.json; then+ if git diff --quiet nodejs/src/ingestion/pipelines/ai/costs/providers/canonical-providers.ts nodejs/src/ingestion/pipelines/ai/costs/providers/llm-costs.json; thenecho "changes=false" >> $GITHUB_OUTPUTecho "No changes detected in AI costs"elseecho "changes=true" >> $GITHUB_OUTPUTecho "Changes detected in AI costs"- git diff --stat nodejs/src/ingestion/ai/costs/providers/canonical-providers.ts nodejs/src/ingestion/ai/costs/providers/llm-costs.json+ git diff --stat nodejs/src/ingestion/pipelines/ai/costs/providers/canonical-providers.ts nodejs/src/ingestion/pipelines/ai/costs/providers/llm-costs.jsonfi- name: Clean up stale branchdiff --git a/nodejs/package.json b/nodejs/package.jsonindex 6053e73d99c6..073fb1099d67 100644--- a/nodejs/package.json+++ b/nodejs/package.json@@ -47,7 +47,7 @@"build:cyclotron": "pnpm --filter=@posthog/cyclotron package","build:cyclotron:dev": "pnpm --filter=@posthog/cyclotron run build:dev","generate:personhog-proto": "cd ../proto && buf generate --template ../nodejs/buf.gen.yaml --path personhog/service --path personhog/types .",- "update-ai-costs": "ts-node src/ingestion/ai/costs/scripts/update-ai-costs.ts",+ "update-ai-costs": "ts-node src/ingestion/pipelines/ai/costs/scripts/update-ai-costs.ts","sync-segment-icons": "DATABASE_URL=something ts-node src/cdp/segment/sync-segment-icons.ts","start:recording-rasterizer": "node dist/recording-rasterizer/index.js"},