AWS Bedrock Provider doesn't seem to respect proxy #1623

Open
opened 2026-02-16 17:31:48 -05:00 by yindo · 4 comments
Owner

Originally created by @edmondop on GitHub (Sep 5, 2025).

Originally assigned to: @thdxr on GitHub.

For security purposes it might be necessary to use proxy / change the baseURL for bedrock

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "amazon-bedrock": {
      "options": {
        "baseURL": "http://localhost:8084/",
        "region": "us-east-1"
      }
    }
  },
  "model": "amazon-bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0",
  "small_model": "amazon-bedrock/anthropic.claude-3-5-haiku-20241022-v1:0"
}

although it seems to be supported by sdks, i.e. searching baseURL in https://github.com/vercel/ai/tree/main/packages/amazon-bedrock

Originally created by @edmondop on GitHub (Sep 5, 2025). Originally assigned to: @thdxr on GitHub. For security purposes it might be necessary to use proxy / change the baseURL for bedrock ``` { "$schema": "https://opencode.ai/config.json", "provider": { "amazon-bedrock": { "options": { "baseURL": "http://localhost:8084/", "region": "us-east-1" } } }, "model": "amazon-bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0", "small_model": "amazon-bedrock/anthropic.claude-3-5-haiku-20241022-v1:0" } ``` although it seems to be supported by sdks, i.e. searching baseURL in https://github.com/vercel/ai/tree/main/packages/amazon-bedrock
Author
Owner

@github-actions[bot] commented on GitHub (Sep 5, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #1711: Different proxies for different providers? - This issue specifically requests configurable HTTP/HTTPS/SOCKS proxies per provider, which is exactly what you're trying to achieve with AWS Bedrock's baseURL configuration for proxy support.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Sep 5, 2025): This issue might be a duplicate of existing issues. Please check: - #1711: Different proxies for different providers? - This issue specifically requests configurable HTTP/HTTPS/SOCKS proxies per provider, which is exactly what you're trying to achieve with AWS Bedrock's baseURL configuration for proxy support. Feel free to ignore if none of these address your specific case.
Author
Owner

@jessevdp commented on GitHub (Oct 13, 2025):

FYI: this is probably because the underlying @ai-sdk/amazon-bedrock doesn’t support that configuration option.

https://ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock

@jessevdp commented on GitHub (Oct 13, 2025): FYI: this is probably because the underlying `@ai-sdk/amazon-bedrock` doesn’t support that configuration option. https://ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock
Author
Owner
@jessevdp commented on GitHub (Oct 13, 2025): Wait I might be wrong.. https://github.com/vercel/ai/blob/dff8735fbe6fa531104a79716a4670a7f168d45f/packages/amazon-bedrock/src/bedrock-provider.ts#L82
Author
Owner

@hurricanehrndz commented on GitHub (Oct 18, 2025):

Works fine for me using litellm

{
  "$schema": "https://opencode.ai/config.json",
  "theme": "catppuccin",
  "provider": {
    "myprovider": {
      "npm": "@ai-sdk/amazon-bedrock",
      "name": "My Amazon Bedrock",
      "options": {
        "baseURL": "http://localhost:8888/bedrock",
        "apiKey": "supersecret"
      },
      "models": {
        "us.anthropic.claude-sonnet-4-5-20250929-v1:0": {
          "name": "Claude Sonnet 4.5",
          "attachment": true,
          "reasoning": true,
          "temperature": true,
          "tool_call": true,
          "release_date": "2025-09-29",
          "modalities": {
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          },
          "open_weights": false,
          "cost": {
            "input": 3,
            "output": 15,
            "cache_read": 0.3,
            "cache_write": 3.75
          },
          "limit": {
            "context": 200000,
            "output": 64000
          }
        }
      }
    }
  }
}

@hurricanehrndz commented on GitHub (Oct 18, 2025): Works fine for me using litellm ``` { "$schema": "https://opencode.ai/config.json", "theme": "catppuccin", "provider": { "myprovider": { "npm": "@ai-sdk/amazon-bedrock", "name": "My Amazon Bedrock", "options": { "baseURL": "http://localhost:8888/bedrock", "apiKey": "supersecret" }, "models": { "us.anthropic.claude-sonnet-4-5-20250929-v1:0": { "name": "Claude Sonnet 4.5", "attachment": true, "reasoning": true, "temperature": true, "tool_call": true, "release_date": "2025-09-29", "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "open_weights": false, "cost": { "input": 3, "output": 15, "cache_read": 0.3, "cache_write": 3.75 }, "limit": { "context": 200000, "output": 64000 } } } } } } ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1623