fix(ai): separated codex orchestration usage

- Added a Usage.orchestration sidecar for provider-side service tokens so Responses/Codex totals and costs stay accurate without inflating visible prompt input/cache buckets.
- Updated Codex/WebSocket usage, session/status aggregates, and usage reporting to preserve orchestration-aware totals.
- Added regressions for OpenAI Responses accounting, Codex WebSocket terminal usage, cost calculation, and session aggregation.

Fixes #4469
This commit is contained in:
roboomp
2026-07-03 16:44:12 +00:00
parent d0c1890a6c
commit a52ed682c7
35 changed files with 355 additions and 29 deletions
@@ -89,6 +89,10 @@ describe("executeJs workflow helpers", () => {
output: 777,
cacheRead: 0,
cacheWrite: 0,
totalTokens: 787,
orchestrationInput: 0,
orchestrationOutput: 0,
orchestrationCacheRead: 0,
premiumRequests: 0,
cost: 0,
}),