Providers

AWS Bedrock with the OpenAI SDK: an LLM gateway for Claude, Nova and Llama on Bedrock

Call AWS Bedrock models (Claude, Amazon Nova, Llama, Mistral) with the OpenAI SDK through one gateway. SigV4 signing, Converse API translation, streaming and tool calls handled for you, with per-feature cost tracking and budgets.

Bedrock speaks its own API (Converse) and needs every request signed with AWS Signature Version 4. Cognocient AI does both, so your application keeps using the OpenAI SDK and a Bedrock model ID.

Setup

  1. In Settings → AI Providers → AWS Bedrock enter an access key ID, secret access key and the region where you have model access enabled.
  2. Give that IAM user bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream on the models you use, and enable those models in the Bedrock console for that region.
  3. Send Bedrock model IDs through the gateway:

How model IDs are recognised

No prefix is needed. A model is sent to Bedrock when it has the Bedrock shape <vendor>.<model> with one of these vendors: anthropic, amazon, meta, mistral, cohere, ai21, deepseek, writer, luma, stability, openai, qwen. An optional inference-profile prefix (us., eu., apac., global., us-gov., jp., au., ca.) is allowed, and is ignored for pricing.

A Bedrock ID needs a Bedrock key

Bedrock-shaped IDs only route to Bedrock when a Bedrock key is connected. Without one, the ID falls through to the default (OpenAI) route, which rejects it as an unknown model; if no OpenAI key exists either, the error names Bedrock as the missing provider. Connect the Bedrock key first.

What works

FeatureNotes
Chat, streamingConverse and ConverseStream; OpenAI-format responses and SSE
Tool callingOpenAI tools translated to Bedrock tool config; streamed tool calls supported
Token usage and costFrom Bedrock's own usage report
Responses APITranslated to chat like every provider

Why route Bedrock through a gateway?

  • Real-time limits. AWS Budgets and Cost Anomaly Detection report after the spend has happened. A budget here is checked before the call.
  • Attribution below the account level. Bedrock's bill shows one line per model. Headers like X-Cost-Feature and X-Cost-User split it by feature, team, user and your customers (Growth).
  • One client for everything. The same OpenAI client reaches Bedrock, Anthropic direct, OpenAI and Gemini, so moving a feature between them is a model-name change.
  • Reconcile against the AWS bill. Shadow Spend Reconciliation (Growth plan) compares what passed through the gateway with what AWS actually billed.

On this page