added effective model id for routed responses

This commit is contained in:
Luxferre
2026-09-06 10:57:09 +03:00
parent c64e79b22f
commit 5291415d4e
2 changed files with 16 additions and 4 deletions
+2 -2
View File
@@ -1865,14 +1865,14 @@ func TestFormatUsage(t *testing.T) {
// With cached tokens
u1 := Usage{PromptTokens: 1000, CompletionTokens: 200, TotalTokens: 1200, CachedTokens: 800}
s1 := formatUsage(u1, 200000)
if s1 != "[tokens: 1000 prompt (800 cached, 200 uncached) + 200 completion | context: 1000/200000 (0.5%)]" {
if s1 != "[1000 prompt (800 cached, 200 uncached) + 200 completion | context: 1000/200000 (0.5%)]" {
t.Errorf("formatUsage u1 = %q", s1)
}
// Without cached tokens
u2 := Usage{PromptTokens: 120000, CompletionTokens: 500, TotalTokens: 120500}
s2 := formatUsage(u2, 200000)
if s2 != "[tokens: 120000 prompt + 500 completion | context: 120000/200000 (60.0%)]" {
if s2 != "[120000 prompt + 500 completion | context: 120000/200000 (60.0%)]" {
t.Errorf("formatUsage u2 = %q", s2)
}
}