Skip to content

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

Closed

Description

@edmondop

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

Activity

  1. github-actions commented on Sep 5, 2025

    @github-actions
    Contributor

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

    • Different proxies for different providers? #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.

  2. jessevdp commented on Oct 13, 2025

    @jessevdp
    Contributor

    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

  3. hurricanehrndz commented on Oct 18, 2025

    @hurricanehrndz

    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
              }
            }
          }
        }
      }
    }
    
    
  4. thdxr commented on Mar 25, 2026

    @thdxr
    Member

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions