GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(provider): deep merge providerOptions in applyCaching (#10323) · bpd1069/opencode@087d7da

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/opencode/src/provider
    • transform.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/opencode/src/provider/transform.ts‎

Copy file name to clipboardExpand all lines: packages/opencode/src/provider/transform.ts
+3-9Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { APICallError, ModelMessage } from "ai"
2-
import { unique } from "remeda"
2+
import { mergeDeep, unique } from "remeda"
33
import type { JSONSchema } from "zod/v4/core"
44
import type { Provider } from "./provider"
55
import type { ModelsDev } from "./models"
@@ -186,18 +186,12 @@ export namespace ProviderTransform {
186186
if (shouldUseContentOptions) {
187187
const lastContent = msg.content[msg.content.length - 1]
188188
if (lastContent && typeof lastContent === "object") {
189-
lastContent.providerOptions = {
190-
...lastContent.providerOptions,
191-
...providerOptions,
192-
}
189+
lastContent.providerOptions = mergeDeep(lastContent.providerOptions ?? {}, providerOptions)
193190
continue
194191
}
195192
}
196193

197-
msg.providerOptions = {
198-
...msg.providerOptions,
199-
...providerOptions,
200-
}
194+
msg.providerOptions = mergeDeep(msg.providerOptions ?? {}, providerOptions)
201195
}
202196

203197
return msgs

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.