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:
Keefe Tang 2026-06-17 03:04:38 +10:00 committed by GitHub
parent 273efdeee7
commit 8fd5753f76
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -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))

View file

@ -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,