feat(models): add Bedrock Grok 4.3 support - #2588
Conversation
PR Summary by QodoAdd Amazon Bedrock Mantle Grok 4.3 model support
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Code Review by Qodo
1. Missing Grok in configuration.toml
|
|
Regarding "Mantle skips model_id": this is an expected provider boundary, not a missing Mantle branch. AWS documents application inference profiles for Commit |
|
Code review by qodo was updated up to the latest commit ede851a |
|
Checked this against #2577. It is conflicting with main, probably from the litellm bump in #2611, so it needs a rebase. Not for this PR: #2530 checks |
ede851a to
00b2425
Compare
|
Code review by qodo was updated up to the latest commit 00b2425 |
Keep both new tests in test_litellm_chat_completion_core.py: the branch's model_id scoping test and main's usage accumulation test from The-PR-Agent#2532. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011Zhmb1MWhTpSn6B5r4BFwK
|
Sorry for the churn here: after your quick rebase this sat two weeks on us, and this morning a merge to main added a test in the same region of |
IsmaelMartinez
left a comment
There was a problem hiding this comment.
Green on the resolved head, approving as promised above. Thanks for the patience on this one.
Code Review by Qodo
1. changing_a_model.md lines too long
|
|
No worries at all, thanks for resolving the conflict getting this merged, @IsmaelMartinez! |
Summary
bedrock_mantle/xai.grok-4.3with its 1,000,000-token context window.bedrock_mantle/calls in the ambient AWS credential refresh and serialization path used byAWS_USE_IMDS.litellm.model_idscoped to classicbedrock/runtime calls; Mantle continues to use Bedrock Projects.Context-window rationale
AWS's Grok 4.3 model card identifies
xai.grok-4.3as abedrock-mantlemodel with a 1M-token context window. PR-Agent usesMAX_TOKENSas the input-context budget for prompt pruning, while operators can still impose a lower ceiling withconfig.max_model_tokens.The LiteLLM route is
bedrock_mantle/xai.grok-4.3, not the classicbedrock/provider. Both providers use the AWS credential chain, so Mantle now shares the existing IMDS refresh and lock boundary while forwarding the configured model unchanged.Classic Bedrock application inference profiles use
litellm.model_id. Mantle uses Bedrock Projects instead, somodel_idis intentionally omitted from Mantle completion calls.Rebase
Rebased onto current
mainafter the LiteLLM 1.95.0 update. The conflict resolution preserves upstream cache-control behavior alongside the Mantle credential and provider-boundary changes.Tests
PYTHONPATH=. ./.venv/bin/pytest -q tests/unittest/test_get_max_tokens.py tests/unittest/test_litellm_imds.py tests/unittest/test_litellm_chat_completion_core.py— 170 passedPYTHONPATH=. ./.venv/bin/pytest tests/unittest -q— 1,731 passed, 1 skipped, 1 xfailedpip check— passedgit diff --check— passedCloses #2577