4 Commits

Author SHA1 Message Date
Wei Zhou
e601bf2d8e
fix(pi-embedded-runner): propagate sender identity to fix Feishu doc create auto-grant (#32915)
Merged via squash.

Prepared head SHA: efb229307559ad37062b454da444567f5dca8a96
Co-authored-by: cszhouwei <1811726+cszhouwei@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-03-06 14:31:15 -08:00
cpojer
688f86bf28
chore: Fix types in tests 43/N. 2026-02-17 15:50:07 +09:00
Peter Steinberger
b9e7299a70 refactor(test): share embedded runner overflow mocks 2026-02-17 00:49:37 +00:00
artale
a62ff19a66 fix(agent): isolate last-turn total in token usage reporting (#17016)
recordAssistantUsage accumulated cacheRead across the entire multi-turn
run, and totalTokens was clamped to contextTokens. This caused
session_status to report 100% context usage regardless of actual load.

Changes:
- run.ts: capture lastTurnTotal from the most recent model call and
  inject it into the normalized usage before it reaches agentMeta.
- usage-reporting.test.ts: verify usage.total reflects current turn,
  not accumulated total.

Fixes #17016
2026-02-17 00:00:12 +01:00