AGENTS.md@ai-gateway/src/spend ยท diff
git:20261118.fe6aa6b to git:20261119.876cd34
1 added, 1 removed. Audit A to A.
What this update changes in the checks
No check changed: every fixed check gives the same answer before and after this update.
A tripped check is a label, not a verdict: read the matched text and the lines below. This week's updates that newly trip a check.
`cost.rs`: Logic duplicated with `packages/shared/src/server/pricing-tiers/{matcher,calculateModelUsageCosts}.ts`. Keep logic in sync.
`window.rs`: Logic duplicated with `web/src/features/ai-gateway/fns/gatewaySpendLimitWindow.ts`. Keep logic in sync.
After changing the TypeScript cost calculation, regenerate `ai-gateway/tests/fixtures/cost-cases.json`:
`pnpm --filter @langfuse/shared run test gatewayCostFixture -u`.
- Counter keys start with `gateway-spend:`; nothing else may write under that prefix. Total counters never expire, so the Redis must not evict (see README "Spend limits").
+ Counter keys start with `gateway-spend:`; nothing else may write under that prefix. Total counters never expire, so the Redis must not evict (see README "Budgets").