fix(opencode): include cache writes in ACP usage (#40450)
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
5b4fb1f770
commit
9f38562237
@@ -207,7 +207,7 @@ describe("acp usage", () => {
|
||||
)
|
||||
})
|
||||
|
||||
it.effect("sends ACP usage_update with context size and cumulative assistant cost", () => {
|
||||
it.effect("includes cache reads and writes in ACP context usage", () => {
|
||||
const updates: SessionNotification[] = []
|
||||
return Effect.gen(function* () {
|
||||
const usage = yield* UsageService.Service
|
||||
@@ -222,7 +222,7 @@ describe("acp usage", () => {
|
||||
sessionId: "ses_1",
|
||||
update: {
|
||||
sessionUpdate: "usage_update",
|
||||
used: 15,
|
||||
used: 22,
|
||||
size: 128_000,
|
||||
cost: { amount: 3, currency: "USD" },
|
||||
},
|
||||
@@ -239,7 +239,7 @@ describe("acp usage", () => {
|
||||
input: 10,
|
||||
output: 20,
|
||||
reasoning: 0,
|
||||
cache: { read: 5, write: 0 },
|
||||
cache: { read: 5, write: 7 },
|
||||
},
|
||||
}),
|
||||
]),
|
||||
|
||||
Reference in New Issue
Block a user