summaryrefslogtreecommitdiffhomepage
path: root/packages
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2026-02-19 00:31:33 -0600
committerGitHub <[email protected]>2026-02-19 00:31:33 -0600
commit308e5008326df36e23ed97106f1acbfcac247c45 (patch)
treec16b5a81c6dcdecb9114ff00e2d37e04d7a7dad4 /packages
parent4b878f6aebb089244d69aa7cb7806e65e61bfbed (diff)
downloadopencode-308e5008326df36e23ed97106f1acbfcac247c45.tar.gz
opencode-308e5008326df36e23ed97106f1acbfcac247c45.zip
tweak: bake in the aws and google auth pkgs (#14241)
Diffstat (limited to 'packages')
-rw-r--r--packages/opencode/package.json2
-rw-r--r--packages/opencode/src/provider/provider.ts8
2 files changed, 5 insertions, 5 deletions
diff --git a/packages/opencode/package.json b/packages/opencode/package.json
index dc9bfdaac..fb2d4d815 100644
--- a/packages/opencode/package.json
+++ b/packages/opencode/package.json
@@ -55,6 +55,7 @@
"@actions/core": "1.11.1",
"@actions/github": "6.0.1",
"@agentclientprotocol/sdk": "0.14.1",
+ "@aws-sdk/credential-providers": "3.993.0",
"@ai-sdk/amazon-bedrock": "3.0.79",
"@ai-sdk/anthropic": "2.0.62",
"@ai-sdk/azure": "2.0.91",
@@ -107,6 +108,7 @@
"drizzle-orm": "1.0.0-beta.12-a5629fb",
"fuzzysort": "3.1.0",
"gray-matter": "4.0.3",
+ "google-auth-library": "10.5.0",
"hono": "catalog:",
"hono-openapi": "catalog:",
"ignore": "7.0.5",
diff --git a/packages/opencode/src/provider/provider.ts b/packages/opencode/src/provider/provider.ts
index d94d0cbb2..f1871ddb6 100644
--- a/packages/opencode/src/provider/provider.ts
+++ b/packages/opencode/src/provider/provider.ts
@@ -39,6 +39,8 @@ import { createTogetherAI } from "@ai-sdk/togetherai"
import { createPerplexity } from "@ai-sdk/perplexity"
import { createVercel } from "@ai-sdk/vercel"
import { createGitLab, VERSION as GITLAB_PROVIDER_VERSION } from "@gitlab/gitlab-ai-provider"
+import { fromNodeProviderChain } from "@aws-sdk/credential-providers"
+import { GoogleAuth } from "google-auth-library"
import { ProviderTransform } from "./transform"
import { Installation } from "../installation"
@@ -251,8 +253,6 @@ export namespace Provider {
// Only use credential chain if no bearer token exists
// Bearer token takes precedence over credential chain (profiles, access keys, IAM roles, web identity tokens)
if (!awsBearerToken) {
- const { fromNodeProviderChain } = await import(await BunProc.install("@aws-sdk/credential-providers"))
-
// Build credential provider options (only pass profile if specified)
const credentialProviderOptions = profile ? { profile } : {}
@@ -395,11 +395,9 @@ export namespace Provider {
project,
location,
fetch: async (input: RequestInfo | URL, init?: RequestInit) => {
- const { GoogleAuth } = await import(await BunProc.install("google-auth-library"))
const auth = new GoogleAuth()
const client = await auth.getApplicationDefault()
- const credentials = await client.credential
- const token = await credentials.getAccessToken()
+ const token = await client.credential.getAccessToken()
const headers = new Headers(init?.headers)
headers.set("Authorization", `Bearer ${token.token}`)