Support AWS Bedrock Application Inference Profiles for cost attribution
Nobody has claimed this yet.
- 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
ResponsesAPI. - AWS Limitation: AWS restricts the use of Application Inference Profiles (AIPs) to the
ConverseAPI (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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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