Skip to content

Commit bae7343

Browse files
committed
feat(opencode): log cache point application in transform
1 parent 6d56b21 commit bae7343

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 "@/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

@@ -267,6 +270,12 @@ function applyCaching(msgs: ModelMessage[], model: Provider.Model, options?: Rec
267270
msg.providerOptions = mergeDeep(msg.providerOptions ?? {}, providerOptions)
268271
}
269272

273+
log.debug("cache points applied", {
274+
messageCount: unique([...system, ...final]).length,
275+
providerID: model.providerID,
276+
ttl,
277+
})
278+
270279
return msgs
271280
}
272281

0 commit comments

Comments
 (0)