mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-16 04:29:31 +00:00
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 <kerry@berri.ai> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
8302f006dd
commit
0f1312f39d
25 changed files with 964 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue