Skip to content

Commit 351965d

Browse files
committed
feat(opencode): log cache point application in transform
1 parent 85e549a commit 351965d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

packages/opencode/src/provider/transform.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import type * as Provider from "./provider"
66
import type * as ModelsDev from "./models"
77
import { iife } from "@/util/iife"
88
import { Flag } from "@opencode-ai/core/flag/flag"
9+
import { Log } from "@/util"
10+
11+
const log = Log.create({ service: "transform" })
912

1013
type Modality = NonNullable<ModelsDev.Model["modalities"]>["input"][number]
1114

@@ -305,6 +308,12 @@ function applyCaching(msgs: ModelMessage[], model: Provider.Model, options?: Rec
305308
msg.providerOptions = mergeDeep(msg.providerOptions ?? {}, providerOptions)
306309
}
307310

311+
log.debug("cache points applied", {
312+
messageCount: unique([...system, ...final]).length,
313+
providerID: model.providerID,
314+
ttl,
315+
})
316+
308317
return msgs
309318
}
310319

0 commit comments

Comments
 (0)