openai / openai/codex

Support AWS Bedrock Application Inference Profiles for cost attribution

Open
#46,381 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

aws-bedrock CLI enhancement
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What variant of Codex are you using?

CLI

What feature would you like to see?

I want to use AWS Bedrock's Application Inference Profiles (AIPs) in the Codex CLI to achieve proper cost attribution and tracking across projects and environments.

Currently, when specifying an AIP ARN in the model field, the CLI returns the following error:
'Application inference profiles are not supported by this API.'

Technical Context & Current Behavior

Based on the error message and AWS Bedrock's documentation:

  • Current Behavior: Codex CLI communicates using the Responses API.
  • AWS Limitation: AWS restricts the use of Application Inference Profiles (AIPs) to the Converse API (and InvokeModel).

Because of this protocol mismatch, it is currently not possible to track Codex CLI usage costs via AWS Cost Explorer using AIPs.

Proposed Consideration / Possible Solution

To enable proper cost attribution via AIPs, please consider updating or adding an option to the amazon-bedrock-runtime provider so that it can route requests via the Converse API. This could potentially allow the CLI to accept Application Inference Profile ARNs.

Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the amazon-bedrock-runtime provider and trace how the Codex CLI sends requests through the Responses API. Read AWS Bedrock's Converse API support for Application Inference Profiles and compare the provider's current request path. The work is complete when an AIP ARN can be used by the CLI and its usage can be tracked for cost attribution.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, rust
Domain
api, cli, cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.