From 2a836c710389aac402c714e7131009c422c73a34 Mon Sep 17 00:00:00 2001 From: yuneng-jiang Date: Mon, 9 Mar 2026 15:45:24 -0700 Subject: [PATCH] Fix Claude Agent SDK E2E test for Nova Pro max_tokens limit The Claude Agent SDK sends max_tokens=32000 for unrecognized model names (like "bedrock-nova-pro"), which exceeds Nova Pro's 10,000 limit. Enable modify_params in the test proxy config so LiteLLM clamps max_tokens to the model's actual limit. Also swap nova-premier to nova-pro since premier requires provisioned throughput unavailable in CI. Co-Authored-By: Claude Opus 4.6 --- .../test_claude_agent_sdk.py | 10 +++++----- .../test_config.yaml | 9 ++++++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/tests/proxy_e2e_anthropic_messages_tests/test_claude_agent_sdk.py b/tests/proxy_e2e_anthropic_messages_tests/test_claude_agent_sdk.py index f1f6eb921b..8e8033d885 100644 --- a/tests/proxy_e2e_anthropic_messages_tests/test_claude_agent_sdk.py +++ b/tests/proxy_e2e_anthropic_messages_tests/test_claude_agent_sdk.py @@ -4,7 +4,7 @@ E2E tests for Claude Agent SDK with LiteLLM Proxy using Bedrock models. Tests streaming messages across different Bedrock models: - Regular Bedrock Claude Sonnet 4.5 - Bedrock Converse Claude Sonnet 4.5 -- AWS Nova Premier +- AWS Nova Pro """ import os @@ -14,14 +14,14 @@ from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions # Test models from test_config.yaml -# Note: bedrock-converse-claude-sonnet-4.5 removed temporarily as the Bedrock Converse API +# Note: bedrock-converse-claude-sonnet-4.5 removed temporarily as the Bedrock Converse API # for Claude Sonnet 4.5 may not be available in all regions/accounts -# Note: bedrock-nova-premier requires an inference profile for on-demand throughput -# https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles.html +# Note: bedrock-nova-premier requires provisioned throughput (not standard cross-region +# inference profile) and is not reliably available in CI accounts. Using nova-pro instead. TEST_MODELS = [ ("bedrock-claude-sonnet-4.5", "Bedrock Invoke API"), ("bedrock-converse-claude-sonnet-4.5", "Bedrock Converse API"), - ("bedrock-nova-premier", "AWS Nova Premier"), + ("bedrock-nova-pro", "AWS Nova Pro"), ] diff --git a/tests/proxy_e2e_anthropic_messages_tests/test_config.yaml b/tests/proxy_e2e_anthropic_messages_tests/test_config.yaml index fbbb6d4114..0e4849b86e 100644 --- a/tests/proxy_e2e_anthropic_messages_tests/test_config.yaml +++ b/tests/proxy_e2e_anthropic_messages_tests/test_config.yaml @@ -24,9 +24,9 @@ model_list: model: "bedrock/us.anthropic.claude-opus-4-5-20251101-v1:0" aws_region_name: "us-east-1" - - model_name: bedrock-nova-premier + - model_name: bedrock-nova-pro litellm_params: - model: "bedrock/us.amazon.nova-premier-v1:0" + model: "bedrock/us.amazon.nova-pro-v1:0" aws_region_name: "us-east-1" # Converse API models @@ -49,5 +49,8 @@ model_list: vertex_ai_project: "pathrise-convert-1606954137718" vertex_ai_location: "asia-southeast1" -general_settings: +litellm_settings: + modify_params: true + +general_settings: forward_client_headers_to_llm_api: true \ No newline at end of file