refactor(ai): unify prompt cache configuration
This commit is contained in:
parent
f6ea6b1762
commit
a214ac39de
19 changed files with 64 additions and 59 deletions
|
|
@ -3,6 +3,7 @@ import type { Content } from "@opencode-ai/schema/tool"
|
|||
import { HttpTransport } from "../route/transport"
|
||||
import { Protocol } from "../route/protocol"
|
||||
import {
|
||||
cacheKey,
|
||||
LLMError,
|
||||
LLMEvent,
|
||||
Usage,
|
||||
|
|
@ -542,7 +543,7 @@ const lowerOptions = (request: LLMRequest) => {
|
|||
return {
|
||||
...(options.instructions ? { instructions: options.instructions } : {}),
|
||||
...(options.store !== undefined ? { store: options.store } : {}),
|
||||
...(request.promptCacheKey ? { prompt_cache_key: request.promptCacheKey } : {}),
|
||||
...(cacheKey(request.cache) ? { prompt_cache_key: cacheKey(request.cache) } : {}),
|
||||
...(options.include ? { include: options.include } : {}),
|
||||
...(options.reasoningEffort || options.reasoningSummary
|
||||
? { reasoning: { effort: options.reasoningEffort, summary: options.reasoningSummary } }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue