Skip to content

feat: add bedrock grok 4.6 to model cost map - #37517

Merged
mateo-berri merged 2 commits into
litellm_internal_stagingfrom
devin_ai_bedrock_grok_4_6_cost_map
Aug 20, 2026
Merged

feat: add bedrock grok 4.6 to model cost map#37517
mateo-berri merged 2 commits into
litellm_internal_stagingfrom
devin_ai_bedrock_grok_4_6_cost_map

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • Bedrock launched Grok 4.6 but LiteLLM cannot route or price it
  • The bare bedrock/global.xai.grok-4.6 slug hits Invoke, which the model rejects
  • The bedrock/converse/ workaround answers but logs $0 spend

How it solves it:

  • Adds bedrock_mantle/xai.grok-4.6, us.xai.grok-4.6, global.xai.grok-4.6 to the cost map
  • The bedrock_converse provider routes the bare CRIS slugs to Converse
  • In-Region and Geo CRIS: $2.20/$6.60 per 1M tokens, $0.55 cache read
  • Global CRIS: $2.00/$6.00 per 1M tokens, $0.50 cache read
  • 500K context, reasoning, tool calling, vision, prompt caching per the model card

User Flow

Before: a developer calling Grok 4.6 on Bedrock through the proxy gets a 404 on the natural slug, and the workaround slug logs no spend

  1. They send POST https://litellm-domain/v1/chat/completions with "model": "bedrock/global.xai.grok-4.6" and a short user message
  2. The call fails with 404 BedrockException - Bedrock Invoke HTTPX: Unknown provider=None, model=global.xai.grok-4.6. Try calling via converse route - bedrock/converse/<model>
  3. They retry with "model": "bedrock/converse/global.xai.grok-4.6" and get 200 with the model's reply
  4. https://litellm-domain/ui/?page=logs shows that request at $0 spend

After: the same request on the natural slug succeeds and is priced

  1. They send POST https://litellm-domain/v1/chat/completions with "model": "bedrock/global.xai.grok-4.6" and a short user message
  2. The call returns 200 with the model's reply
  3. https://litellm-domain/ui/?page=logs shows the request priced at $2.00 per 1M input and $6.00 per 1M output tokens, and bedrock/us.xai.grok-4.6 prices at $2.20/$6.60

Relevant issues

Linear ticket

Resolves LIT-5877

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • My PR passes all CI/CD checks (e.g., lint, format, unit tests)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review (Greptile reviews automatically once the PR is opened; only comment @greptileai to re-request a review after pushing changes)

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

Screenshots / Proof of Fix

Pricing source: AWS Bedrock Grok 4.6 model card (pricing table, model IDs, 500K context, capabilities), cross-checked against the AWS launch announcement. Evidence screenshots of the AWS pricing table are posted in the requesting Slack thread. Per reviewer request the entries carry no source field

Both legs boot a real proxy from the named commit (LITELLM_LOCAL_MODEL_COST_MAP=True, Postgres, AWS_BEARER_TOKEN_BEDROCK, aws_region_name: us-east-1, mantle in us-west-2) and hit real Bedrock; spend is read back from /spend/logs. $PORT is that leg's proxy port.

Before (3d51eb3)

bare bedrock/global.xai.grok-4.6 on chat completions:

$ curl -sS -i http://127.0.0.1:$PORT/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock/global.xai.grok-4.6", "max_tokens": 40, "messages": [{"role": "user", "content": "Reply with the single word hello"}]}'
HTTP 404
x-litellm-response-cost: 0
{"error":{"message":"litellm.NotFoundError: BedrockException - Bedrock Invoke HTTPX: Unknown provider=None, model=global.xai.grok-4.6. Try calling via converse route - `bedrock/converse/<model>`.. Received Model Group=bedrock/global.xai.grok-4.6\nAvailable Model Group Fallbacks=None","type":null,"param":null,"code":"404"}}

bare slug on /v1/responses:

$ curl -sS -i http://127.0.0.1:$PORT/v1/responses -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock/global.xai.grok-4.6", "max_output_tokens": 40, "input": "Reply with the single word hello"}'
HTTP 404
x-litellm-response-cost: 0
{"error":{"message":"litellm.NotFoundError: BedrockException - Bedrock Invoke HTTPX: Unknown provider=None, model=global.xai.grok-4.6. Try calling via converse route - `bedrock/converse/<model>`.. Received Model Group=bedrock/global.xai.grok-4.6\nAvailable Model Group Fallbacks=None","type":null,"param":null,"code":"404"}}

bare slug on /v1/messages:

$ curl -sS -i http://127.0.0.1:$PORT/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock/global.xai.grok-4.6", "max_tokens": 40, "messages": [{"role": "user", "content": "Reply with the single word hello"}]}'
HTTP 404
x-litellm-response-cost: 0
{"error":{"message":"litellm.NotFoundError: BedrockException - Bedrock Invoke HTTPX: Unknown provider=None, model=global.xai.grok-4.6. Try calling via converse route - `bedrock/converse/<model>`.. Received Model Group=bedrock/global.xai.grok-4.6\nAvailable Model Group Fallbacks=None","type":null,"param":null,"code":"404"}}

bare bedrock/us.xai.grok-4.6:

$ curl -sS -i http://127.0.0.1:$PORT/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock/us.xai.grok-4.6", "max_tokens": 40, "messages": [{"role": "user", "content": "Reply with the single word hello"}]}'
HTTP 404
x-litellm-response-cost: 0
{"error":{"message":"litellm.NotFoundError: BedrockException - Bedrock Invoke HTTPX: Unknown provider=None, model=us.xai.grok-4.6. Try calling via converse route - `bedrock/converse/<model>`.. Received Model Group=bedrock/us.xai.grok-4.6\nAvailable Model Group Fallbacks=None","type":null,"param":null,"code":"404"}}

bare slug with tools:

$ curl -sS -i http://127.0.0.1:$PORT/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock/global.xai.grok-4.6", "max_tokens": 40, "messages": [{"role": "user", "content": "What is the weather in Paris? Use the tool."}], "tools": [{"type": "function", "function": {"name": "get_weather", "description": "Get the current weather for a city", "parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}}}]}'
HTTP 400
x-litellm-response-cost: 0
{"error":{"message":"litellm.UnsupportedParamsError: bedrock does not support parameters: ['tools'], for model=global.xai.grok-4.6. To drop these, set `litellm.drop_params=True` or for proxy:\n\n`litellm_settings:\n drop_params: true`\n. \n If you want to use these params dynamically send allowed_openai_params=['tools'] in your request.. Received Model Group=bedrock/global.xai.grok-4.6\nAvailable Model Group Fallbacks=None","type":"None","param":null,"code":"400"}}

bedrock_mantle/xai.grok-4.6:

$ curl -sS -i http://127.0.0.1:$PORT/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock_mantle/xai.grok-4.6", "max_tokens": 40, "messages": [{"role": "user", "content": "Reply with the single word hello"}]}'
HTTP 500
x-litellm-response-cost: 0
{"error":{"message":"litellm.APIConnectionError: Bedrock_mantleException - {\"error\":{\"code\":\"validation_error\",\"message\":\"model `xai.grok-4.6` isn't supported on this route\",\"param\":null,\"type\":\"invalid_request_error\"}}. Received Model Group=bedrock_mantle/xai.grok-4.6\nAvailable Model Group Fallbacks=None","type":null,"param":null,"code":"500"}}

interim bedrock/converse/global.xai.grok-4.6 works but is unpriced:

$ curl -sS -i http://127.0.0.1:$PORT/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock/converse/global.xai.grok-4.6", "max_tokens": 40, "messages": [{"role": "user", "content": "Reply with the single word hello"}]}'
HTTP 200
x-litellm-response-cost-input: 0.0
x-litellm-response-cost-output: 0.0
{"id":"chatcmpl-f3c095ce-0fd0-40e0-8738-895f3016902d","created":1787219025,"model":"bedrock/converse/global.xai.grok-4.6","object":"chat.completion","choices":[{"finish_reason":"length","index":0,"message":{"content":"","role":"assistant","reasoning_content":"","thinking_blocks":"[elided]","provider_specific_fields":"[elided]"}}],"usage":{"completion_tokens":40,"prompt_tokens":35,"total_tokens":75,"completion_tokens_details":{"reasoning_tokens":0,"text_tokens":40},"prompt_tokens_details":{"cached_tokens":0,"text_tokens":35,"cache_write_tokens":0,"cache_creation_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0}}

After (1f6bef7)

bare bedrock/global.xai.grok-4.6 on chat completions:

$ curl -sS -i http://127.0.0.1:$PORT/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock/global.xai.grok-4.6", "max_tokens": 40, "messages": [{"role": "user", "content": "Reply with the single word hello"}]}'
HTTP/1.1 200 OK
x-litellm-response-cost: 0.00031
x-litellm-response-cost-input: 7e-05
x-litellm-response-cost-output: 0.00024
{"id":"chatcmpl-c37aafbd-ca8e-4d71-b5e6-3a0fe4b65161","created":1787219187,"model":"bedrock/global.xai.grok-4.6","object":"chat.completion","choices":[{"finish_reason":"length","index":0,"message":{"content":"","role":"assistant","reasoning_content":"","thinking_blocks":"[elided]","provider_specific_fields":"[elided]"}}],"usage":{"completion_tokens":40,"prompt_tokens":35,"total_tokens":75,"completion_tokens_details":{"reasoning_tokens":0,"text_tokens":40},"prompt_tokens_details":{"cached_tokens":0,"text_tokens":35,"cache_write_tokens":0,"cache_creation_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0}}
$ curl -sS http://127.0.0.1:$PORT/spend/logs?request_id=<response id> -H "Authorization: Bearer $LITELLM_MASTER_KEY"
{"request_id":"chatcmpl-c37aafbd-ca8e-4d71-b5e6-3a0fe4b65161","model":"bedrock/global.xai.grok-4.6","spend":0.00031,"prompt_tokens":35,"completion_tokens":40,"total_tokens":75}

bare slug on /v1/responses:

$ curl -sS -i http://127.0.0.1:$PORT/v1/responses -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock/global.xai.grok-4.6", "max_output_tokens": 40, "input": "Reply with the single word hello"}'
HTTP/1.1 200 OK
x-litellm-response-cost: 0.00031
x-litellm-response-cost-input: 7e-05
x-litellm-response-cost-output: 0.00024
{"id":"resp_KrrgMeuSAssNIqvrZdIM0SsnLCMl88cbmbtBhOK-mGi8wgyxVvelmLq2e3Lxf2EEpQz-bjMMOvrRmSh4AVTBGYxBlkzCsiYbAEv2ztKY3n_prCnLLalGg5DK68eSrsDBCOZQBqFKMhYD9HkPke9nhNYlzs-8jqe57NVgHJA_eH1AB5g5B8Xdx-XPDFtIvJJInzF0Xaz4LTb6HRvX7wJ5oM_c5HZrZcdphUo7nwN-T0qw5hu-ZAhgr4VE9uGESytZKwakUl1Y1xhv6uj3xOFiXIScrLbwylrV26krxkoPb1IJxNnwi-zxvKvITI7OKkS1hwovH_EN9Ji9rK4wALcGPPJcZGuhndM458RknAB2SrQvmDG3bjn10MNJvKFlbgqIXpaHtMEj1fAAHTxDXmdgmYuhdKAdzIKoRqoFZ7B86pXfjaSDd6N2jBzaHKcmFCpGY2xSwjoF","created_at":1787219192,"error":null,"incomplete_details":null,"instructions":null,"metadata":{},"model":"bedrock/global.xai.grok-4.6","object":"response","output":[{"type":"message","id":"chatcmpl-590995fe-65dd-49de-8844-4c2c824d9df8","status":"incomplete","role":"assistant","content":[{"type":"output_text","text":"","annotations":[]}],"phase":null}],"parallel_tool_calls":false,"temperature":0.0,"tool_choice":"auto","tools":[

bare slug on /v1/messages:

$ curl -sS -i http://127.0.0.1:$PORT/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock/global.xai.grok-4.6", "max_tokens": 40, "messages": [{"role": "user", "content": "Reply with the single word hello"}]}'
HTTP/1.1 200 OK
x-litellm-response-cost: 0.00031
x-litellm-response-cost-input: 7e-05
x-litellm-response-cost-output: 0.00024
{"id":"chatcmpl-49923cf7-7c8d-45fa-8e22-028c82040a87","type":"message","role":"assistant","model":"bedrock/global.xai.grok-4.6","stop_sequence":null,"usage":{"input_tokens":35,"output_tokens":40},"content":[{"type":"redacted_thinking","data":"cnNuX2pRenlYWklGSkxscEt5ZmxZa0NmdndJRmVJNERtRVRkOVYrTERyVlRZbWpDend4ZW9HMGozNmtMRWdmcHI5eElMSzhFQUY4QUFRQVZZWGR6TFdOeWVYQjBieTF3ZFdKc2FXTXRhMlY1QUVSQmMwOHhjakZEVUdkdFRWaE9lazh4Wm1NME0yeFRMM2RzY0hKQmMwUjNkbGhJTjI5cVRsTjNUakpPWXpBMFdHNXNZbXhUT0hSSE1FWmhWV2tyVmk5V1NVRTlQUUFCQUJGaGQzTXRhMjF6TFdocFpYSmhjbU5vZVFBS1ltVnliUzF6ZEc5eVpRQmN4UGZDMS9IMkVvSGwwbWtTQnFWbUhSOGc2cnppc0R2aGMwMTEyOVYwWXJ0MlowNkxpMXpVK1ZFZFFSVC9MdUQ5RVFEbmpMVnIzZllNd1FSL3BTd0trVC9MSjRpZWE4ZEdsaDNyait2anl4UDBaYjJ6WEorMFNGdUVsQklDQUFBUUFDaEVwdTNmNkw0OXJBSWk5dEJJejJKQ013NVNuQ3lEd0xrUU9DbDZvL0ZJeGFIUndiU2NxOEhoUXY4aXh0bitXLy8vLy84QUFBQUJBQUFBQUFBQUFBQUFBQUFCQUFBQXZDeWZxU3A4U1pUeEZZVWdvdURid
$ curl -sS http://127.0.0.1:$PORT/spend/logs?request_id=<response id> -H "Authorization: Bearer $LITELLM_MASTER_KEY"
{"request_id":"chatcmpl-49923cf7-7c8d-45fa-8e22-028c82040a87","model":"bedrock/global.xai.grok-4.6","spend":0.00031,"prompt_tokens":35,"completion_tokens":40,"total_tokens":75}

bare bedrock/us.xai.grok-4.6:

$ curl -sS -i http://127.0.0.1:$PORT/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock/us.xai.grok-4.6", "max_tokens": 40, "messages": [{"role": "user", "content": "Reply with the single word hello"}]}'
HTTP/1.1 200 OK
x-litellm-response-cost: 0.00034100000000000005
x-litellm-response-cost-input: 7.7e-05
x-litellm-response-cost-output: 0.000264
{"id":"chatcmpl-643f7d34-0f12-4e87-8cf3-ba5966f8957d","created":1787219205,"model":"bedrock/us.xai.grok-4.6","object":"chat.completion","choices":[{"finish_reason":"length","index":0,"message":{"content":"","role":"assistant","reasoning_content":"","thinking_blocks":"[elided]","provider_specific_fields":"[elided]"}}],"usage":{"completion_tokens":40,"prompt_tokens":35,"total_tokens":75,"completion_tokens_details":{"reasoning_tokens":0,"text_tokens":40},"prompt_tokens_details":{"cached_tokens":0,"text_tokens":35,"cache_write_tokens":0,"cache_creation_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0}}
$ curl -sS http://127.0.0.1:$PORT/spend/logs?request_id=<response id> -H "Authorization: Bearer $LITELLM_MASTER_KEY"
{"request_id":"chatcmpl-643f7d34-0f12-4e87-8cf3-ba5966f8957d","model":"bedrock/us.xai.grok-4.6","spend":0.000341,"prompt_tokens":35,"completion_tokens":40,"total_tokens":75}

bare slug with tools:

$ curl -sS -i http://127.0.0.1:$PORT/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock/global.xai.grok-4.6", "max_tokens": 400, "messages": [{"role": "user", "content": "What is the weather in Paris? Use the tool."}], "tools": [{"type": "function", "function": {"name": "get_weather", "description": "Get the weather for a city", "parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}}}]}'
HTTP/1.1 200 OK
x-litellm-response-cost: 0.001088
x-litellm-response-cost-input: 0.000236
x-litellm-response-cost-output: 0.000852
{"id":"chatcmpl-3bf48637-40b2-4bac-89d4-7e8789005da8","created":1787219285,"model":"bedrock/global.xai.grok-4.6","object":"chat.completion","choices":[{"finish_reason":"tool_calls","index":0,"message":{"content":"","role":"assistant","tool_calls":[{"index":1,"function":{"arguments":"{\"city\": \"Paris\"}","name":"get_weather"},"id":"call_6902de18887452b6a6a862a0712d87dd","type":"function"}],"reasoning_content":"","thinking_blocks":"[elided]","provider_specific_fields":"[elided]"}}],"usage":{"completion_tokens":142,"prompt_tokens":118,"total_tokens":260,"completion_tokens_details":{"reasoning_tokens":0,"text_tokens":142},"prompt_tokens_details":{"cached_tokens":0,"text_tokens":118,"cache_write_tokens":0,"cache_creation_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0}}
$ curl -sS http://127.0.0.1:$PORT/spend/logs?request_id=<response id> -H "Authorization: Bearer $LITELLM_MASTER_KEY"
{"request_id":"chatcmpl-3bf48637-40b2-4bac-89d4-7e8789005da8","model":"bedrock/global.xai.grok-4.6","spend":0.001088,"prompt_tokens":118,"completion_tokens":142,"total_tokens":260}

bare slug with an inline image:

$ curl -sS -i http://127.0.0.1:$PORT/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock/global.xai.grok-4.6", "max_tokens": 400, "messages": [{"role": "user", "content": [{"type": "text", "text": "Describe this image in five words"}, {"type": "image_url", "image_url": {"url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAAUElEQVR4nO3PsQkAAAzDsPz/dHpFliLwbFCaTBvvu94DAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPAAcuOzw4j9XSHcAAAAASUVORK5CYII="}}]}]}'
HTTP/1.1 200 OK
x-litellm-response-cost: 0.001182
x-litellm-response-cost-input: 8.999999999999999e-05
x-litellm-response-cost-output: 0.001092
{"id":"chatcmpl-f689e5bd-f4af-4e06-b729-6621b771bbe2","created":1787219289,"model":"bedrock/global.xai.grok-4.6","object":"chat.completion","choices":[{"finish_reason":"stop","index":0,"message":{"content":"Solid bright blue square image.","role":"assistant","reasoning_content":"","thinking_blocks":"[elided]","provider_specific_fields":"[elided]"}}],"usage":{"completion_tokens":182,"prompt_tokens":45,"total_tokens":227,"completion_tokens_details":{"reasoning_tokens":0,"text_tokens":182},"prompt_tokens_details":{"cached_tokens":0,"text_tokens":45,"cache_write_tokens":0,"cache_creation_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0}}
$ curl -sS http://127.0.0.1:$PORT/spend/logs?request_id=<response id> -H "Authorization: Bearer $LITELLM_MASTER_KEY"
{"request_id":"chatcmpl-f689e5bd-f4af-4e06-b729-6621b771bbe2","model":"bedrock/global.xai.grok-4.6","spend":0.001182,"prompt_tokens":45,"completion_tokens":182,"total_tokens":227}

bedrock_mantle/xai.grok-4.6:

$ curl -sS -i http://127.0.0.1:$PORT/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock_mantle/xai.grok-4.6", "max_tokens": 40, "messages": [{"role": "user", "content": "Reply with the single word hello"}]}'
HTTP/1.1 200 OK
x-litellm-response-cost: 0.00034100000000000005
x-litellm-response-cost-input: 7.7e-05
x-litellm-response-cost-output: 0.000264
{"id":"chatcmpl-2xmp6lw42cxanjv3bb4alxekld6u75tfe2whhbkbdwikcitmesja","created":1787219053,"model":"bedrock_mantle/xai.grok-4.6","object":"chat.completion","choices":[{"finish_reason":"length","index":0,"message":{"role":"assistant","annotations":[],"content":null}}],"usage":{"completion_tokens":40,"prompt_tokens":35,"total_tokens":75,"completion_tokens_details":{"accepted_prediction_tokens":0,"audio_tokens":0,"reasoning_tokens":37,"rejected_prediction_tokens":0},"prompt_tokens_details":{"audio_tokens":0,"cached_tokens":0,"cache_write_tokens":0,"cache_creation_tokens":0}},"service_tier":"default"}
$ curl -sS http://127.0.0.1:$PORT/spend/logs?request_id=<response id> -H "Authorization: Bearer $LITELLM_MASTER_KEY"
{"request_id":"chatcmpl-2xmp6lw42cxanjv3bb4alxekld6u75tfe2whhbkbdwikcitmesja","model":"bedrock_mantle/xai.grok-4.6","spend":0.000341,"prompt_tokens":35,"completion_tokens":40,"total_tokens":75}

interim bedrock/converse/global.xai.grok-4.6 now priced:

$ curl -sS -i http://127.0.0.1:$PORT/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "bedrock/converse/global.xai.grok-4.6", "max_tokens": 40, "messages": [{"role": "user", "content": "Reply with the single word hello"}]}'
HTTP/1.1 200 OK
x-litellm-response-cost: 0.00031
x-litellm-response-cost-input: 7e-05
x-litellm-response-cost-output: 0.00024
{"id":"chatcmpl-b62133c6-81d4-4688-9a41-c045e15ed8a7","created":1787219190,"model":"bedrock/converse/global.xai.grok-4.6","object":"chat.completion","choices":[{"finish_reason":"length","index":0,"message":{"content":"","role":"assistant","reasoning_content":"","thinking_blocks":"[elided]","provider_specific_fields":"[elided]"}}],"usage":{"completion_tokens":40,"prompt_tokens":35,"total_tokens":75,"completion_tokens_details":{"reasoning_tokens":0,"text_tokens":40},"prompt_tokens_details":{"cached_tokens":0,"text_tokens":35,"cache_write_tokens":0,"cache_creation_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0}}
$ curl -sS http://127.0.0.1:$PORT/spend/logs?request_id=<response id> -H "Authorization: Bearer $LITELLM_MASTER_KEY"
{"request_id":"chatcmpl-b62133c6-81d4-4688-9a41-c045e15ed8a7","model":"bedrock/converse/global.xai.grok-4.6","spend":0.00031,"prompt_tokens":35,"completion_tokens":40,"total_tokens":75}

/model/info at the tip:

{"data":[{"model_name":"bedrock/global.xai.grok-4.6","litellm_params":{"aws_region_name":"us-east-1","allow_client_keepalive_override":false,"use_in_pass_through":false,"use_litellm_proxy":false,"use_xai_oauth":false,"merge_reasoning_content_in_choices":false,"model":"bedrock/global.xai.grok-4.6"},"model_info":{"id":"04010414c188446b74cc2011a15ad48096b4f957b65cc37f30dd33cc7217f776","db_model":false,"access_via_team_ids":[],"direct_access":true,"key":"global.xai.grok-4.6","max_tokens":500000,"max_input_tokens":500000,"max_output_tokens":500000,"input_cost_per_token":2e-06,"input_cost_per_token_flex":null,"input_cost_per_token_priority":null,"input_cost_per_token_ultrafast":null,"cache_creation_input_token_cost":null,"cache_creation_input_token_cost_above_200k_tokens":null,"cache_creation_input_token_cost_above_272k_tokens":null,"cache_creation_input_token_cost_above_272k_tokens_priority":null,"cache_creation_input_token_cost_above_272k_tokens_flex":null,"cache_creation_input_token_cost_flex":null,"cache_creation_input_token_cost_priority":null,"cache_creation_input_token_cost_ultrafast":null,"cache_read_input_token_cost":5e-07,"prompt_cache_min_tokens":null,"cache_read_input_token_cost_above_200k_tokens":null,"cache_read_input_token_cost_above_200k_tokens_priority":null,"cache_read_input_token_cost_above_272k_tokens":null,"cache_read_input_token_cost_above_272k_tokens_priority":null,"cache_read_input_token_cost_above_272k_tokens_flex":null,"cache_read_input_token_cost_above_512k_tokens":null,"cache_read_input_token_cost_flex":null,"cache_read_input_token_cost_priority":null,"cache_read_input_token_cost_ultrafast":null,"cache_creation_input_token_cost_above_1hr":null,"input_cost_per_character":null,"input_cost_per_token_above_128k_tokens":null,"input_cost_per_token_above_

Type

🆕 New Feature

Caveats (if any)

  • Cost map entry only, covered by existing cost map CI checks rather than new tests
  • Structured outputs omitted on bedrock-runtime IDs since the model card lists them unsupported there
  • Unprefixed bedrock/xai.grok-4.6 still routes to Invoke; AWS offers no in-Region bedrock-runtime ID for it
  • Explicit cache_control checkpoints on the Converse path get a Bedrock "unsupported model or your request did not allow prompt caching" error for this model, identically before and after this PR; supports_prompt_caching follows the model card and the cache-read rate applies to whatever cache hits Bedrock reports

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR
  • 1f6bef7 passes /live-pr-risk

Link to Devin session: https://app.devin.ai/sessions/46e38dde986b431593aa66f50f29b7dc


Note

Cursor Bugbot is generating a summary for commit 1f6bef7. Configure here.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@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 Aug 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds synchronized Bedrock Grok 4.6 model metadata so LiteLLM can route supported identifiers and calculate spend.

  • Adds Bedrock Mantle metadata with chat and Responses API support.
  • Adds US and global Bedrock Converse mappings with region-specific input, output, and cache-read pricing.
  • Records context limits and supported reasoning, tool-calling, vision, and prompt-caching capabilities in both cost-map copies.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
model_prices_and_context_window.json Adds the canonical pricing, routing, context-window, and capability metadata for three Bedrock Grok 4.6 identifiers.
litellm/model_prices_and_context_window_backup.json Mirrors the canonical Grok 4.6 model metadata exactly in the packaged backup cost map.

Reviews (2): Last reviewed commit: "fix: drop source url from grok 4.6 cost ..." | Re-trigger Greptile

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

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.

P2 Grok metadata lacks regression coverage

The three new mappings lack a focused test for their lookup keys, pricing, token limits, and capability differences, so valid JSON changes can silently regress routing or spend calculation

Context Used: CLAUDE.md (source)

Knowledge Base Used: Cost Tracking and Budget Enforcement

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@greptile we do not need to do this when adding models

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.

Fair point — cost map additions are covered by the existing CI checks (check_files_match.py, generate_model_prices_schema.py), so dedicated per-model tests would be redundant overhead.

Shall I remember this as a rule: "Do not require dedicated tests for new model entries in model_prices_and_context_window.json; existing CI checks (check_files_match.py, generate_model_prices_schema.py) are sufficient coverage"?

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@codspeed-hq

codspeed-hq Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing devin_ai_bedrock_grok_4_6_cost_map (1f6bef7) with litellm_internal_staging (4d100bd)1

Open in CodSpeed

Footnotes

  1. No successful run was found on litellm_internal_staging (afbfc3f) during the generation of this report, so 4d100bd was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment

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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 1f6bef7. Configure here.

@mateo-berri mateo-berri left a comment

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.

LGTM

@mateo-berri
mateo-berri merged commit 952c6d5 into litellm_internal_staging Aug 20, 2026
75 checks passed
@mateo-berri
mateo-berri deleted the devin_ai_bedrock_grok_4_6_cost_map branch August 20, 2026 10:03
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.

3 participants