Skip to main content
GoModel routes Bedrock requests through the Bedrock Runtime Converse and ConverseStream APIs, normalizing responses across model families (Anthropic, Amazon Nova, Meta Llama, Mistral, Cohere, AI21, and others) into OpenAI-compatible chat completions. Authenticate with an Amazon Bedrock API key, or with AWS credentials that GoModel resolves at runtime through the standard AWS credential chain (env, AWS_PROFILE, IAM Identity Center, instance/container roles).

Configure

In production, prefer instance roles, IRSA, or IAM Identity Center over long-lived access keys. When BEDROCK_BASE_URL is empty, GoModel falls back to AWS_REGION / AWS_DEFAULT_REGION. To use an Amazon Bedrock API key instead of AWS credentials:
A configured key takes precedence over AWS credentials and over AWS_BEARER_TOKEN_BEDROCK. In the dashboard, add a provider of type bedrock, set Region or endpoint, and paste the key into API Keys. Left empty, the gateway uses AWS_BEARER_TOKEN_BEDROCK from its host when set, and the host’s AWS credential chain otherwise.

Run GoModel

Verify

GET /v1/models returns Bedrock models with owned_by set to the originating vendor (e.g. anthropic, amazon). Streaming (stream: true) and the Responses API are bridged onto Converse internally.

Restrict or extend the model list

Without a configured list, GoModel queries Bedrock’s control plane and lists all on-demand text models the account has access to. To pin inference profile IDs or custom model ARNs, set a list; with the default models mode only those models are then served:
Or in config.yaml:
Bedrock’s upstream listing is ListFoundationModels; how the configured list combines with it follows the models mode (by default only the configured models are served). To change the mode for Bedrock only, set BEDROCK_MODELS_MODE (YAML: providers.<name>.models_mode).

Multiple Bedrock providers

Use suffixed env vars to register separate Bedrock instances:
This registers providers bedrock-us and bedrock-eu. Bedrock credentials still come from the standard AWS credential chain.

Allowed tools

Bedrock Converse cannot limit a turn to a subset of the declared tools. For a tool_choice of type allowed_tools, GoModel declares only the listed functions, with toolChoice any when the mode is required and auto otherwise. A subset that names no declared function is rejected with a 400. allowed_tools exists so a client can send the same tool list on every turn and keep its prompt cache. Narrowing changes the tool definitions sent upstream, and on Claude models they come before the system prompt in the cached prefix, so a subset that changes between turns invalidates the cache.

Not yet integrated

  • Bedrock embeddings — the InvokeModel embedding path is model-specific and not wired up.

Troubleshooting

  • AccessDeniedException / 403 — the AWS principal lacks Bedrock permissions, or model access has not been granted in the Bedrock console.
  • on-demand throughput isn't supported — the model requires an inference profile or provisioned throughput. Set BEDROCK_MODELS to the inference profile ID.
  • model registry has no models — region has no on-demand text models, or the control-plane call failed. Set BEDROCK_MODELS or check IAM.
  • Wrong region inferred — pass BEDROCK_BASE_URL explicitly. With a full endpoint URL, GoModel only extracts the region segment when the host ends in .amazonaws.com; custom endpoints should pair with AWS_REGION.

References

Last modified on November 11, 2026