mirror of
https://github.com/agentclientprotocol/claude-agent-acp.git
synced 2026-10-27 12:40:32 +00:00
fix: load credential error for bedrock gateway (#667)
Sometimes leads to long initialization and error if AWS_BEARER_TOKEN_BEDROCK: Could not load credentials from any providers
This commit is contained in:
committed by
GitHub
parent
9258652169
commit
8d76be356a
@@ -2164,7 +2164,7 @@ function createEnvForGateway(request?: GatewayAuthRequest) {
|
||||
if (request.methodId === "gateway-bedrock") {
|
||||
return {
|
||||
CLAUDE_CODE_USE_BEDROCK: "1",
|
||||
AWS_BEARER_TOKEN_BEDROCK: "",
|
||||
AWS_BEARER_TOKEN_BEDROCK: " ", // Must be non-empty to bypass pass configuration check
|
||||
ANTHROPIC_BEDROCK_BASE_URL: request._meta.gateway.baseUrl,
|
||||
ANTHROPIC_CUSTOM_HEADERS: customHeaders,
|
||||
};
|
||||
|
||||
@@ -154,7 +154,7 @@ describe("authorization", () => {
|
||||
options: expect.objectContaining({
|
||||
env: expect.objectContaining({
|
||||
CLAUDE_CODE_USE_BEDROCK: "1",
|
||||
AWS_BEARER_TOKEN_BEDROCK: "",
|
||||
AWS_BEARER_TOKEN_BEDROCK: " ",
|
||||
ANTHROPIC_BEDROCK_BASE_URL: "https://gateway.example",
|
||||
ANTHROPIC_CUSTOM_HEADERS: "custom-header: test",
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user