For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Use ChatGPT Work and Codex with Amazon Bedrock

Configure local ChatGPT Work and Codex surfaces to use OpenAI models available through Amazon Bedrock.

Configure local ChatGPT Work and Codex surfaces to use OpenAI models available through Amazon Bedrock. In this setup, the local client sends model requests to Bedrock using AWS-managed authentication and access controls.

How it works

When you configure a local ChatGPT Work or Codex surface with Amazon Bedrock as the model provider, the OpenAI-hosted Responses API isn’t in the request path. The local client sends model requests to Amazon Bedrock, and Bedrock provides an OpenAI-compatible Responses API implementation for supported OpenAI models.

Authentication is AWS-native. Users authenticate with a Bedrock API key or AWS IAM credentials. They do not use ChatGPT sign-in or OPENAI_API_KEY for this provider.

Before you start

Make sure you have:

  • Access to supported OpenAI models in Amazon Bedrock.
  • An AWS Region where the selected model is available.
  • Authentication for the Amazon Bedrock Mantle path configured for the AWS account.

Configure the provider

Add the amazon-bedrock model provider for the Amazon Bedrock Mantle path to ~/.codex/config.toml. The ChatGPT desktop app, Codex CLI, IDE extension, and SDK read the same local configuration layers. Supplying a model is optional. Select a supported model explicitly when needed.

model_provider = "amazon-bedrock"