mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-09 23:18:30 +00:00
fix(provider): pass apiKey to createUnified for Cloudflare AI Gateway (#32052)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
This commit is contained in:
parent
273efdeee7
commit
8fd5753f76
2 changed files with 2 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ export const CloudflareAIGatewayPlugin = PluginV2.define({
|
|||
apiKey: config.apiKey,
|
||||
options: gatewayOptions(evt.options, metadata),
|
||||
} as any)
|
||||
const unified = createUnified()
|
||||
const unified = createUnified({ apiKey: config.apiKey })
|
||||
evt.sdk = {
|
||||
languageModel(modelID: string) {
|
||||
return gateway(unified(modelID))
|
||||
|
|
|
|||
|
|
@ -816,7 +816,7 @@ function custom(dep: CustomDep): Record<string, CustomLoader> {
|
|||
apiKey: apiToken,
|
||||
...(Object.values(opts).some((v) => v !== undefined) ? { options: opts } : {}),
|
||||
})
|
||||
const unified = createUnified()
|
||||
const unified = createUnified({ apiKey: apiToken })
|
||||
|
||||
return {
|
||||
autoload: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue