mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-17 12:13:23 +00:00
fix: provider headers from config not applied to fetch requests (#11788)
This commit is contained in:
parent
b7b734f51f
commit
39a504773c
1 changed files with 6 additions and 0 deletions
|
|
@ -1001,6 +1001,12 @@ export namespace Provider {
|
|||
const fetchFn = customFetch ?? fetch
|
||||
const opts = init ?? {}
|
||||
|
||||
// Merge configured headers into request headers
|
||||
opts.headers = {
|
||||
...(typeof opts.headers === 'object' ? opts.headers : {}),
|
||||
...options["headers"],
|
||||
}
|
||||
|
||||
if (options["timeout"] !== undefined && options["timeout"] !== null) {
|
||||
const signals: AbortSignal[] = []
|
||||
if (opts.signal) signals.push(opts.signal)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue