1 parent 2e7e949 commit cb7fd8fCopy full SHA for cb7fd8f
1 file changed
packages/opencode/src/provider/provider.ts
@@ -681,6 +681,9 @@ export namespace Provider {
681
autoload: !!apiKey,
682
options: {
683
apiKey,
684
+ headers: {
685
+ "User-Agent": `opencode/${Installation.VERSION} cloudflare-workers-ai (${os.platform()} ${os.release()}; ${os.arch()})`,
686
+ },
687
},
688
async getModel(sdk: any, modelID: string) {
689
return sdk.languageModel(modelID)
@@ -732,6 +735,9 @@ export namespace Provider {
732
735
cacheKey: input.options?.cacheKey,
733
736
skipCache: input.options?.skipCache,
734
737
collectLog: input.options?.collectLog,
738
739
+ "User-Agent": `opencode/${Installation.VERSION} cloudflare-ai-gateway (${os.platform()} ${os.release()}; ${os.arch()})`,
740
741
}
742
743
const aigateway = createAiGateway({
0 commit comments