From 0f1312f39dba53b97ec063042dbf1a93fa08385b Mon Sep 17 00:00:00 2001 From: "devin-ai-integration[bot]" <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 15 Oct 2026 01:04:54 +0000 Subject: [PATCH] test(integration): add claude-haiku-5-5 basic translation cases (#45176) * test(integration): add claude-haiku-5-5 basic translation cases Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * test(integration): match sibling style in claude-haiku-5-5 translation cases Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: kerry Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- tests/integration/proxy_config.yaml | 22 +++++ .../chat_completions/bases/anthropic.py | 83 ++++++++++++++++ .../chat_completions/bases/azure_ai.py | 84 ++++++++++++++++ .../bases/bedrock_converse.py | 58 +++++++++++ .../chat_completions/bases/bedrock_invoke.py | 76 ++++++++++++++ .../test_chat_completions_basic_anthropic.py | 2 + .../test_chat_completions_basic_azure_ai.py | 2 + ...chat_completions_basic_bedrock_converse.py | 2 + ...t_chat_completions_basic_bedrock_invoke.py | 2 + .../translation/messages/bases/anthropic.py | 70 +++++++++++++ .../translation/messages/bases/azure_ai.py | 70 +++++++++++++ .../messages/bases/bedrock_converse.py | 46 +++++++++ .../messages/bases/bedrock_invoke.py | 61 ++++++++++++ .../basic/test_messages_basic_anthropic.py | 2 + .../basic/test_messages_basic_azure_ai.py | 2 + .../test_messages_basic_bedrock_converse.py | 2 + .../test_messages_basic_bedrock_invoke.py | 2 + .../translation/responses/bases/anthropic.py | 97 ++++++++++++++++++ .../translation/responses/bases/azure_ai.py | 98 +++++++++++++++++++ .../responses/bases/bedrock_converse.py | 84 ++++++++++++++++ .../responses/bases/bedrock_invoke.py | 91 +++++++++++++++++ .../basic/test_responses_basic_anthropic.py | 2 + .../basic/test_responses_basic_azure_ai.py | 2 + .../test_responses_basic_bedrock_converse.py | 2 + .../test_responses_basic_bedrock_invoke.py | 2 + 25 files changed, 964 insertions(+) diff --git a/tests/integration/proxy_config.yaml b/tests/integration/proxy_config.yaml index 3136ecb5a09..5d0b70c2b54 100644 --- a/tests/integration/proxy_config.yaml +++ b/tests/integration/proxy_config.yaml @@ -4,6 +4,11 @@ model_list: model: anthropic/claude-haiku-4-5 api_base: http://127.0.0.1:8191 api_key: synthetic-anthropic-key + - model_name: anthropic/claude-haiku-5-5 + litellm_params: + model: anthropic/claude-haiku-5-5 + api_base: http://127.0.0.1:8191 + api_key: synthetic-anthropic-key - model_name: anthropic/claude-sonnet-5 litellm_params: model: anthropic/claude-sonnet-5 @@ -49,6 +54,11 @@ model_list: model: azure_ai/claude-haiku-4-5 api_base: http://127.0.0.1:8191 api_key: synthetic-azure-ai-key + - model_name: azure_ai/claude-haiku-5-5 + litellm_params: + model: azure_ai/claude-haiku-5-5 + api_base: http://127.0.0.1:8191 + api_key: synthetic-azure-ai-key - model_name: azure_ai/claude-sonnet-4-6 litellm_params: model: azure_ai/claude-sonnet-4-6 @@ -80,6 +90,12 @@ model_list: api_base: http://127.0.0.1:8191 api_key: synthetic-bedrock-key aws_region_name: us-east-1 + - model_name: bedrock/converse/us.anthropic.claude-haiku-5-5 + litellm_params: + model: bedrock/converse/us.anthropic.claude-haiku-5-5 + api_base: http://127.0.0.1:8191 + api_key: synthetic-bedrock-key + aws_region_name: us-east-1 - model_name: bedrock/converse/us.anthropic.claude-sonnet-4-6 litellm_params: model: bedrock/converse/us.anthropic.claude-sonnet-4-6 @@ -193,6 +209,12 @@ model_list: api_base: http://127.0.0.1:8191 api_key: synthetic-bedrock-key aws_region_name: us-east-1 + - model_name: bedrock/invoke/us.anthropic.claude-haiku-5-5 + litellm_params: + model: bedrock/invoke/us.anthropic.claude-haiku-5-5 + api_base: http://127.0.0.1:8191 + api_key: synthetic-bedrock-key + aws_region_name: us-east-1 - model_name: bedrock/invoke/us.anthropic.claude-sonnet-4-6 litellm_params: model: bedrock/invoke/us.anthropic.claude-sonnet-4-6 diff --git a/tests/integration/translation/chat_completions/bases/anthropic.py b/tests/integration/translation/chat_completions/bases/anthropic.py index a291a167a64..3a2dbb3c2aa 100644 --- a/tests/integration/translation/chat_completions/bases/anthropic.py +++ b/tests/integration/translation/chat_completions/bases/anthropic.py @@ -86,6 +86,89 @@ CLAUDE_HAIKU_4_5_TEST_CASE: Final = TranslationTestCase( }, ) +CLAUDE_HAIKU_5_5_TEST_CASE: Final = TranslationTestCase( + scenario="basic", + litellm_endpoint="/v1/chat/completions", + litellm_request={ + "model": "anthropic/claude-haiku-5-5", + "max_tokens": 64, + "messages": [ + {"role": "system", "content": "You are a terse assistant."}, + {"role": "user", "content": "Say hello."}, + ], + "cache": {"no-cache": True}, + }, + expected_provider_endpoint="/v1/messages", + expected_provider_headers={ + "x-api-key": "synthetic-anthropic-key", + "anthropic-version": "2023-06-01", + "content-type": "application/json", + }, + expected_provider_request={ + "model": "claude-haiku-5-5", + "messages": [{"role": "user", "content": [{"type": "text", "text": "Say hello."}]}], + "max_tokens": 64, + "system": [{"type": "text", "text": "You are a terse assistant."}], + }, + mock_provider_response={ + "model": "claude-haiku-5-5", + "id": "msg_011CfoboJTmCCdzhHCYYzodZ", + "type": "message", + "role": "assistant", + "content": [{"type": "text", "text": "Hello."}], + "container": None, + "stop_reason": "end_turn", + "stop_sequence": None, + "stop_details": None, + "usage": { + "input_tokens": 23, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": {"ephemeral_5m_input_tokens": 0, "ephemeral_1h_input_tokens": 0}, + "output_tokens": 6, + "output_tokens_details": {"thinking_tokens": 0}, + "service_tier": "standard", + "inference_geo": "global", + }, + "diagnostics": None, + }, + expected_litellm_response={ + "id": ANY, + "created": ANY, + "model": "anthropic/claude-haiku-5-5", + "object": "chat.completion", + "choices": [ + { + "finish_reason": "stop", + "index": 0, + "message": { + "content": "Hello.", + "role": "assistant", + "provider_specific_fields": {"citations": None, "thinking_blocks": None}, + }, + } + ], + "usage": { + "completion_tokens": 6, + "prompt_tokens": 23, + "total_tokens": 29, + "completion_tokens_details": {"reasoning_tokens": 0, "text_tokens": 6}, + "prompt_tokens_details": { + "cached_tokens": 0, + "text_tokens": 23, + "cache_write_tokens": 0, + "cache_creation_tokens": 0, + "cache_creation_token_details": {"ephemeral_5m_input_tokens": 0, "ephemeral_1h_input_tokens": 0}, + }, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "inference_geo": "global", + "service_tier": "standard", + }, + }, +) + + CLAUDE_SONNET_4_6_TEST_CASE: Final = TranslationTestCase( scenario="basic", litellm_endpoint="/v1/chat/completions", diff --git a/tests/integration/translation/chat_completions/bases/azure_ai.py b/tests/integration/translation/chat_completions/bases/azure_ai.py index a8cad1ba5ce..c20eea8b589 100644 --- a/tests/integration/translation/chat_completions/bases/azure_ai.py +++ b/tests/integration/translation/chat_completions/bases/azure_ai.py @@ -85,6 +85,90 @@ CLAUDE_HAIKU_4_5_TEST_CASE: Final = TranslationTestCase( }, ) +CLAUDE_HAIKU_5_5_TEST_CASE: Final = TranslationTestCase( + scenario="basic", + litellm_endpoint="/v1/chat/completions", + litellm_request={ + "model": "azure_ai/claude-haiku-5-5", + "max_tokens": 64, + "messages": [ + {"role": "system", "content": "You are a terse assistant."}, + {"role": "user", "content": "Say hello."}, + ], + "cache": {"no-cache": True}, + }, + expected_provider_endpoint="/anthropic/v1/messages", + expected_provider_headers={ + "x-api-key": "synthetic-azure-ai-key", + "api-key": "synthetic-azure-ai-key", + "anthropic-version": "2023-06-01", + "content-type": "application/json", + }, + expected_provider_request={ + "model": "claude-haiku-5-5", + "messages": [{"role": "user", "content": [{"type": "text", "text": "Say hello."}]}], + "max_tokens": 64, + "system": [{"type": "text", "text": "You are a terse assistant."}], + }, + mock_provider_response={ + "model": "claude-haiku-5-5", + "id": "msg_011CfoboMutM3uKRT9qW3upD", + "type": "message", + "role": "assistant", + "content": [{"type": "text", "text": "Hello."}], + "container": None, + "stop_reason": "end_turn", + "stop_sequence": None, + "stop_details": None, + "usage": { + "input_tokens": 23, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": {"ephemeral_5m_input_tokens": 0, "ephemeral_1h_input_tokens": 0}, + "output_tokens": 6, + "output_tokens_details": {"thinking_tokens": 0}, + "service_tier": "standard", + "inference_geo": "global", + }, + "diagnostics": None, + }, + expected_litellm_response={ + "id": ANY, + "created": ANY, + "model": "azure_ai/claude-haiku-5-5", + "object": "chat.completion", + "choices": [ + { + "finish_reason": "stop", + "index": 0, + "message": { + "content": "Hello.", + "role": "assistant", + "provider_specific_fields": {"citations": None, "thinking_blocks": None}, + }, + } + ], + "usage": { + "completion_tokens": 6, + "prompt_tokens": 23, + "total_tokens": 29, + "completion_tokens_details": {"reasoning_tokens": 0, "text_tokens": 6}, + "prompt_tokens_details": { + "cached_tokens": 0, + "text_tokens": 23, + "cache_write_tokens": 0, + "cache_creation_tokens": 0, + "cache_creation_token_details": {"ephemeral_5m_input_tokens": 0, "ephemeral_1h_input_tokens": 0}, + }, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "inference_geo": "global", + "service_tier": "standard", + }, + }, +) + + CLAUDE_SONNET_4_6_TEST_CASE: Final = TranslationTestCase( scenario="basic", litellm_endpoint="/v1/chat/completions", diff --git a/tests/integration/translation/chat_completions/bases/bedrock_converse.py b/tests/integration/translation/chat_completions/bases/bedrock_converse.py index 59c677540b6..861fe7b8ead 100644 --- a/tests/integration/translation/chat_completions/bases/bedrock_converse.py +++ b/tests/integration/translation/chat_completions/bases/bedrock_converse.py @@ -60,6 +60,64 @@ CLAUDE_HAIKU_4_5_TEST_CASE: Final = TranslationTestCase( }, ) +CLAUDE_HAIKU_5_5_TEST_CASE: Final = TranslationTestCase( + scenario="basic", + litellm_endpoint="/v1/chat/completions", + litellm_request={ + "model": "bedrock/converse/us.anthropic.claude-haiku-5-5", + "max_tokens": 64, + "messages": [ + {"role": "system", "content": "You are a terse assistant."}, + {"role": "user", "content": "Say hello."}, + ], + "cache": {"no-cache": True}, + }, + expected_provider_endpoint="/model/us.anthropic.claude-haiku-5-5/converse", + expected_provider_headers={"authorization": "Bearer synthetic-bedrock-key", "content-type": "application/json"}, + expected_provider_request={ + "messages": [{"role": "user", "content": [{"text": "Say hello."}]}], + "inferenceConfig": {"maxTokens": 64}, + "system": [{"text": "You are a terse assistant."}], + }, + mock_provider_response={ + "metrics": {"latencyMs": 954}, + "output": {"message": {"content": [{"text": "Hello."}], "role": "assistant"}}, + "stopReason": "end_turn", + "usage": { + "cacheReadInputTokenCount": 0, + "cacheReadInputTokens": 0, + "cacheWriteInputTokenCount": 0, + "cacheWriteInputTokens": 0, + "inputTokens": 23, + "outputTokens": 6, + "serverToolUsage": {}, + "totalTokens": 29, + }, + }, + expected_litellm_response={ + "id": ANY, + "created": ANY, + "model": "bedrock/converse/us.anthropic.claude-haiku-5-5", + "object": "chat.completion", + "choices": [{"finish_reason": "stop", "index": 0, "message": {"content": "Hello.", "role": "assistant"}}], + "usage": { + "completion_tokens": 6, + "prompt_tokens": 23, + "total_tokens": 29, + "completion_tokens_details": {"reasoning_tokens": 0, "text_tokens": 6}, + "prompt_tokens_details": { + "cached_tokens": 0, + "text_tokens": 23, + "cache_write_tokens": 0, + "cache_creation_tokens": 0, + }, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + }, + }, +) + + CLAUDE_SONNET_4_6_TEST_CASE: Final = TranslationTestCase( scenario="basic", litellm_endpoint="/v1/chat/completions", diff --git a/tests/integration/translation/chat_completions/bases/bedrock_invoke.py b/tests/integration/translation/chat_completions/bases/bedrock_invoke.py index 2ed5c42c7a7..d86ce2f861f 100644 --- a/tests/integration/translation/chat_completions/bases/bedrock_invoke.py +++ b/tests/integration/translation/chat_completions/bases/bedrock_invoke.py @@ -77,6 +77,82 @@ CLAUDE_HAIKU_4_5_TEST_CASE: Final = TranslationTestCase( }, ) +CLAUDE_HAIKU_5_5_TEST_CASE: Final = TranslationTestCase( + scenario="basic", + litellm_endpoint="/v1/chat/completions", + litellm_request={ + "model": "bedrock/invoke/us.anthropic.claude-haiku-5-5", + "max_tokens": 64, + "messages": [ + {"role": "system", "content": "You are a terse assistant."}, + {"role": "user", "content": "Say hello."}, + ], + "cache": {"no-cache": True}, + }, + expected_provider_endpoint="/model/us.anthropic.claude-haiku-5-5/invoke", + expected_provider_headers={"authorization": "Bearer synthetic-bedrock-key", "content-type": "application/json"}, + expected_provider_request={ + "messages": [{"role": "user", "content": [{"type": "text", "text": "Say hello."}]}], + "max_tokens": 64, + "system": [{"type": "text", "text": "You are a terse assistant."}], + "anthropic_version": "bedrock-2023-05-31", + }, + mock_provider_response={ + "model": "claude-haiku-5-5", + "id": "msg_bdrk_prp4tfjg2ibow6km7wkqw5euejxxssl2ngm6wbgjxyg7xd32tkja", + "type": "message", + "role": "assistant", + "content": [{"type": "text", "text": "Hello."}], + "container": None, + "stop_reason": "end_turn", + "stop_sequence": None, + "stop_details": None, + "usage": { + "input_tokens": 23, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": {"ephemeral_5m_input_tokens": 0, "ephemeral_1h_input_tokens": 0}, + "output_tokens": 6, + "output_tokens_details": {"thinking_tokens": 0}, + "service_tier": "standard", + }, + }, + expected_litellm_response={ + "id": ANY, + "created": ANY, + "model": "bedrock/invoke/us.anthropic.claude-haiku-5-5", + "object": "chat.completion", + "choices": [ + { + "finish_reason": "stop", + "index": 0, + "message": { + "content": "Hello.", + "role": "assistant", + "provider_specific_fields": {"citations": None, "thinking_blocks": None}, + }, + } + ], + "usage": { + "completion_tokens": 6, + "prompt_tokens": 23, + "total_tokens": 29, + "completion_tokens_details": {"reasoning_tokens": 0, "text_tokens": 6}, + "prompt_tokens_details": { + "cached_tokens": 0, + "text_tokens": 23, + "cache_write_tokens": 0, + "cache_creation_tokens": 0, + "cache_creation_token_details": {"ephemeral_5m_input_tokens": 0, "ephemeral_1h_input_tokens": 0}, + }, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "service_tier": "standard", + }, + }, +) + + CLAUDE_SONNET_4_6_TEST_CASE: Final = TranslationTestCase( scenario="basic", litellm_endpoint="/v1/chat/completions", diff --git a/tests/integration/translation/chat_completions/basic/test_chat_completions_basic_anthropic.py b/tests/integration/translation/chat_completions/basic/test_chat_completions_basic_anthropic.py index d3939a698b5..1a5ca4bad26 100644 --- a/tests/integration/translation/chat_completions/basic/test_chat_completions_basic_anthropic.py +++ b/tests/integration/translation/chat_completions/basic/test_chat_completions_basic_anthropic.py @@ -4,6 +4,7 @@ from integration._support.provider import SharedProvider from integration.translation.case import TranslationTestCase from integration.translation.chat_completions.bases.anthropic import ( CLAUDE_HAIKU_4_5_TEST_CASE, + CLAUDE_HAIKU_5_5_TEST_CASE, CLAUDE_OPUS_4_8_TEST_CASE, CLAUDE_OPUS_5_5_TEST_CASE, CLAUDE_SONNET_4_6_TEST_CASE, @@ -17,6 +18,7 @@ from integration.translation.runner import assert_translation "case", [ CLAUDE_HAIKU_4_5_TEST_CASE, + CLAUDE_HAIKU_5_5_TEST_CASE, CLAUDE_SONNET_4_6_TEST_CASE, CLAUDE_SONNET_5_TEST_CASE, CLAUDE_OPUS_4_8_TEST_CASE, diff --git a/tests/integration/translation/chat_completions/basic/test_chat_completions_basic_azure_ai.py b/tests/integration/translation/chat_completions/basic/test_chat_completions_basic_azure_ai.py index ce646008395..efc55cb910f 100644 --- a/tests/integration/translation/chat_completions/basic/test_chat_completions_basic_azure_ai.py +++ b/tests/integration/translation/chat_completions/basic/test_chat_completions_basic_azure_ai.py @@ -4,6 +4,7 @@ from integration._support.provider import SharedProvider from integration.translation.case import TranslationTestCase from integration.translation.chat_completions.bases.azure_ai import ( CLAUDE_HAIKU_4_5_TEST_CASE, + CLAUDE_HAIKU_5_5_TEST_CASE, CLAUDE_OPUS_4_8_TEST_CASE, CLAUDE_OPUS_5_5_TEST_CASE, CLAUDE_SONNET_4_6_TEST_CASE, @@ -17,6 +18,7 @@ from integration.translation.runner import assert_translation "case", [ CLAUDE_HAIKU_4_5_TEST_CASE, + CLAUDE_HAIKU_5_5_TEST_CASE, CLAUDE_SONNET_4_6_TEST_CASE, CLAUDE_SONNET_5_TEST_CASE, CLAUDE_OPUS_4_8_TEST_CASE, diff --git a/tests/integration/translation/chat_completions/basic/test_chat_completions_basic_bedrock_converse.py b/tests/integration/translation/chat_completions/basic/test_chat_completions_basic_bedrock_converse.py index 3d03e14555f..87b20f8ca26 100644 --- a/tests/integration/translation/chat_completions/basic/test_chat_completions_basic_bedrock_converse.py +++ b/tests/integration/translation/chat_completions/basic/test_chat_completions_basic_bedrock_converse.py @@ -4,6 +4,7 @@ from integration._support.provider import SharedProvider from integration.translation.case import TranslationTestCase from integration.translation.chat_completions.bases.bedrock_converse import ( CLAUDE_HAIKU_4_5_TEST_CASE, + CLAUDE_HAIKU_5_5_TEST_CASE, CLAUDE_OPUS_4_8_TEST_CASE, CLAUDE_OPUS_5_5_TEST_CASE, CLAUDE_SONNET_4_6_TEST_CASE, @@ -17,6 +18,7 @@ from integration.translation.runner import assert_translation "case", [ CLAUDE_HAIKU_4_5_TEST_CASE, + CLAUDE_HAIKU_5_5_TEST_CASE, CLAUDE_SONNET_4_6_TEST_CASE, CLAUDE_SONNET_5_TEST_CASE, CLAUDE_OPUS_4_8_TEST_CASE, diff --git a/tests/integration/translation/chat_completions/basic/test_chat_completions_basic_bedrock_invoke.py b/tests/integration/translation/chat_completions/basic/test_chat_completions_basic_bedrock_invoke.py index 213a0f32483..9ca0e869e5c 100644 --- a/tests/integration/translation/chat_completions/basic/test_chat_completions_basic_bedrock_invoke.py +++ b/tests/integration/translation/chat_completions/basic/test_chat_completions_basic_bedrock_invoke.py @@ -4,6 +4,7 @@ from integration._support.provider import SharedProvider from integration.translation.case import TranslationTestCase from integration.translation.chat_completions.bases.bedrock_invoke import ( CLAUDE_HAIKU_4_5_TEST_CASE, + CLAUDE_HAIKU_5_5_TEST_CASE, CLAUDE_OPUS_4_8_TEST_CASE, CLAUDE_OPUS_5_5_TEST_CASE, CLAUDE_SONNET_4_6_TEST_CASE, @@ -17,6 +18,7 @@ from integration.translation.runner import assert_translation "case", [ CLAUDE_HAIKU_4_5_TEST_CASE, + CLAUDE_HAIKU_5_5_TEST_CASE, CLAUDE_SONNET_4_6_TEST_CASE, CLAUDE_SONNET_5_TEST_CASE, CLAUDE_OPUS_4_8_TEST_CASE, diff --git a/tests/integration/translation/messages/bases/anthropic.py b/tests/integration/translation/messages/bases/anthropic.py index 1a3a054ab4e..b41abcce1c2 100644 --- a/tests/integration/translation/messages/bases/anthropic.py +++ b/tests/integration/translation/messages/bases/anthropic.py @@ -209,6 +209,76 @@ CLAUDE_HAIKU_4_5_TEST_CASE: Final = TranslationTestCase( }, ) +CLAUDE_HAIKU_5_5_TEST_CASE: Final = TranslationTestCase( + scenario="basic", + litellm_endpoint="/v1/messages", + litellm_request={ + "model": "anthropic/claude-haiku-5-5", + "max_tokens": 64, + "system": "You are a terse assistant.", + "messages": [{"role": "user", "content": "Say hello."}], + "cache": {"no-cache": True}, + }, + expected_provider_endpoint="/v1/messages", + expected_provider_headers={ + "x-api-key": "synthetic-anthropic-key", + "anthropic-version": "2023-06-01", + "content-type": "application/json", + }, + expected_provider_request={ + "model": "claude-haiku-5-5", + "max_tokens": 64, + "stream": False, + "system": "You are a terse assistant.", + "messages": [{"role": "user", "content": "Say hello."}], + }, + mock_provider_response={ + "model": "claude-haiku-5-5", + "id": "msg_011CfoboJT2cSWAvpvJEPTBy", + "type": "message", + "role": "assistant", + "content": [{"type": "text", "text": "Hello."}], + "container": None, + "stop_reason": "end_turn", + "stop_sequence": None, + "stop_details": None, + "usage": { + "input_tokens": 23, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": {"ephemeral_5m_input_tokens": 0, "ephemeral_1h_input_tokens": 0}, + "output_tokens": 6, + "output_tokens_details": {"thinking_tokens": 0}, + "service_tier": "standard", + "inference_geo": "global", + }, + "diagnostics": None, + }, + expected_litellm_response={ + "model": "anthropic/claude-haiku-5-5", + "id": "msg_011CfoboJT2cSWAvpvJEPTBy", + "type": "message", + "role": "assistant", + "content": [{"type": "text", "text": "Hello."}], + "container": None, + "stop_reason": "end_turn", + "stop_sequence": None, + "stop_details": None, + "usage": { + "input_tokens": 23, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": {"ephemeral_5m_input_tokens": 0, "ephemeral_1h_input_tokens": 0}, + "output_tokens": 6, + "output_tokens_details": {"thinking_tokens": 0}, + "service_tier": "standard", + "inference_geo": "global", + }, + "diagnostics": None, + }, +) + + CLAUDE_SONNET_5_TEST_CASE: Final = TranslationTestCase( scenario="basic", litellm_endpoint="/v1/messages", diff --git a/tests/integration/translation/messages/bases/azure_ai.py b/tests/integration/translation/messages/bases/azure_ai.py index 6a65ca26421..1ccf9debbc4 100644 --- a/tests/integration/translation/messages/bases/azure_ai.py +++ b/tests/integration/translation/messages/bases/azure_ai.py @@ -69,6 +69,76 @@ CLAUDE_HAIKU_4_5_TEST_CASE: Final = TranslationTestCase( }, ) +CLAUDE_HAIKU_5_5_TEST_CASE: Final = TranslationTestCase( + scenario="basic", + litellm_endpoint="/v1/messages", + litellm_request={ + "model": "azure_ai/claude-haiku-5-5", + "max_tokens": 64, + "system": "You are a terse assistant.", + "messages": [{"role": "user", "content": "Say hello."}], + "cache": {"no-cache": True}, + }, + expected_provider_endpoint="/anthropic/v1/messages", + expected_provider_headers={ + "x-api-key": "synthetic-azure-ai-key", + "anthropic-version": "2023-06-01", + "content-type": "application/json", + }, + expected_provider_request={ + "model": "claude-haiku-5-5", + "max_tokens": 64, + "stream": False, + "system": [{"type": "text", "text": "You are a terse assistant."}], + "messages": [{"role": "user", "content": "Say hello."}], + }, + mock_provider_response={ + "model": "claude-haiku-5-5", + "id": "msg_011CfoboMv8t1SZhyzZeXDH3", + "type": "message", + "role": "assistant", + "content": [{"type": "text", "text": "Hello."}], + "container": None, + "stop_reason": "end_turn", + "stop_sequence": None, + "stop_details": None, + "usage": { + "input_tokens": 23, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": {"ephemeral_5m_input_tokens": 0, "ephemeral_1h_input_tokens": 0}, + "output_tokens": 6, + "output_tokens_details": {"thinking_tokens": 0}, + "service_tier": "standard", + "inference_geo": "global", + }, + "diagnostics": None, + }, + expected_litellm_response={ + "model": "azure_ai/claude-haiku-5-5", + "id": "msg_011CfoboMv8t1SZhyzZeXDH3", + "type": "message", + "role": "assistant", + "content": [{"type": "text", "text": "Hello."}], + "container": None, + "stop_reason": "end_turn", + "stop_sequence": None, + "stop_details": None, + "usage": { + "input_tokens": 23, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": {"ephemeral_5m_input_tokens": 0, "ephemeral_1h_input_tokens": 0}, + "output_tokens": 6, + "output_tokens_details": {"thinking_tokens": 0}, + "service_tier": "standard", + "inference_geo": "global", + }, + "diagnostics": None, + }, +) + + CLAUDE_SONNET_4_6_TEST_CASE: Final = TranslationTestCase( scenario="basic", litellm_endpoint="/v1/messages", diff --git a/tests/integration/translation/messages/bases/bedrock_converse.py b/tests/integration/translation/messages/bases/bedrock_converse.py index fbb69d3a93a..b0cc31c31f2 100644 --- a/tests/integration/translation/messages/bases/bedrock_converse.py +++ b/tests/integration/translation/messages/bases/bedrock_converse.py @@ -48,6 +48,52 @@ CLAUDE_HAIKU_4_5_TEST_CASE: Final = TranslationTestCase( }, ) +CLAUDE_HAIKU_5_5_TEST_CASE: Final = TranslationTestCase( + scenario="basic", + litellm_endpoint="/v1/messages", + litellm_request={ + "model": "bedrock/converse/us.anthropic.claude-haiku-5-5", + "max_tokens": 64, + "system": "You are a terse assistant.", + "messages": [{"role": "user", "content": "Say hello."}], + "cache": {"no-cache": True}, + }, + expected_provider_endpoint="/model/us.anthropic.claude-haiku-5-5/converse", + expected_provider_headers={"authorization": "Bearer synthetic-bedrock-key", "content-type": "application/json"}, + expected_provider_request={ + "messages": [{"role": "user", "content": [{"text": "Say hello."}]}], + "inferenceConfig": {"maxTokens": 64}, + "system": [{"text": "You are a terse assistant."}], + }, + mock_provider_response={ + "metrics": {"latencyMs": 954}, + "output": {"message": {"content": [{"text": "Hello."}], "role": "assistant"}}, + "stopReason": "end_turn", + "usage": { + "cacheReadInputTokenCount": 0, + "cacheReadInputTokens": 0, + "cacheWriteInputTokenCount": 0, + "cacheWriteInputTokens": 0, + "inputTokens": 23, + "outputTokens": 6, + "serverToolUsage": {}, + "totalTokens": 29, + }, + }, + expected_litellm_response={ + "id": ANY, + "type": "message", + "role": "assistant", + "model": "bedrock/converse/us.anthropic.claude-haiku-5-5", + "stop_sequence": None, + "usage": {"input_tokens": 23, "output_tokens": 6}, + "content": [{"type": "text", "text": "Hello."}], + "stop_reason": "end_turn", + "stop_details": None, + }, +) + + CLAUDE_SONNET_4_6_TEST_CASE: Final = TranslationTestCase( scenario="basic", litellm_endpoint="/v1/messages", diff --git a/tests/integration/translation/messages/bases/bedrock_invoke.py b/tests/integration/translation/messages/bases/bedrock_invoke.py index e2e85225d25..7ec8b19ea46 100644 --- a/tests/integration/translation/messages/bases/bedrock_invoke.py +++ b/tests/integration/translation/messages/bases/bedrock_invoke.py @@ -60,6 +60,67 @@ CLAUDE_HAIKU_4_5_TEST_CASE: Final = TranslationTestCase( }, ) +CLAUDE_HAIKU_5_5_TEST_CASE: Final = TranslationTestCase( + scenario="basic", + litellm_endpoint="/v1/messages", + litellm_request={ + "model": "bedrock/invoke/us.anthropic.claude-haiku-5-5", + "max_tokens": 64, + "system": "You are a terse assistant.", + "messages": [{"role": "user", "content": "Say hello."}], + "cache": {"no-cache": True}, + }, + expected_provider_endpoint="/model/us.anthropic.claude-haiku-5-5/invoke", + expected_provider_headers={"authorization": "Bearer synthetic-bedrock-key", "content-type": "application/json"}, + expected_provider_request={ + "messages": [{"role": "user", "content": "Say hello."}], + "max_tokens": 64, + "system": [{"type": "text", "text": "You are a terse assistant."}], + "anthropic_version": "bedrock-2023-05-31", + }, + mock_provider_response={ + "model": "claude-haiku-5-5", + "id": "msg_bdrk_4eoumg4voyx6qt55ft5ts2sze3seufnqcvaqbdsjwfyd67wehaoa", + "type": "message", + "role": "assistant", + "content": [{"type": "text", "text": "Hello."}], + "container": None, + "stop_reason": "end_turn", + "stop_sequence": None, + "stop_details": None, + "usage": { + "input_tokens": 23, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": {"ephemeral_5m_input_tokens": 0, "ephemeral_1h_input_tokens": 0}, + "output_tokens": 6, + "output_tokens_details": {"thinking_tokens": 0}, + "service_tier": "standard", + }, + }, + expected_litellm_response={ + "model": "bedrock/invoke/us.anthropic.claude-haiku-5-5", + "id": "msg_bdrk_4eoumg4voyx6qt55ft5ts2sze3seufnqcvaqbdsjwfyd67wehaoa", + "type": "message", + "role": "assistant", + "content": [{"type": "text", "text": "Hello."}], + "container": None, + "stop_reason": "end_turn", + "stop_sequence": None, + "stop_details": None, + "usage": { + "input_tokens": 23, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": {"ephemeral_5m_input_tokens": 0, "ephemeral_1h_input_tokens": 0}, + "output_tokens": 6, + "output_tokens_details": {"thinking_tokens": 0}, + "service_tier": "standard", + }, + }, +) + + CLAUDE_SONNET_4_6_TEST_CASE: Final = TranslationTestCase( scenario="basic", litellm_endpoint="/v1/messages", diff --git a/tests/integration/translation/messages/basic/test_messages_basic_anthropic.py b/tests/integration/translation/messages/basic/test_messages_basic_anthropic.py index f0fb3486a8b..a585b96fbd5 100644 --- a/tests/integration/translation/messages/basic/test_messages_basic_anthropic.py +++ b/tests/integration/translation/messages/basic/test_messages_basic_anthropic.py @@ -4,6 +4,7 @@ from integration._support.provider import SharedProvider from integration.translation.case import TranslationTestCase from integration.translation.messages.bases.anthropic import ( CLAUDE_HAIKU_4_5_TEST_CASE, + CLAUDE_HAIKU_5_5_TEST_CASE, CLAUDE_OPUS_4_8_TEST_CASE, CLAUDE_OPUS_5_5_TEST_CASE, CLAUDE_SONNET_4_6_TEST_CASE, @@ -17,6 +18,7 @@ from integration.translation.runner import assert_translation "case", [ CLAUDE_HAIKU_4_5_TEST_CASE, + CLAUDE_HAIKU_5_5_TEST_CASE, CLAUDE_SONNET_4_6_TEST_CASE, CLAUDE_SONNET_5_TEST_CASE, CLAUDE_OPUS_4_8_TEST_CASE, diff --git a/tests/integration/translation/messages/basic/test_messages_basic_azure_ai.py b/tests/integration/translation/messages/basic/test_messages_basic_azure_ai.py index 17f1a8bfaf5..e7cb6e5ac4b 100644 --- a/tests/integration/translation/messages/basic/test_messages_basic_azure_ai.py +++ b/tests/integration/translation/messages/basic/test_messages_basic_azure_ai.py @@ -4,6 +4,7 @@ from integration._support.provider import SharedProvider from integration.translation.case import TranslationTestCase from integration.translation.messages.bases.azure_ai import ( CLAUDE_HAIKU_4_5_TEST_CASE, + CLAUDE_HAIKU_5_5_TEST_CASE, CLAUDE_OPUS_4_8_TEST_CASE, CLAUDE_OPUS_5_5_TEST_CASE, CLAUDE_SONNET_4_6_TEST_CASE, @@ -17,6 +18,7 @@ from integration.translation.runner import assert_translation "case", [ CLAUDE_HAIKU_4_5_TEST_CASE, + CLAUDE_HAIKU_5_5_TEST_CASE, CLAUDE_SONNET_4_6_TEST_CASE, CLAUDE_SONNET_5_TEST_CASE, CLAUDE_OPUS_4_8_TEST_CASE, diff --git a/tests/integration/translation/messages/basic/test_messages_basic_bedrock_converse.py b/tests/integration/translation/messages/basic/test_messages_basic_bedrock_converse.py index 1a98b93506e..6a9fa4e8851 100644 --- a/tests/integration/translation/messages/basic/test_messages_basic_bedrock_converse.py +++ b/tests/integration/translation/messages/basic/test_messages_basic_bedrock_converse.py @@ -4,6 +4,7 @@ from integration._support.provider import SharedProvider from integration.translation.case import TranslationTestCase from integration.translation.messages.bases.bedrock_converse import ( CLAUDE_HAIKU_4_5_TEST_CASE, + CLAUDE_HAIKU_5_5_TEST_CASE, CLAUDE_OPUS_4_8_TEST_CASE, CLAUDE_OPUS_5_5_TEST_CASE, CLAUDE_SONNET_4_6_TEST_CASE, @@ -17,6 +18,7 @@ from integration.translation.runner import assert_translation "case", [ CLAUDE_HAIKU_4_5_TEST_CASE, + CLAUDE_HAIKU_5_5_TEST_CASE, CLAUDE_SONNET_4_6_TEST_CASE, CLAUDE_SONNET_5_TEST_CASE, CLAUDE_OPUS_4_8_TEST_CASE, diff --git a/tests/integration/translation/messages/basic/test_messages_basic_bedrock_invoke.py b/tests/integration/translation/messages/basic/test_messages_basic_bedrock_invoke.py index c01096b635c..6b4b4a24315 100644 --- a/tests/integration/translation/messages/basic/test_messages_basic_bedrock_invoke.py +++ b/tests/integration/translation/messages/basic/test_messages_basic_bedrock_invoke.py @@ -4,6 +4,7 @@ from integration._support.provider import SharedProvider from integration.translation.case import TranslationTestCase from integration.translation.messages.bases.bedrock_invoke import ( CLAUDE_HAIKU_4_5_TEST_CASE, + CLAUDE_HAIKU_5_5_TEST_CASE, CLAUDE_OPUS_4_8_TEST_CASE, CLAUDE_OPUS_5_5_TEST_CASE, CLAUDE_SONNET_4_6_TEST_CASE, @@ -17,6 +18,7 @@ from integration.translation.runner import assert_translation "case", [ CLAUDE_HAIKU_4_5_TEST_CASE, + CLAUDE_HAIKU_5_5_TEST_CASE, CLAUDE_SONNET_4_6_TEST_CASE, CLAUDE_SONNET_5_TEST_CASE, CLAUDE_OPUS_4_8_TEST_CASE, diff --git a/tests/integration/translation/responses/bases/anthropic.py b/tests/integration/translation/responses/bases/anthropic.py index 098a62cb4b0..57d3a347178 100644 --- a/tests/integration/translation/responses/bases/anthropic.py +++ b/tests/integration/translation/responses/bases/anthropic.py @@ -105,6 +105,103 @@ CLAUDE_HAIKU_4_5_TEST_CASE: Final = TranslationTestCase( }, ) +CLAUDE_HAIKU_5_5_TEST_CASE: Final = TranslationTestCase( + scenario="basic", + litellm_endpoint="/v1/responses", + litellm_request={ + "model": "anthropic/claude-haiku-5-5", + "max_output_tokens": 64, + "instructions": "You are a terse assistant.", + "input": "Say hello.", + "cache": {"no-cache": True}, + }, + expected_provider_endpoint="/v1/messages", + expected_provider_headers={ + "x-api-key": "synthetic-anthropic-key", + "anthropic-version": "2023-06-01", + "content-type": "application/json", + }, + expected_provider_request={ + "model": "claude-haiku-5-5", + "messages": [{"role": "user", "content": [{"type": "text", "text": "Say hello."}]}], + "max_tokens": 64, + "system": [{"type": "text", "text": "You are a terse assistant."}], + }, + mock_provider_response={ + "model": "claude-haiku-5-5", + "id": "msg_011CfoboJTmCCdzhHCYYzodZ", + "type": "message", + "role": "assistant", + "content": [{"type": "text", "text": "Hello."}], + "container": None, + "stop_reason": "end_turn", + "stop_sequence": None, + "stop_details": None, + "usage": { + "input_tokens": 23, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": {"ephemeral_5m_input_tokens": 0, "ephemeral_1h_input_tokens": 0}, + "output_tokens": 6, + "output_tokens_details": {"thinking_tokens": 0}, + "service_tier": "standard", + "inference_geo": "global", + }, + "diagnostics": None, + }, + expected_litellm_response={ + "id": ANY, + "created_at": ANY, + "error": None, + "incomplete_details": None, + "instructions": "You are a terse assistant.", + "metadata": {}, + "model": "anthropic/claude-haiku-5-5", + "object": "response", + "output": [ + { + "type": "message", + "id": ANY, + "status": "completed", + "role": "assistant", + "content": [{"type": "output_text", "text": "Hello.", "annotations": []}], + "phase": None, + } + ], + "parallel_tool_calls": False, + "temperature": None, + "tool_choice": "auto", + "tools": [], + "top_p": None, + "max_output_tokens": 64, + "previous_response_id": None, + "reasoning": None, + "status": "completed", + "text": {}, + "truncation": None, + "usage": { + "input_tokens": 23, + "input_tokens_details": { + "audio_tokens": None, + "cached_tokens": 0, + "cached_tokens_details": None, + "image_tokens": None, + "text_tokens": 23, + "video_tokens": None, + "cache_write_tokens": 0, + }, + "output_tokens": 6, + "output_tokens_details": {"audio_tokens": None, "reasoning_tokens": 0, "text_tokens": 6}, + "total_tokens": 29, + "cost": None, + }, + "user": None, + "store": None, + "provider_specific_fields": {"citations": None, "thinking_blocks": None}, + }, +) + + CLAUDE_SONNET_4_6_TEST_CASE: Final = TranslationTestCase( scenario="basic", litellm_endpoint="/v1/responses", diff --git a/tests/integration/translation/responses/bases/azure_ai.py b/tests/integration/translation/responses/bases/azure_ai.py index 6d1a2fb94e4..79918a50d22 100644 --- a/tests/integration/translation/responses/bases/azure_ai.py +++ b/tests/integration/translation/responses/bases/azure_ai.py @@ -99,6 +99,104 @@ CLAUDE_HAIKU_4_5_TEST_CASE: Final = TranslationTestCase( }, ) +CLAUDE_HAIKU_5_5_TEST_CASE: Final = TranslationTestCase( + scenario="basic", + litellm_endpoint="/v1/responses", + litellm_request={ + "model": "azure_ai/claude-haiku-5-5", + "max_output_tokens": 64, + "instructions": "You are a terse assistant.", + "input": "Say hello.", + "cache": {"no-cache": True}, + }, + expected_provider_endpoint="/anthropic/v1/messages", + expected_provider_headers={ + "x-api-key": "synthetic-azure-ai-key", + "api-key": "synthetic-azure-ai-key", + "anthropic-version": "2023-06-01", + "content-type": "application/json", + }, + expected_provider_request={ + "model": "claude-haiku-5-5", + "messages": [{"role": "user", "content": [{"type": "text", "text": "Say hello."}]}], + "max_tokens": 64, + "system": [{"type": "text", "text": "You are a terse assistant."}], + }, + mock_provider_response={ + "model": "claude-haiku-5-5", + "id": "msg_011CfoboMutM3uKRT9qW3upD", + "type": "message", + "role": "assistant", + "content": [{"type": "text", "text": "Hello."}], + "container": None, + "stop_reason": "end_turn", + "stop_sequence": None, + "stop_details": None, + "usage": { + "input_tokens": 23, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": {"ephemeral_5m_input_tokens": 0, "ephemeral_1h_input_tokens": 0}, + "output_tokens": 6, + "output_tokens_details": {"thinking_tokens": 0}, + "service_tier": "standard", + "inference_geo": "global", + }, + "diagnostics": None, + }, + expected_litellm_response={ + "id": ANY, + "created_at": ANY, + "error": None, + "incomplete_details": None, + "instructions": "You are a terse assistant.", + "metadata": {}, + "model": "azure_ai/claude-haiku-5-5", + "object": "response", + "output": [ + { + "type": "message", + "id": ANY, + "status": "completed", + "role": "assistant", + "content": [{"type": "output_text", "text": "Hello.", "annotations": []}], + "phase": None, + } + ], + "parallel_tool_calls": False, + "temperature": None, + "tool_choice": "auto", + "tools": [], + "top_p": None, + "max_output_tokens": 64, + "previous_response_id": None, + "reasoning": None, + "status": "completed", + "text": {}, + "truncation": None, + "usage": { + "input_tokens": 23, + "input_tokens_details": { + "audio_tokens": None, + "cached_tokens": 0, + "cached_tokens_details": None, + "image_tokens": None, + "text_tokens": 23, + "video_tokens": None, + "cache_write_tokens": 0, + }, + "output_tokens": 6, + "output_tokens_details": {"audio_tokens": None, "reasoning_tokens": 0, "text_tokens": 6}, + "total_tokens": 29, + "cost": None, + }, + "user": None, + "store": None, + "provider_specific_fields": {"citations": None, "thinking_blocks": None}, + }, +) + + CLAUDE_SONNET_4_6_TEST_CASE: Final = TranslationTestCase( scenario="basic", litellm_endpoint="/v1/responses", diff --git a/tests/integration/translation/responses/bases/bedrock_converse.py b/tests/integration/translation/responses/bases/bedrock_converse.py index 313d962dc42..2a066ea98bf 100644 --- a/tests/integration/translation/responses/bases/bedrock_converse.py +++ b/tests/integration/translation/responses/bases/bedrock_converse.py @@ -86,6 +86,90 @@ CLAUDE_HAIKU_4_5_TEST_CASE: Final = TranslationTestCase( }, ) +CLAUDE_HAIKU_5_5_TEST_CASE: Final = TranslationTestCase( + scenario="basic", + litellm_endpoint="/v1/responses", + litellm_request={ + "model": "bedrock/converse/us.anthropic.claude-haiku-5-5", + "max_output_tokens": 64, + "instructions": "You are a terse assistant.", + "input": "Say hello.", + "cache": {"no-cache": True}, + }, + expected_provider_endpoint="/model/us.anthropic.claude-haiku-5-5/converse", + expected_provider_headers={"authorization": "Bearer synthetic-bedrock-key", "content-type": "application/json"}, + expected_provider_request={ + "messages": [{"role": "user", "content": [{"text": "Say hello."}]}], + "inferenceConfig": {"maxTokens": 64}, + "system": [{"text": "You are a terse assistant."}], + }, + mock_provider_response={ + "metrics": {"latencyMs": 954}, + "output": {"message": {"content": [{"text": "Hello."}], "role": "assistant"}}, + "stopReason": "end_turn", + "usage": { + "cacheReadInputTokenCount": 0, + "cacheReadInputTokens": 0, + "cacheWriteInputTokenCount": 0, + "cacheWriteInputTokens": 0, + "inputTokens": 23, + "outputTokens": 6, + "serverToolUsage": {}, + "totalTokens": 29, + }, + }, + expected_litellm_response={ + "id": ANY, + "created_at": ANY, + "error": None, + "incomplete_details": None, + "instructions": "You are a terse assistant.", + "metadata": {}, + "model": "bedrock/converse/us.anthropic.claude-haiku-5-5", + "object": "response", + "output": [ + { + "type": "message", + "id": ANY, + "status": "completed", + "role": "assistant", + "content": [{"type": "output_text", "text": "Hello.", "annotations": []}], + "phase": None, + } + ], + "parallel_tool_calls": False, + "temperature": None, + "tool_choice": "auto", + "tools": [], + "top_p": None, + "max_output_tokens": 64, + "previous_response_id": None, + "reasoning": None, + "status": "completed", + "text": {}, + "truncation": None, + "usage": { + "input_tokens": 23, + "input_tokens_details": { + "audio_tokens": None, + "cached_tokens": 0, + "cached_tokens_details": None, + "image_tokens": None, + "text_tokens": 23, + "video_tokens": None, + "cache_write_tokens": 0, + }, + "output_tokens": 6, + "output_tokens_details": {"audio_tokens": None, "reasoning_tokens": 0, "text_tokens": 6}, + "total_tokens": 29, + "cost": None, + }, + "user": None, + "store": None, + }, +) + + CLAUDE_SONNET_4_6_TEST_CASE: Final = TranslationTestCase( scenario="basic", litellm_endpoint="/v1/responses", diff --git a/tests/integration/translation/responses/bases/bedrock_invoke.py b/tests/integration/translation/responses/bases/bedrock_invoke.py index 8b982c34fbf..829e0231335 100644 --- a/tests/integration/translation/responses/bases/bedrock_invoke.py +++ b/tests/integration/translation/responses/bases/bedrock_invoke.py @@ -92,6 +92,97 @@ CLAUDE_HAIKU_4_5_TEST_CASE: Final = TranslationTestCase( }, ) +CLAUDE_HAIKU_5_5_TEST_CASE: Final = TranslationTestCase( + scenario="basic", + litellm_endpoint="/v1/responses", + litellm_request={ + "model": "bedrock/invoke/us.anthropic.claude-haiku-5-5", + "max_output_tokens": 64, + "instructions": "You are a terse assistant.", + "input": "Say hello.", + "cache": {"no-cache": True}, + }, + expected_provider_endpoint="/model/us.anthropic.claude-haiku-5-5/invoke", + expected_provider_headers={"authorization": "Bearer synthetic-bedrock-key", "content-type": "application/json"}, + expected_provider_request={ + "messages": [{"role": "user", "content": [{"type": "text", "text": "Say hello."}]}], + "max_tokens": 64, + "system": [{"type": "text", "text": "You are a terse assistant."}], + "anthropic_version": "bedrock-2023-05-31", + }, + mock_provider_response={ + "model": "claude-haiku-5-5", + "id": "msg_bdrk_prp4tfjg2ibow6km7wkqw5euejxxssl2ngm6wbgjxyg7xd32tkja", + "type": "message", + "role": "assistant", + "content": [{"type": "text", "text": "Hello."}], + "container": None, + "stop_reason": "end_turn", + "stop_sequence": None, + "stop_details": None, + "usage": { + "input_tokens": 23, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": {"ephemeral_5m_input_tokens": 0, "ephemeral_1h_input_tokens": 0}, + "output_tokens": 6, + "output_tokens_details": {"thinking_tokens": 0}, + "service_tier": "standard", + }, + }, + expected_litellm_response={ + "id": ANY, + "created_at": ANY, + "error": None, + "incomplete_details": None, + "instructions": "You are a terse assistant.", + "metadata": {}, + "model": "bedrock/invoke/us.anthropic.claude-haiku-5-5", + "object": "response", + "output": [ + { + "type": "message", + "id": ANY, + "status": "completed", + "role": "assistant", + "content": [{"type": "output_text", "text": "Hello.", "annotations": []}], + "phase": None, + } + ], + "parallel_tool_calls": False, + "temperature": None, + "tool_choice": "auto", + "tools": [], + "top_p": None, + "max_output_tokens": 64, + "previous_response_id": None, + "reasoning": None, + "status": "completed", + "text": {}, + "truncation": None, + "usage": { + "input_tokens": 23, + "input_tokens_details": { + "audio_tokens": None, + "cached_tokens": 0, + "cached_tokens_details": None, + "image_tokens": None, + "text_tokens": 23, + "video_tokens": None, + "cache_write_tokens": 0, + }, + "output_tokens": 6, + "output_tokens_details": {"audio_tokens": None, "reasoning_tokens": 0, "text_tokens": 6}, + "total_tokens": 29, + "cost": None, + }, + "user": None, + "store": None, + "provider_specific_fields": {"citations": None, "thinking_blocks": None}, + }, +) + + CLAUDE_SONNET_4_6_TEST_CASE: Final = TranslationTestCase( scenario="basic", litellm_endpoint="/v1/responses", diff --git a/tests/integration/translation/responses/basic/test_responses_basic_anthropic.py b/tests/integration/translation/responses/basic/test_responses_basic_anthropic.py index 857d8e40532..e55d30bf923 100644 --- a/tests/integration/translation/responses/basic/test_responses_basic_anthropic.py +++ b/tests/integration/translation/responses/basic/test_responses_basic_anthropic.py @@ -4,6 +4,7 @@ from integration._support.provider import SharedProvider from integration.translation.case import TranslationTestCase from integration.translation.responses.bases.anthropic import ( CLAUDE_HAIKU_4_5_TEST_CASE, + CLAUDE_HAIKU_5_5_TEST_CASE, CLAUDE_OPUS_4_8_TEST_CASE, CLAUDE_OPUS_5_5_TEST_CASE, CLAUDE_SONNET_4_6_TEST_CASE, @@ -17,6 +18,7 @@ from integration.translation.runner import assert_translation "case", [ CLAUDE_HAIKU_4_5_TEST_CASE, + CLAUDE_HAIKU_5_5_TEST_CASE, CLAUDE_SONNET_4_6_TEST_CASE, CLAUDE_SONNET_5_TEST_CASE, CLAUDE_OPUS_4_8_TEST_CASE, diff --git a/tests/integration/translation/responses/basic/test_responses_basic_azure_ai.py b/tests/integration/translation/responses/basic/test_responses_basic_azure_ai.py index fe1908c73ef..1783c85a74c 100644 --- a/tests/integration/translation/responses/basic/test_responses_basic_azure_ai.py +++ b/tests/integration/translation/responses/basic/test_responses_basic_azure_ai.py @@ -4,6 +4,7 @@ from integration._support.provider import SharedProvider from integration.translation.case import TranslationTestCase from integration.translation.responses.bases.azure_ai import ( CLAUDE_HAIKU_4_5_TEST_CASE, + CLAUDE_HAIKU_5_5_TEST_CASE, CLAUDE_OPUS_4_8_TEST_CASE, CLAUDE_OPUS_5_5_TEST_CASE, CLAUDE_SONNET_4_6_TEST_CASE, @@ -17,6 +18,7 @@ from integration.translation.runner import assert_translation "case", [ CLAUDE_HAIKU_4_5_TEST_CASE, + CLAUDE_HAIKU_5_5_TEST_CASE, CLAUDE_SONNET_4_6_TEST_CASE, CLAUDE_SONNET_5_TEST_CASE, CLAUDE_OPUS_4_8_TEST_CASE, diff --git a/tests/integration/translation/responses/basic/test_responses_basic_bedrock_converse.py b/tests/integration/translation/responses/basic/test_responses_basic_bedrock_converse.py index 80b9233c544..4b9f037c03f 100644 --- a/tests/integration/translation/responses/basic/test_responses_basic_bedrock_converse.py +++ b/tests/integration/translation/responses/basic/test_responses_basic_bedrock_converse.py @@ -4,6 +4,7 @@ from integration._support.provider import SharedProvider from integration.translation.case import TranslationTestCase from integration.translation.responses.bases.bedrock_converse import ( CLAUDE_HAIKU_4_5_TEST_CASE, + CLAUDE_HAIKU_5_5_TEST_CASE, CLAUDE_OPUS_4_8_TEST_CASE, CLAUDE_OPUS_5_5_TEST_CASE, CLAUDE_SONNET_4_6_TEST_CASE, @@ -17,6 +18,7 @@ from integration.translation.runner import assert_translation "case", [ CLAUDE_HAIKU_4_5_TEST_CASE, + CLAUDE_HAIKU_5_5_TEST_CASE, CLAUDE_SONNET_4_6_TEST_CASE, CLAUDE_SONNET_5_TEST_CASE, CLAUDE_OPUS_4_8_TEST_CASE, diff --git a/tests/integration/translation/responses/basic/test_responses_basic_bedrock_invoke.py b/tests/integration/translation/responses/basic/test_responses_basic_bedrock_invoke.py index a250fad85b5..71c64349b1d 100644 --- a/tests/integration/translation/responses/basic/test_responses_basic_bedrock_invoke.py +++ b/tests/integration/translation/responses/basic/test_responses_basic_bedrock_invoke.py @@ -4,6 +4,7 @@ from integration._support.provider import SharedProvider from integration.translation.case import TranslationTestCase from integration.translation.responses.bases.bedrock_invoke import ( CLAUDE_HAIKU_4_5_TEST_CASE, + CLAUDE_HAIKU_5_5_TEST_CASE, CLAUDE_OPUS_4_8_TEST_CASE, CLAUDE_OPUS_5_5_TEST_CASE, CLAUDE_SONNET_4_6_TEST_CASE, @@ -17,6 +18,7 @@ from integration.translation.runner import assert_translation "case", [ CLAUDE_HAIKU_4_5_TEST_CASE, + CLAUDE_HAIKU_5_5_TEST_CASE, CLAUDE_SONNET_4_6_TEST_CASE, CLAUDE_SONNET_5_TEST_CASE, CLAUDE_OPUS_4_8_TEST_CASE,