Skip to content

feat(pricing): add xAI Grok 4.3 on AWS Bedrock - #30775

Open
krrish-berri-2 wants to merge 1 commit into
mainfrom
fix/add-missing-model-prices
Open

krrish-berri-2 wants to merge 1 commit into
mainfrom
fix/add-missing-model-prices

Conversation

@krrish-berri-2

Copy link
Copy Markdown
Contributor

Summary

Adds missing Bedrock pricing for xAI Grok 4.3.

New entries

Key Provider Input/M Output/M Source
xai.grok-4.3 bedrock_converse $1.25 $2.50 AWS Bedrock Pricing
us.xai.grok-4.3 bedrock_converse $1.25 $2.50 AWS Bedrock Pricing

Verification

Scraped all 19 Bedrock provider tabs (AI21, Amazon, Anthropic, Cohere, DeepSeek, Google, Luma AI, Meta, MiniMax, Mistral, Moonshot, NVIDIA, OpenAI, Qwen, Stability AI, TwelveLabs, Writer, xAI, Z AI) + Azure OpenAI pricing page and compared against the full cost map.

  • 0 pricing discrepancies on existing entries
  • Azure >272k context pricing already handled via _above_272k_tokens fields
  • azure/gpt-5-chat-latest may need a price update ($1.25→$5.00 input, $10→$30 output) if the alias now points to GPT-5.5 — flagging for review

Opened by Viktor AI

Add xai.grok-4.3 and us.xai.grok-4.3 entries for bedrock_converse.
Pricing: $1.25/M input, $2.50/M output (source: AWS Bedrock pricing page).

Verified against full Bedrock (19 provider tabs) + Azure OpenAI scrape:
- All other existing model prices match current provider pages
- Azure >272k context pricing already handled via _above_272k_tokens fields
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@greptile-apps

greptile-apps Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds two new pricing entries — xai.grok-4.3 and us.xai.grok-4.3 — for the xAI Grok 4.3 model on AWS Bedrock, with input/output costs of $1.25/$2.50 per million tokens respectively.

  • Incorrect max_input_tokens: Both entries set the context window to 131072 (128K), but the official AWS Bedrock model card documents a 1M token context window. This would silently cap user prompts at 128K.
  • Missing supports_prompt_caching: Both entries include cache_read_input_token_cost but omit supports_prompt_caching: true, which is the established pattern for all other Bedrock entries that carry a cache-read cost field.

Confidence Score: 2/5

Not safe to merge as-is — both new entries report a 128K context window when Bedrock's own documentation confirms 1M, and neither entry signals prompt-caching support despite providing a cache-read cost.

The context window is set to 128K when AWS documentation confirms it is 1M — an 8x undercount that would make the model appear severely limited to users. Prompt caching is also silently broken because the cost field exists without the flag that activates it.

model_prices_and_context_window.json — both new xAI Grok 4.3 entries need the context window and prompt-caching flag corrected before merge.

Important Files Changed

Filename Overview
model_prices_and_context_window.json Adds xai.grok-4.3 and us.xai.grok-4.3 Bedrock pricing entries, but max_input_tokens is set to 131,072 instead of the correct 1,000,000 (1M) per AWS docs, and supports_prompt_caching: true is absent despite cache_read_input_token_cost being present.

Reviews (1): Last reviewed commit: "feat(pricing): add xAI Grok 4.3 on AWS B..." | Re-trigger Greptile

@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Comment on lines +37535 to +37542
"xai.grok-4.3": {
"input_cost_per_token": 1.25e-06,
"output_cost_per_token": 2.5e-06,
"cache_read_input_token_cost": 2e-07,
"litellm_provider": "bedrock_converse",
"max_input_tokens": 131072,
"max_output_tokens": 16384,
"max_tokens": 16384,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 The max_input_tokens value of 131072 is significantly under-reported. AWS's official model card for Grok 4.3 on Bedrock explicitly states the context window is 1M tokens, matching the xAI announcement. Setting this to 131,072 means litellm will reject any prompt exceeding 128K tokens — even though the model can handle up to 1,000,000 — giving users an incorrect capability boundary.

Suggested change
"xai.grok-4.3": {
"input_cost_per_token": 1.25e-06,
"output_cost_per_token": 2.5e-06,
"cache_read_input_token_cost": 2e-07,
"litellm_provider": "bedrock_converse",
"max_input_tokens": 131072,
"max_output_tokens": 16384,
"max_tokens": 16384,
"xai.grok-4.3": {
"input_cost_per_token": 1.25e-06,
"output_cost_per_token": 2.5e-06,
"cache_read_input_token_cost": 2e-07,
"litellm_provider": "bedrock_converse",
"max_input_tokens": 1000000,
"max_output_tokens": 16384,
"max_tokens": 16384,

Comment on lines +37550 to +37557
"us.xai.grok-4.3": {
"input_cost_per_token": 1.25e-06,
"output_cost_per_token": 2.5e-06,
"cache_read_input_token_cost": 2e-07,
"litellm_provider": "bedrock_converse",
"max_input_tokens": 131072,
"max_output_tokens": 16384,
"max_tokens": 16384,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 The max_input_tokens for us.xai.grok-4.3 has the same incorrect value of 131072. Per the official AWS Bedrock model card, the context window is 1M tokens.

Suggested change
"us.xai.grok-4.3": {
"input_cost_per_token": 1.25e-06,
"output_cost_per_token": 2.5e-06,
"cache_read_input_token_cost": 2e-07,
"litellm_provider": "bedrock_converse",
"max_input_tokens": 131072,
"max_output_tokens": 16384,
"max_tokens": 16384,
"us.xai.grok-4.3": {
"input_cost_per_token": 1.25e-06,
"output_cost_per_token": 2.5e-06,
"cache_read_input_token_cost": 2e-07,
"litellm_provider": "bedrock_converse",
"max_input_tokens": 1000000,
"max_output_tokens": 16384,
"max_tokens": 16384,

Comment on lines +37544 to +37550
"supports_function_calling": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_vision": true,
"source": "https://aws.amazon.com/bedrock/pricing/"
},
"us.xai.grok-4.3": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 supports_prompt_caching: true is missing despite cache_read_input_token_cost being set. Every other Bedrock entry in the file that carries a cache_read_input_token_cost (e.g., amazon.nova-2-lite-v1:0) also sets supports_prompt_caching: true. Without this flag, litellm may not expose prompt caching for this model even though the pricing field is present. The same omission applies to the us.xai.grok-4.3 entry.

Suggested change
"supports_function_calling": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_vision": true,
"source": "https://aws.amazon.com/bedrock/pricing/"
},
"us.xai.grok-4.3": {
"supports_function_calling": true,
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_vision": true,
"source": "https://aws.amazon.com/bedrock/pricing/"
},
"us.xai.grok-4.3": {

Comment on lines +37559 to 37565
"supports_function_calling": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_vision": true,
"source": "https://aws.amazon.com/bedrock/pricing/"
},
"zai.glm-4.7": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Same missing supports_prompt_caching: true in the us.xai.grok-4.3 entry.

Suggested change
"supports_function_calling": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_vision": true,
"source": "https://aws.amazon.com/bedrock/pricing/"
},
"zai.glm-4.7": {
"supports_function_calling": true,
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_vision": true,
"source": "https://aws.amazon.com/bedrock/pricing/"
},
"zai.glm-4.7": {

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6a228a861f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

"input_cost_per_token": 1.25e-06,
"output_cost_per_token": 2.5e-06,
"cache_read_input_token_cost": 2e-07,
"litellm_provider": "bedrock_converse",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Route Grok 4.3 through Bedrock Mantle

AWS documents Grok 4.3 as not supporting the Converse API and only exposes it on the bedrock-mantle OpenAI-compatible endpoint (https://bedrock-mantle.{region}.api.aws/openai/v1, model xai.grok-4.3; see https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-xai-grok-4-3.html). Registering this entry as bedrock_converse puts it in litellm.bedrock_converse_models, so get_bedrock_route() sends calls through BedrockConverseLLM instead of the Mantle handler, making the newly added model fail at runtime for normal users.

Useful? React with 👍 / 👎.

"supports_vision": true,
"source": "https://aws.amazon.com/bedrock/pricing/"
},
"us.xai.grok-4.3": {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove the unsupported us-prefixed Grok ID

The AWS model card's Programmatic Access table lists only xai.grok-4.3 as the in-region model ID and says Geo and Global inference IDs are not supported for this model (same AWS page linked above). The us. prefix is a cross-region inference-profile style ID in this file, so registering us.xai.grok-4.3 advertises a Bedrock model ID that customers cannot invoke and will produce validation/model-not-found errors if selected.

Useful? React with 👍 / 👎.

@marty-sullivan

Copy link
Copy Markdown
Contributor

Flagging a likely conflict before this merges. Grok 4.3 on Bedrock is served only through the Mantle OpenAI-compatible endpoint (/openai/v1), not the Converse/InvokeModel runtime, so keying it as bedrock_converse (xai.grok-4.3 / us.xai.grok-4.3) won't match how the model actually routes.

Verified against AWS in us-east-1: aws bedrock get-foundation-model --model-identifier xai.grok-4.3 returns ValidationException: The provided model identifier is invalid, the same result as the known Mantle model openai.gpt-5.4. Both are absent from list-foundation-models, whereas genuine Converse models like openai.gpt-oss-* and zai.glm-* are present in the catalog. So Grok 4.3 isn't reachable via Converse at all.

PR #31374 already registers this model as bedrock_mantle/xai.grok-4.3 (base main, fixes #31196) with use_openai_responses_path: true and supported_endpoints: ["/v1/chat/completions", "/v1/responses"], which is the key the Mantle router needs for cost lookups. The bedrock_converse entries here would sit unused while the Mantle path still misses

Two data points worth correcting regardless: the context window is 1M (not 131072), and there's a >200K-token tier where input/output/cache-read roughly double ($2.50 / $5.00 / $0.40 per 1M), per xAI's published pricing and LiteLLM's existing xai/grok-4.3 row

@yuneng-berri
yuneng-berri deleted the branch main September 13, 2026 04:25
@yuneng-berri yuneng-berri reopened this Sep 13, 2026
@devin-ai-integration
devin-ai-integration Bot changed the base branch from litellm_internal_staging to main September 23, 2026 16:02
@devin-ai-integration
devin-ai-integration Bot requested a review from a team September 23, 2026 16:02

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants