fix: report per-request Anthropic usage in chat token accounting (#27966)

This commit is contained in:
Michael Suchacz
2026-08-12 12:52:22 +02:00
committed by GitHub
parent ac11ae52d1
commit 88e113554a
4 changed files with 78 additions and 16 deletions
+5 -3
View File
@@ -94,10 +94,12 @@ replace github.com/spf13/afero => github.com/aslilac/afero v0.0.0-20250403163713
// 5) coder/fantasy bedrock: mirror the request region when prefixing
// cross-region inference profiles so the model-ID prefix matches the
// region the request is actually signed for.
// 6) go.mod replaces pointing anthropic-sdk-go and openai-go at the
// 6) coder/fantasy#50, report per-request Anthropic usage at Finish so
// multi-iteration requests do not inflate context estimates.
// 7) go.mod replaces pointing anthropic-sdk-go and openai-go at the
// coder forks below.
// See: https://github.com/coder/fantasy/commits/bb10946892ef
replace charm.land/fantasy => github.com/coder/fantasy v0.0.0-20260810175832-bb10946892ef
// See: https://github.com/coder/fantasy/commits/6f8df3735907
replace charm.land/fantasy => github.com/coder/fantasy v0.0.0-20260812075759-6f8df3735907
// coder/coder uses a fork of charmbracelet's fork of the Anthropic Go SDK
// with performance improvements and Bedrock header cleanup.