Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(llma): repoint update-ai-costs paths after pipelines move (#65606)

Brandonbe5749515114
diff --git a/.gitattributes b/.gitattributes
index 35267d9eec1a..5ce8329ece19 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -25,7 +25,7 @@ posthog/schema.py linguist-generated
posthog/temporal/data_imports/sources/generated_configs.py linguist-generated
posthog/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-generated
posthog/hogql/grammar/HogQLLexer.py linguist-generated
posthog/hogql/grammar/HogQLParser.py linguist-generated
diff --git a/.github/CODEOWNERS-soft b/.github/CODEOWNERS-soft
index 0a6445c3dabb..1cd2eb772eb6 100644
--- a/.github/CODEOWNERS-soft
+++ b/.github/CODEOWNERS-soft
@@ -201,9 +201,9 @@ services/mcp/src/tools/aiObservability/ @PostHog/team-ai-observability
services/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-gateway
products/ai_observability/backend/api/proxy.py @PostHog/team-ai-gateway
products/ai_observability/backend/api/test/test_proxy.py @PostHog/team-ai-gateway
products/ai_observability/frontend/playground/ @PostHog/team-ai-gateway
diff --git a/.github/scripts/assign-reviewers.js b/.github/scripts/assign-reviewers.js
index 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 comment
diff --git a/.github/scripts/assign-reviewers.test.js b/.github/scripts/assign-reviewers.test.js
index 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.yml
index 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 files
run: |
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 changes
id: check-changes
run: |
- 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; then
echo "changes=false" >> $GITHUB_OUTPUT
echo "No changes detected in AI costs"
else
echo "changes=true" >> $GITHUB_OUTPUT
echo "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.json
fi
- name: Clean up stale branch
diff --git a/nodejs/package.json b/nodejs/package.json
index 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"
},