test(translation): add claude-fable-5-1 translation cases (#46581)

* test(translation): add claude-fable-5-1 translation cases

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

* test(translation): match sibling style in claude-fable-5-1 cases

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

---------

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
devin-ai-integration[bot] 2026-10-15 01:54:42 +00:00 • committed by GitHub
parent a1da0ecbce
commit ff8b5d8324
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 2221 additions and 0 deletions

View file

@ -29,6 +29,11 @@ model_list:
model: anthropic/claude-opus-5-5
api_base: http://127.0.0.1:8191
api_key: synthetic-anthropic-key
- model_name: anthropic/claude-fable-5-1
litellm_params:
model: anthropic/claude-fable-5-1
api_base: http://127.0.0.1:8191
api_key: synthetic-anthropic-key
- model_name: anthropic/claude-sonnet-4-6
litellm_params:
model: anthropic/claude-sonnet-4-6
@ -84,6 +89,11 @@ model_list:
model: azure_ai/claude-opus-5-5
api_base: http://127.0.0.1:8191
api_key: synthetic-azure-ai-key
- model_name: azure_ai/claude-fable-5-1
litellm_params:
model: azure_ai/claude-fable-5-1
api_base: http://127.0.0.1:8191
api_key: synthetic-azure-ai-key
- model_name: bedrock/converse/us.anthropic.claude-haiku-4-5-20251001-v1:0
litellm_params:
model: bedrock/converse/us.anthropic.claude-haiku-4-5-20251001-v1:0
@ -126,6 +136,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-fable-5-1
litellm_params:
model: bedrock/converse/us.anthropic.claude-fable-5-1
api_base: http://127.0.0.1:8191
api_key: synthetic-bedrock-key
aws_region_name: us-east-1
- model_name: bedrock/global.xai.grok-4.7
litellm_params:
model: bedrock/global.xai.grok-4.7
@ -256,6 +272,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-fable-5-1
litellm_params:
model: bedrock/invoke/us.anthropic.claude-fable-5-1
api_base: http://127.0.0.1:8191
api_key: synthetic-bedrock-key
aws_region_name: us-east-1
- model_name: vertex_ai/claude-haiku-4-5@20251001
litellm_params:
model: vertex_ai/claude-haiku-4-5@20251001
@ -298,6 +320,13 @@ model_list:
vertex_project: synthetic-vertex-project
vertex_location: global
vertex_credentials: '{"type": "external_account", "audience": "synthetic-vertex-audience", "subject_token_type": "urn:ietf:params:oauth:token-type:jwt", "token_url": "http://127.0.0.1:8190/_oauth/token", "credential_source": {"url": "http://127.0.0.1:8190/health"}}'
- model_name: vertex_ai/claude-fable-5-1@default
litellm_params:
model: vertex_ai/claude-fable-5-1@default
api_base: http://127.0.0.1:8191
vertex_project: synthetic-vertex-project
vertex_location: global
vertex_credentials: '{"type": "external_account", "audience": "synthetic-vertex-audience", "subject_token_type": "urn:ietf:params:oauth:token-type:jwt", "token_url": "http://127.0.0.1:8190/_oauth/token", "credential_source": {"url": "http://127.0.0.1:8190/health"}}'
- model_name: vertex_ai/gemini-3.5-flash
litellm_params:
model: vertex_ai/gemini-3.5-flash

View file

@ -510,3 +510,86 @@ CLAUDE_OPUS_5_5_TEST_CASE: Final = TranslationTestCase(
},
},
)
CLAUDE_FABLE_5_1_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/chat/completions",
litellm_request={
"model": "anthropic/claude-fable-5-1",
"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-fable-5-1",
"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-fable-5-1",
"id": "msg_011Cg33fMNz7YZzvSR7Ycg5X",
"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-fable-5-1",
"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",
},
},
)

View file

@ -582,3 +582,87 @@ CLAUDE_OPUS_5_5_TEST_CASE: Final = TranslationTestCase(
},
},
)
CLAUDE_FABLE_5_1_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/chat/completions",
litellm_request={
"model": "azure_ai/claude-fable-5-1",
"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-fable-5-1",
"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-fable-5-1",
"id": "msg_011Cg33iornZJuXHAdrimopu",
"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": "not_available",
},
"diagnostics": None,
},
expected_litellm_response={
"id": ANY,
"created": ANY,
"model": "azure_ai/claude-fable-5-1",
"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": "not_available",
"service_tier": "standard",
},
},
)

View file

@ -402,3 +402,61 @@ CLAUDE_OPUS_5_5_TEST_CASE: Final = TranslationTestCase(
},
},
)
CLAUDE_FABLE_5_1_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/chat/completions",
litellm_request={
"model": "bedrock/converse/us.anthropic.claude-fable-5-1",
"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-fable-5-1/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": 4060},
"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-fable-5-1",
"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,
},
},
)

View file

@ -526,3 +526,79 @@ CLAUDE_OPUS_5_5_TEST_CASE: Final = TranslationTestCase(
},
},
)
CLAUDE_FABLE_5_1_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/chat/completions",
litellm_request={
"model": "bedrock/invoke/us.anthropic.claude-fable-5-1",
"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-fable-5-1/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-fable-5-1",
"id": "msg_bdrk_g7xqazu6324fsulzlcgyoh4ixc2pytulkxmgzcjh6bvesncpiweq",
"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-fable-5-1",
"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",
},
},
)

View file

@ -708,3 +708,311 @@ GEMINI_3_1_PRO_PREVIEW_TEST_CASE: Final = TranslationTestCase(
"vertex_ai_citation_metadata": [],
},
)
CLAUDE_FABLE_5_1_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/chat/completions",
litellm_request={
"model": "vertex_ai/claude-fable-5-1@default",
"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/projects/synthetic-vertex-project/locations/global/publishers/anthropic/models/claude-fable-5-1@default:rawPredict",
expected_provider_headers={
"authorization": "Bearer scripted-token",
"anthropic-version": "2023-06-01",
"content-type": "application/json",
"x-api-key": "scripted-token",
},
expected_provider_request={
"messages": [{"role": "user", "content": [{"type": "text", "text": "Say hello."}]}],
"max_tokens": 64,
"anthropic_version": "vertex-2023-10-16",
"system": [{"type": "text", "text": "You are a terse assistant."}],
},
mock_provider_response={
"model": "claude-fable-5-1",
"id": "msg_vrtx_011Cg346VGTLVWPwvR6aKfy7",
"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},
},
},
expected_litellm_status_code=200,
expected_litellm_response={
"id": ANY,
"created": ANY,
"model": "vertex_ai/claude-fable-5-1@default",
"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,
},
},
)
GEMINI_3_5_FLASH_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/chat/completions",
litellm_request={
"model": "vertex_ai/gemini-3.5-flash",
"max_tokens": 1024,
"messages": [
{"role": "system", "content": "You are a terse assistant."},
{"role": "user", "content": "Say hello."},
],
"cache": {"no-cache": True},
},
expected_provider_endpoint="/v1/projects/synthetic-vertex-project/locations/global/publishers/google/models/gemini-3.5-flash:generateContent",
expected_provider_headers={"content-type": "application/json", "authorization": "Bearer scripted-token"},
expected_provider_request={
"contents": [{"role": "user", "parts": [{"text": "Say hello."}]}],
"system_instruction": {"parts": [{"text": "You are a terse assistant."}]},
"generationConfig": {"max_output_tokens": 1024},
},
mock_provider_response={
"candidates": [
{
"content": {
"role": "model",
"parts": [{"text": "Hello.", "thoughtSignature": GEMINI_3_5_FLASH_THOUGHT_SIGNATURE}],
},
"finishReason": "STOP",
}
],
"usageMetadata": {
"promptTokenCount": 9,
"candidatesTokenCount": 2,
"totalTokenCount": 95,
"trafficType": "ON_DEMAND",
"promptTokensDetails": [{"modality": "TEXT", "tokenCount": 9}],
"candidatesTokensDetails": [{"modality": "TEXT", "tokenCount": 2}],
"thoughtsTokenCount": 84,
},
"modelVersion": "gemini-3.5-flash",
"createTime": "2026-10-05T22:54:50.809002Z",
"responseId": "uirEaqqwMc-U9LsPjJTYuQU",
},
expected_litellm_status_code=200,
expected_litellm_response={
"id": "uirEaqqwMc-U9LsPjJTYuQU",
"created": ANY,
"model": "vertex_ai/gemini-3.5-flash",
"object": "chat.completion",
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "Hello.",
"role": "assistant",
"images": [],
"thinking_blocks": [],
"provider_specific_fields": {"thought_signatures": [GEMINI_3_5_FLASH_THOUGHT_SIGNATURE]},
},
"provider_specific_fields": {"native_finish_reason": "STOP"},
}
],
"usage": {
"completion_tokens": 86,
"prompt_tokens": 9,
"total_tokens": 95,
"completion_tokens_details": {"reasoning_tokens": 84, "text_tokens": 2},
"prompt_tokens_details": {"text_tokens": 9},
},
"vertex_ai_grounding_metadata": [],
"vertex_ai_url_context_metadata": [],
"vertex_ai_safety_results": [],
"vertex_ai_citation_metadata": [],
},
)
GEMINI_3_8_FLASH_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/chat/completions",
litellm_request={
"model": "vertex_ai/gemini-3.8-flash",
"max_tokens": 1024,
"messages": [
{"role": "system", "content": "You are a terse assistant."},
{"role": "user", "content": "Say hello."},
],
"cache": {"no-cache": True},
},
expected_provider_endpoint="/v1/projects/synthetic-vertex-project/locations/global/publishers/google/models/gemini-3.8-flash:generateContent",
expected_provider_headers={"content-type": "application/json", "authorization": "Bearer scripted-token"},
expected_provider_request={
"contents": [{"role": "user", "parts": [{"text": "Say hello."}]}],
"system_instruction": {"parts": [{"text": "You are a terse assistant."}]},
"generationConfig": {"max_output_tokens": 1024},
},
mock_provider_response={
"candidates": [
{
"content": {
"role": "model",
"parts": [{"text": "Hello.", "thoughtSignature": GEMINI_3_8_FLASH_THOUGHT_SIGNATURE}],
},
"finishReason": "STOP",
}
],
"usageMetadata": {
"promptTokenCount": 9,
"candidatesTokenCount": 2,
"totalTokenCount": 118,
"trafficType": "ON_DEMAND",
"promptTokensDetails": [{"modality": "TEXT", "tokenCount": 9}],
"candidatesTokensDetails": [{"modality": "TEXT", "tokenCount": 2}],
"thoughtsTokenCount": 107,
},
"modelVersion": "gemini-3.8-flash",
"createTime": "2026-10-05T22:55:12.739855Z",
"responseId": "0CrEao-ULbuU9LsPk-mQ2A8",
},
expected_litellm_status_code=200,
expected_litellm_response={
"id": "0CrEao-ULbuU9LsPk-mQ2A8",
"created": ANY,
"model": "vertex_ai/gemini-3.8-flash",
"object": "chat.completion",
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "Hello.",
"role": "assistant",
"images": [],
"thinking_blocks": [],
"provider_specific_fields": {"thought_signatures": [GEMINI_3_8_FLASH_THOUGHT_SIGNATURE]},
},
"provider_specific_fields": {"native_finish_reason": "STOP"},
}
],
"usage": {
"completion_tokens": 109,
"prompt_tokens": 9,
"total_tokens": 118,
"completion_tokens_details": {"reasoning_tokens": 107, "text_tokens": 2},
"prompt_tokens_details": {"text_tokens": 9},
},
"vertex_ai_grounding_metadata": [],
"vertex_ai_url_context_metadata": [],
"vertex_ai_safety_results": [],
"vertex_ai_citation_metadata": [],
},
)
GEMINI_3_1_PRO_PREVIEW_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/chat/completions",
litellm_request={
"model": "vertex_ai/gemini-3.1-pro-preview",
"max_tokens": 1024,
"messages": [
{"role": "system", "content": "You are a terse assistant."},
{"role": "user", "content": "Say hello."},
],
"cache": {"no-cache": True},
},
expected_provider_endpoint="/v1/projects/synthetic-vertex-project/locations/global/publishers/google/models/gemini-3.1-pro-preview:generateContent",
expected_provider_headers={"content-type": "application/json", "authorization": "Bearer scripted-token"},
expected_provider_request={
"contents": [{"role": "user", "parts": [{"text": "Say hello."}]}],
"system_instruction": {"parts": [{"text": "You are a terse assistant."}]},
"generationConfig": {"max_output_tokens": 1024},
},
mock_provider_response={
"candidates": [
{
"content": {
"role": "model",
"parts": [{"text": "Hello.", "thoughtSignature": GEMINI_3_1_PRO_PREVIEW_THOUGHT_SIGNATURE}],
},
"finishReason": "STOP",
}
],
"usageMetadata": {
"promptTokenCount": 9,
"candidatesTokenCount": 1,
"totalTokenCount": 99,
"trafficType": "ON_DEMAND",
"promptTokensDetails": [{"modality": "TEXT", "tokenCount": 9}],
"candidatesTokensDetails": [{"modality": "TEXT", "tokenCount": 1}],
"thoughtsTokenCount": 89,
},
"modelVersion": "gemini-3.1-pro-preview",
"createTime": "2026-10-05T22:55:14.874538Z",
"responseId": "0irEaqqwNbCdq8YP3L2mqQ4",
},
expected_litellm_status_code=200,
expected_litellm_response={
"id": "0irEaqqwNbCdq8YP3L2mqQ4",
"created": ANY,
"model": "vertex_ai/gemini-3.1-pro-preview",
"object": "chat.completion",
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "Hello.",
"role": "assistant",
"images": [],
"thinking_blocks": [],
"provider_specific_fields": {"thought_signatures": [GEMINI_3_1_PRO_PREVIEW_THOUGHT_SIGNATURE]},
},
"provider_specific_fields": {"native_finish_reason": "STOP"},
}
],
"usage": {
"completion_tokens": 90,
"prompt_tokens": 9,
"total_tokens": 99,
"completion_tokens_details": {"reasoning_tokens": 89, "text_tokens": 1},
"prompt_tokens_details": {"text_tokens": 9},
},
"vertex_ai_grounding_metadata": [],
"vertex_ai_url_context_metadata": [],
"vertex_ai_safety_results": [],
"vertex_ai_citation_metadata": [],
},
)

View file

@ -3,6 +3,7 @@ from integration._support.client import Gateway
from integration._support.provider import SharedProvider
from integration.translation.case import TranslationTestCase
from integration.translation.chat_completions.bases.anthropic import (
CLAUDE_FABLE_5_1_TEST_CASE,
CLAUDE_HAIKU_4_5_TEST_CASE,
CLAUDE_HAIKU_5_5_TEST_CASE,
CLAUDE_OPUS_4_8_TEST_CASE,
@ -24,6 +25,7 @@ from integration.translation.runner import assert_translation
CLAUDE_OPUS_4_8_TEST_CASE,
CLAUDE_SONNET_5_5_TEST_CASE,
CLAUDE_OPUS_5_5_TEST_CASE,
CLAUDE_FABLE_5_1_TEST_CASE,
],
ids=lambda case: case.id,
)

View file

@ -3,6 +3,7 @@ from integration._support.client import Gateway
from integration._support.provider import SharedProvider
from integration.translation.case import TranslationTestCase
from integration.translation.chat_completions.bases.azure_ai import (
CLAUDE_FABLE_5_1_TEST_CASE,
CLAUDE_HAIKU_4_5_TEST_CASE,
CLAUDE_HAIKU_5_5_TEST_CASE,
CLAUDE_OPUS_4_8_TEST_CASE,
@ -24,6 +25,7 @@ from integration.translation.runner import assert_translation
CLAUDE_OPUS_4_8_TEST_CASE,
CLAUDE_SONNET_5_5_TEST_CASE,
CLAUDE_OPUS_5_5_TEST_CASE,
CLAUDE_FABLE_5_1_TEST_CASE,
],
ids=lambda case: case.id,
)

View file

@ -3,6 +3,7 @@ from integration._support.client import Gateway
from integration._support.provider import SharedProvider
from integration.translation.case import TranslationTestCase
from integration.translation.chat_completions.bases.bedrock_converse import (
CLAUDE_FABLE_5_1_TEST_CASE,
CLAUDE_HAIKU_4_5_TEST_CASE,
CLAUDE_HAIKU_5_5_TEST_CASE,
CLAUDE_OPUS_4_8_TEST_CASE,
@ -24,6 +25,7 @@ from integration.translation.runner import assert_translation
CLAUDE_OPUS_4_8_TEST_CASE,
CLAUDE_SONNET_5_5_TEST_CASE,
CLAUDE_OPUS_5_5_TEST_CASE,
CLAUDE_FABLE_5_1_TEST_CASE,
],
ids=lambda case: case.id,
)

View file

@ -3,6 +3,7 @@ from integration._support.client import Gateway
from integration._support.provider import SharedProvider
from integration.translation.case import TranslationTestCase
from integration.translation.chat_completions.bases.bedrock_invoke import (
CLAUDE_FABLE_5_1_TEST_CASE,
CLAUDE_HAIKU_4_5_TEST_CASE,
CLAUDE_HAIKU_5_5_TEST_CASE,
CLAUDE_OPUS_4_8_TEST_CASE,
@ -24,6 +25,7 @@ from integration.translation.runner import assert_translation
CLAUDE_OPUS_4_8_TEST_CASE,
CLAUDE_SONNET_5_5_TEST_CASE,
CLAUDE_OPUS_5_5_TEST_CASE,
CLAUDE_FABLE_5_1_TEST_CASE,
],
ids=lambda case: case.id,
)

View file

@ -4,6 +4,7 @@ from integration._support.client import Gateway
from integration._support.provider import SharedProvider
from integration.translation.case import TranslationTestCase
from integration.translation.chat_completions.bases.vertex_ai import (
CLAUDE_FABLE_5_1_TEST_CASE,
CLAUDE_HAIKU_4_5_TEST_CASE,
CLAUDE_SONNET_4_6_TEST_CASE,
CLAUDE_SONNET_5_TEST_CASE,
@ -26,6 +27,7 @@ from integration.translation.runner import assert_translation
CLAUDE_OPUS_4_8_TEST_CASE,
CLAUDE_SONNET_5_5_TEST_CASE,
CLAUDE_OPUS_5_5_TEST_CASE,
CLAUDE_FABLE_5_1_TEST_CASE,
GEMINI_3_5_FLASH_TEST_CASE,
GEMINI_3_8_FLASH_TEST_CASE,
GEMINI_3_1_PRO_PREVIEW_TEST_CASE,

View file

@ -523,3 +523,414 @@ CLAUDE_SONNET_5_5_TEST_CASE: Final = TranslationTestCase(
"model": "anthropic/claude-sonnet-5-5",
},
)
CLAUDE_FABLE_5_1_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/messages",
litellm_request={
"model": "anthropic/claude-fable-5-1",
"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-fable-5-1",
"max_tokens": 64,
"stream": False,
"system": "You are a terse assistant.",
"messages": [{"role": "user", "content": "Say hello."}],
},
mock_provider_response={
"model": "claude-fable-5-1",
"id": "msg_011Cg33tMTaEU15ciNQxuvgV",
"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-fable-5-1",
"id": "msg_011Cg33tMTaEU15ciNQxuvgV",
"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",
litellm_request={
"model": "anthropic/claude-sonnet-4-6",
"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-sonnet-4-6",
"max_tokens": 64,
"stream": False,
"system": "You are a terse assistant.",
"messages": [{"role": "user", "content": "Say hello."}],
},
mock_provider_response={
"model": "claude-sonnet-4-6",
"id": "msg_011CffzUNHaEfzVxCh5hskBG",
"type": "message",
"role": "assistant",
"content": [{"type": "text", "text": "Hello!"}],
"container": None,
"stop_reason": "end_turn",
"stop_sequence": None,
"stop_details": None,
"usage": {
"input_tokens": 18,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"cache_creation": {"ephemeral_5m_input_tokens": 0, "ephemeral_1h_input_tokens": 0},
"output_tokens": 5,
"service_tier": "standard",
"inference_geo": "global",
},
"diagnostics": None,
},
expected_litellm_response={
"model": "anthropic/claude-sonnet-4-6",
"id": "msg_011CffzUNHaEfzVxCh5hskBG",
"type": "message",
"role": "assistant",
"content": [{"type": "text", "text": "Hello!"}],
"container": None,
"stop_reason": "end_turn",
"stop_sequence": None,
"stop_details": None,
"usage": {
"input_tokens": 18,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"cache_creation": {"ephemeral_5m_input_tokens": 0, "ephemeral_1h_input_tokens": 0},
"output_tokens": 5,
"service_tier": "standard",
"inference_geo": "global",
},
"diagnostics": None,
},
)
CLAUDE_HAIKU_4_5_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/messages",
litellm_request={
"model": "anthropic/claude-haiku-4-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-4-5",
"max_tokens": 64,
"stream": False,
"system": "You are a terse assistant.",
"messages": [{"role": "user", "content": "Say hello."}],
},
mock_provider_response={
"model": "claude-haiku-4-5-20251001",
"id": "msg_011CfgDz9Vj8wXvKzhoM4MQA",
"type": "message",
"role": "assistant",
"content": [{"type": "text", "text": "Hello."}],
"container": None,
"stop_reason": "end_turn",
"stop_sequence": None,
"stop_details": None,
"usage": {
"input_tokens": 17,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"cache_creation": {"ephemeral_5m_input_tokens": 0, "ephemeral_1h_input_tokens": 0},
"output_tokens": 5,
"service_tier": "standard",
"inference_geo": "not_available",
},
"diagnostics": None,
},
expected_litellm_response={
"model": "anthropic/claude-haiku-4-5",
"id": "msg_011CfgDz9Vj8wXvKzhoM4MQA",
"type": "message",
"role": "assistant",
"content": [{"type": "text", "text": "Hello."}],
"container": None,
"stop_reason": "end_turn",
"stop_sequence": None,
"stop_details": None,
"usage": {
"input_tokens": 17,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"cache_creation": {"ephemeral_5m_input_tokens": 0, "ephemeral_1h_input_tokens": 0},
"output_tokens": 5,
"service_tier": "standard",
"inference_geo": "not_available",
},
"diagnostics": None,
},
)
CLAUDE_SONNET_5_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/messages",
litellm_request={
"model": "anthropic/claude-sonnet-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-sonnet-5",
"max_tokens": 64,
"stream": False,
"system": "You are a terse assistant.",
"messages": [{"role": "user", "content": "Say hello."}],
},
mock_provider_response={
"model": "claude-sonnet-5",
"id": "msg_011CfgDzLXmJmnHRTpeBoDmZ",
"type": "message",
"role": "assistant",
"content": [{"type": "text", "text": "Hello."}],
"container": None,
"stop_reason": "end_turn",
"stop_sequence": None,
"stop_details": None,
"usage": {
"input_tokens": 21,
"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-sonnet-5",
"id": "msg_011CfgDzLXmJmnHRTpeBoDmZ",
"type": "message",
"role": "assistant",
"content": [{"type": "text", "text": "Hello."}],
"container": None,
"stop_reason": "end_turn",
"stop_sequence": None,
"stop_details": None,
"usage": {
"input_tokens": 21,
"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_OPUS_4_8_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/messages",
litellm_request={
"model": "anthropic/claude-opus-4-8",
"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-opus-4-8",
"max_tokens": 64,
"stream": False,
"system": "You are a terse assistant.",
"messages": [{"role": "user", "content": "Say hello."}],
},
mock_provider_response={
"model": "claude-opus-4-8",
"id": "msg_011CfgDzSFYYPC3aYE9rH98J",
"type": "message",
"role": "assistant",
"content": [{"type": "text", "text": "Hello."}],
"container": None,
"stop_reason": "end_turn",
"stop_sequence": None,
"stop_details": None,
"usage": {
"input_tokens": 21,
"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-opus-4-8",
"id": "msg_011CfgDzSFYYPC3aYE9rH98J",
"type": "message",
"role": "assistant",
"content": [{"type": "text", "text": "Hello."}],
"container": None,
"stop_reason": "end_turn",
"stop_sequence": None,
"stop_details": None,
"usage": {
"input_tokens": 21,
"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_5_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/messages",
litellm_request={
"model": "anthropic/claude-sonnet-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-sonnet-5-5",
"max_tokens": 64,
"stream": False,
"system": "You are a terse assistant.",
"messages": [{"role": "user", "content": "Say hello."}],
},
mock_provider_response={
"model": "claude-sonnet-5-5",
"id": "msg_011CfgDzY6H6Rnp7FC7LsZvm",
"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-sonnet-5-5",
"id": "msg_011CfgDzY6H6Rnp7FC7LsZvm",
"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,
},
)

View file

@ -481,3 +481,73 @@ CLAUDE_OPUS_5_5_TEST_CASE: Final = TranslationTestCase(
"diagnostics": None,
},
)
CLAUDE_FABLE_5_1_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/messages",
litellm_request={
"model": "azure_ai/claude-fable-5-1",
"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-fable-5-1",
"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-fable-5-1",
"id": "msg_011Cg33vny3NNaurNqZaL94u",
"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": "not_available",
},
"diagnostics": None,
},
expected_litellm_response={
"model": "azure_ai/claude-fable-5-1",
"id": "msg_011Cg33vny3NNaurNqZaL94u",
"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": "not_available",
},
"diagnostics": None,
},
)

View file

@ -318,3 +318,49 @@ CLAUDE_OPUS_5_5_TEST_CASE: Final = TranslationTestCase(
"stop_details": None,
},
)
CLAUDE_FABLE_5_1_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/messages",
litellm_request={
"model": "bedrock/converse/us.anthropic.claude-fable-5-1",
"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-fable-5-1/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": 2352},
"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-fable-5-1",
"stop_sequence": None,
"usage": {"input_tokens": 23, "output_tokens": 6},
"content": [{"type": "text", "text": "Hello."}],
"stop_reason": "end_turn",
"stop_details": None,
},
)

View file

@ -418,3 +418,64 @@ CLAUDE_OPUS_5_5_TEST_CASE: Final = TranslationTestCase(
},
},
)
CLAUDE_FABLE_5_1_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/messages",
litellm_request={
"model": "bedrock/invoke/us.anthropic.claude-fable-5-1",
"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-fable-5-1/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-fable-5-1",
"id": "msg_bdrk_dljkl2he4crmo25l5bqtvtdl4fesopljelt4povcvsjcln2vntaq",
"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-fable-5-1",
"id": "msg_bdrk_dljkl2he4crmo25l5bqtvtdl4fesopljelt4povcvsjcln2vntaq",
"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",
},
},
)

View file

@ -525,3 +525,226 @@ GEMINI_3_1_PRO_PREVIEW_TEST_CASE: Final = TranslationTestCase(
"stop_details": None,
},
)
CLAUDE_FABLE_5_1_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/messages",
litellm_request={
"model": "vertex_ai/claude-fable-5-1@default",
"max_tokens": 64,
"system": "You are a terse assistant.",
"messages": [{"role": "user", "content": "Say hello."}],
"cache": {"no-cache": True},
},
expected_provider_endpoint="/v1/projects/synthetic-vertex-project/locations/global/publishers/anthropic/models/claude-fable-5-1@default:rawPredict",
expected_provider_headers={"authorization": "Bearer scripted-token", "content-type": "application/json"},
expected_provider_request={
"messages": [{"role": "user", "content": "Say hello."}],
"max_tokens": 64,
"stream": False,
"system": [{"type": "text", "text": "You are a terse assistant."}],
"anthropic_version": "vertex-2023-10-16",
},
mock_provider_response={
"model": "claude-fable-5-1",
"id": "msg_vrtx_011Cg33y2uVUY4EWp5v3Eh7T",
"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},
},
},
expected_litellm_status_code=200,
expected_litellm_response={
"model": "vertex_ai/claude-fable-5-1@default",
"id": "msg_vrtx_011Cg33y2uVUY4EWp5v3Eh7T",
"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},
},
},
)
GEMINI_3_5_FLASH_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/messages",
litellm_request={
"model": "vertex_ai/gemini-3.5-flash",
"max_tokens": 1024,
"system": "You are a terse assistant.",
"messages": [{"role": "user", "content": "Say hello."}],
"cache": {"no-cache": True},
},
expected_provider_endpoint="/v1/projects/synthetic-vertex-project/locations/global/publishers/google/models/gemini-3.5-flash:generateContent",
expected_provider_headers={"content-type": "application/json", "authorization": "Bearer scripted-token"},
expected_provider_request={
"contents": [{"role": "user", "parts": [{"text": "Say hello."}]}],
"system_instruction": {"parts": [{"text": "You are a terse assistant."}]},
"generationConfig": {"max_output_tokens": 1024},
},
mock_provider_response={
"candidates": [
{
"content": {
"role": "model",
"parts": [{"text": "Hello.", "thoughtSignature": GEMINI_3_5_FLASH_THOUGHT_SIGNATURE}],
},
"finishReason": "STOP",
}
],
"usageMetadata": {
"promptTokenCount": 9,
"candidatesTokenCount": 2,
"totalTokenCount": 95,
"trafficType": "ON_DEMAND",
"promptTokensDetails": [{"modality": "TEXT", "tokenCount": 9}],
"candidatesTokensDetails": [{"modality": "TEXT", "tokenCount": 2}],
"thoughtsTokenCount": 84,
},
"modelVersion": "gemini-3.5-flash",
"createTime": "2026-10-05T22:54:50.809002Z",
"responseId": "uirEaqqwMc-U9LsPjJTYuQU",
},
expected_litellm_status_code=200,
expected_litellm_response={
"id": "uirEaqqwMc-U9LsPjJTYuQU",
"type": "message",
"role": "assistant",
"model": "vertex_ai/gemini-3.5-flash",
"stop_sequence": None,
"usage": {"input_tokens": 9, "output_tokens": 86},
"content": [{"type": "text", "text": "Hello."}],
"stop_reason": "end_turn",
"stop_details": None,
},
)
GEMINI_3_8_FLASH_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/messages",
litellm_request={
"model": "vertex_ai/gemini-3.8-flash",
"max_tokens": 1024,
"system": "You are a terse assistant.",
"messages": [{"role": "user", "content": "Say hello."}],
"cache": {"no-cache": True},
},
expected_provider_endpoint="/v1/projects/synthetic-vertex-project/locations/global/publishers/google/models/gemini-3.8-flash:generateContent",
expected_provider_headers={"content-type": "application/json", "authorization": "Bearer scripted-token"},
expected_provider_request={
"contents": [{"role": "user", "parts": [{"text": "Say hello."}]}],
"system_instruction": {"parts": [{"text": "You are a terse assistant."}]},
"generationConfig": {"max_output_tokens": 1024},
},
mock_provider_response={
"candidates": [
{
"content": {
"role": "model",
"parts": [{"text": "Hello.", "thoughtSignature": GEMINI_3_8_FLASH_THOUGHT_SIGNATURE}],
},
"finishReason": "STOP",
}
],
"usageMetadata": {
"promptTokenCount": 9,
"candidatesTokenCount": 2,
"totalTokenCount": 118,
"trafficType": "ON_DEMAND",
"promptTokensDetails": [{"modality": "TEXT", "tokenCount": 9}],
"candidatesTokensDetails": [{"modality": "TEXT", "tokenCount": 2}],
"thoughtsTokenCount": 107,
},
"modelVersion": "gemini-3.8-flash",
"createTime": "2026-10-05T22:55:12.739855Z",
"responseId": "0CrEao-ULbuU9LsPk-mQ2A8",
},
expected_litellm_status_code=200,
expected_litellm_response={
"id": "0CrEao-ULbuU9LsPk-mQ2A8",
"type": "message",
"role": "assistant",
"model": "vertex_ai/gemini-3.8-flash",
"stop_sequence": None,
"usage": {"input_tokens": 9, "output_tokens": 109},
"content": [{"type": "text", "text": "Hello."}],
"stop_reason": "end_turn",
"stop_details": None,
},
)
GEMINI_3_1_PRO_PREVIEW_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/messages",
litellm_request={
"model": "vertex_ai/gemini-3.1-pro-preview",
"max_tokens": 1024,
"system": "You are a terse assistant.",
"messages": [{"role": "user", "content": "Say hello."}],
"cache": {"no-cache": True},
},
expected_provider_endpoint="/v1/projects/synthetic-vertex-project/locations/global/publishers/google/models/gemini-3.1-pro-preview:generateContent",
expected_provider_headers={"content-type": "application/json", "authorization": "Bearer scripted-token"},
expected_provider_request={
"contents": [{"role": "user", "parts": [{"text": "Say hello."}]}],
"system_instruction": {"parts": [{"text": "You are a terse assistant."}]},
"generationConfig": {"max_output_tokens": 1024},
},
mock_provider_response={
"candidates": [
{
"content": {
"role": "model",
"parts": [{"text": "Hello.", "thoughtSignature": GEMINI_3_1_PRO_PREVIEW_THOUGHT_SIGNATURE}],
},
"finishReason": "STOP",
}
],
"usageMetadata": {
"promptTokenCount": 9,
"candidatesTokenCount": 1,
"totalTokenCount": 99,
"trafficType": "ON_DEMAND",
"promptTokensDetails": [{"modality": "TEXT", "tokenCount": 9}],
"candidatesTokensDetails": [{"modality": "TEXT", "tokenCount": 1}],
"thoughtsTokenCount": 89,
},
"modelVersion": "gemini-3.1-pro-preview",
"createTime": "2026-10-05T22:55:14.874538Z",
"responseId": "0irEaqqwNbCdq8YP3L2mqQ4",
},
expected_litellm_status_code=200,
expected_litellm_response={
"id": "0irEaqqwNbCdq8YP3L2mqQ4",
"type": "message",
"role": "assistant",
"model": "vertex_ai/gemini-3.1-pro-preview",
"stop_sequence": None,
"usage": {"input_tokens": 9, "output_tokens": 90},
"content": [{"type": "text", "text": "Hello."}],
"stop_reason": "end_turn",
"stop_details": None,
},
)

View file

@ -3,6 +3,7 @@ from integration._support.client import Gateway
from integration._support.provider import SharedProvider
from integration.translation.case import TranslationTestCase
from integration.translation.messages.bases.anthropic import (
CLAUDE_FABLE_5_1_TEST_CASE,
CLAUDE_HAIKU_4_5_TEST_CASE,
CLAUDE_HAIKU_5_5_TEST_CASE,
CLAUDE_OPUS_4_8_TEST_CASE,
@ -24,6 +25,7 @@ from integration.translation.runner import assert_translation
CLAUDE_OPUS_4_8_TEST_CASE,
CLAUDE_SONNET_5_5_TEST_CASE,
CLAUDE_OPUS_5_5_TEST_CASE,
CLAUDE_FABLE_5_1_TEST_CASE,
],
ids=lambda case: case.id,
)

View file

@ -3,6 +3,7 @@ from integration._support.client import Gateway
from integration._support.provider import SharedProvider
from integration.translation.case import TranslationTestCase
from integration.translation.messages.bases.azure_ai import (
CLAUDE_FABLE_5_1_TEST_CASE,
CLAUDE_HAIKU_4_5_TEST_CASE,
CLAUDE_HAIKU_5_5_TEST_CASE,
CLAUDE_OPUS_4_8_TEST_CASE,
@ -24,6 +25,7 @@ from integration.translation.runner import assert_translation
CLAUDE_OPUS_4_8_TEST_CASE,
CLAUDE_SONNET_5_5_TEST_CASE,
CLAUDE_OPUS_5_5_TEST_CASE,
CLAUDE_FABLE_5_1_TEST_CASE,
],
ids=lambda case: case.id,
)

View file

@ -3,6 +3,7 @@ from integration._support.client import Gateway
from integration._support.provider import SharedProvider
from integration.translation.case import TranslationTestCase
from integration.translation.messages.bases.bedrock_converse import (
CLAUDE_FABLE_5_1_TEST_CASE,
CLAUDE_HAIKU_4_5_TEST_CASE,
CLAUDE_HAIKU_5_5_TEST_CASE,
CLAUDE_OPUS_4_8_TEST_CASE,
@ -24,6 +25,7 @@ from integration.translation.runner import assert_translation
CLAUDE_OPUS_4_8_TEST_CASE,
CLAUDE_SONNET_5_5_TEST_CASE,
CLAUDE_OPUS_5_5_TEST_CASE,
CLAUDE_FABLE_5_1_TEST_CASE,
],
ids=lambda case: case.id,
)

View file

@ -3,6 +3,7 @@ from integration._support.client import Gateway
from integration._support.provider import SharedProvider
from integration.translation.case import TranslationTestCase
from integration.translation.messages.bases.bedrock_invoke import (
CLAUDE_FABLE_5_1_TEST_CASE,
CLAUDE_HAIKU_4_5_TEST_CASE,
CLAUDE_HAIKU_5_5_TEST_CASE,
CLAUDE_OPUS_4_8_TEST_CASE,
@ -24,6 +25,7 @@ from integration.translation.runner import assert_translation
CLAUDE_OPUS_4_8_TEST_CASE,
CLAUDE_SONNET_5_5_TEST_CASE,
CLAUDE_OPUS_5_5_TEST_CASE,
CLAUDE_FABLE_5_1_TEST_CASE,
],
ids=lambda case: case.id,
)

View file

@ -4,6 +4,7 @@ from integration._support.client import Gateway
from integration._support.provider import SharedProvider
from integration.translation.case import TranslationTestCase
from integration.translation.messages.bases.vertex_ai import (
CLAUDE_FABLE_5_1_TEST_CASE,
CLAUDE_HAIKU_4_5_TEST_CASE,
CLAUDE_SONNET_4_6_TEST_CASE,
CLAUDE_SONNET_5_TEST_CASE,
@ -26,6 +27,7 @@ from integration.translation.runner import assert_translation
CLAUDE_OPUS_4_8_TEST_CASE,
CLAUDE_SONNET_5_5_TEST_CASE,
CLAUDE_OPUS_5_5_TEST_CASE,
CLAUDE_FABLE_5_1_TEST_CASE,
GEMINI_3_5_FLASH_TEST_CASE,
GEMINI_3_8_FLASH_TEST_CASE,
GEMINI_3_1_PRO_PREVIEW_TEST_CASE,

View file

@ -658,3 +658,100 @@ CLAUDE_OPUS_5_5_TEST_CASE: Final = TranslationTestCase(
"provider_specific_fields": {"citations": None, "thinking_blocks": None},
},
)
CLAUDE_FABLE_5_1_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/responses",
litellm_request={
"model": "anthropic/claude-fable-5-1",
"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-fable-5-1",
"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-fable-5-1",
"id": "msg_011Cg343GgaNGYZ8EW5CiKWy",
"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-fable-5-1",
"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},
},
)

View file

@ -680,3 +680,101 @@ CLAUDE_OPUS_5_5_TEST_CASE: Final = TranslationTestCase(
"provider_specific_fields": {"citations": None, "thinking_blocks": None},
},
)
CLAUDE_FABLE_5_1_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/responses",
litellm_request={
"model": "azure_ai/claude-fable-5-1",
"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-fable-5-1",
"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-fable-5-1",
"id": "msg_011Cg344Nycw3eBjJcjxMMpq",
"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": "not_available",
},
"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-fable-5-1",
"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},
},
)

View file

@ -584,3 +584,87 @@ CLAUDE_OPUS_5_5_TEST_CASE: Final = TranslationTestCase(
"store": None,
},
)
CLAUDE_FABLE_5_1_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/responses",
litellm_request={
"model": "bedrock/converse/us.anthropic.claude-fable-5-1",
"max_output_tokens": 64,
"instructions": "You are a terse assistant.",
"input": "Say hello.",
"cache": {"no-cache": True},
},
expected_provider_endpoint="/model/us.anthropic.claude-fable-5-1/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": 2671},
"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-fable-5-1",
"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,
},
)

View file

@ -631,3 +631,94 @@ CLAUDE_OPUS_5_5_TEST_CASE: Final = TranslationTestCase(
"provider_specific_fields": {"citations": None, "thinking_blocks": None},
},
)
CLAUDE_FABLE_5_1_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/responses",
litellm_request={
"model": "bedrock/invoke/us.anthropic.claude-fable-5-1",
"max_output_tokens": 64,
"instructions": "You are a terse assistant.",
"input": "Say hello.",
"cache": {"no-cache": True},
},
expected_provider_endpoint="/model/us.anthropic.claude-fable-5-1/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-fable-5-1",
"id": "msg_bdrk_kct3wlyhliymwyvqmjn6uy72qpg4hekwep4upsfqdec3b7wqf5vq",
"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-fable-5-1",
"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},
},
)

View file

@ -852,3 +852,375 @@ GEMINI_3_1_PRO_PREVIEW_TEST_CASE: Final = TranslationTestCase(
"provider_specific_fields": {"traffic_type": "ON_DEMAND"},
},
)
CLAUDE_FABLE_5_1_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/responses",
litellm_request={
"model": "vertex_ai/claude-fable-5-1@default",
"max_output_tokens": 64,
"instructions": "You are a terse assistant.",
"input": "Say hello.",
"cache": {"no-cache": True},
},
expected_provider_endpoint="/v1/projects/synthetic-vertex-project/locations/global/publishers/anthropic/models/claude-fable-5-1@default:rawPredict",
expected_provider_headers={
"authorization": "Bearer scripted-token",
"anthropic-version": "2023-06-01",
"content-type": "application/json",
"x-api-key": "scripted-token",
},
expected_provider_request={
"messages": [{"role": "user", "content": [{"type": "text", "text": "Say hello."}]}],
"max_tokens": 64,
"anthropic_version": "vertex-2023-10-16",
"system": [{"type": "text", "text": "You are a terse assistant."}],
},
mock_provider_response={
"model": "claude-fable-5-1",
"id": "msg_vrtx_011Cg34Avf36f3MyK2PbrYyq",
"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},
},
},
expected_litellm_status_code=200,
expected_litellm_response={
"id": ANY,
"created_at": ANY,
"error": None,
"incomplete_details": None,
"instructions": "You are a terse assistant.",
"metadata": {},
"model": "vertex_ai/claude-fable-5-1@default",
"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},
},
)
GEMINI_3_5_FLASH_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/responses",
litellm_request={
"model": "vertex_ai/gemini-3.5-flash",
"max_output_tokens": 1024,
"instructions": "You are a terse assistant.",
"input": "Say hello.",
"cache": {"no-cache": True},
},
expected_provider_endpoint="/v1/projects/synthetic-vertex-project/locations/global/publishers/google/models/gemini-3.5-flash:generateContent",
expected_provider_headers={"content-type": "application/json", "authorization": "Bearer scripted-token"},
expected_provider_request={
"contents": [{"role": "user", "parts": [{"text": "Say hello."}]}],
"system_instruction": {"parts": [{"text": "You are a terse assistant."}]},
"generationConfig": {"max_output_tokens": 1024},
},
mock_provider_response={
"candidates": [
{
"content": {
"role": "model",
"parts": [{"text": "Hello.", "thoughtSignature": GEMINI_3_5_FLASH_THOUGHT_SIGNATURE}],
},
"finishReason": "STOP",
}
],
"usageMetadata": {
"promptTokenCount": 9,
"candidatesTokenCount": 2,
"totalTokenCount": 95,
"trafficType": "ON_DEMAND",
"promptTokensDetails": [{"modality": "TEXT", "tokenCount": 9}],
"candidatesTokensDetails": [{"modality": "TEXT", "tokenCount": 2}],
"thoughtsTokenCount": 84,
},
"modelVersion": "gemini-3.5-flash",
"createTime": "2026-10-05T22:54:50.809002Z",
"responseId": "uirEaqqwMc-U9LsPjJTYuQU",
},
expected_litellm_status_code=200,
expected_litellm_response={
"id": ANY,
"created_at": ANY,
"error": None,
"incomplete_details": None,
"instructions": "You are a terse assistant.",
"metadata": {},
"model": "vertex_ai/gemini-3.5-flash",
"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": 1024,
"previous_response_id": None,
"reasoning": None,
"status": "completed",
"text": {},
"truncation": None,
"usage": {
"input_tokens": 9,
"input_tokens_details": {
"audio_tokens": None,
"cached_tokens": 0,
"cached_tokens_details": None,
"image_tokens": None,
"text_tokens": 9,
"video_tokens": None,
},
"output_tokens": 86,
"output_tokens_details": {"audio_tokens": None, "reasoning_tokens": 84, "text_tokens": 2},
"total_tokens": 95,
"cost": None,
},
"user": None,
"store": None,
"provider_specific_fields": {"traffic_type": "ON_DEMAND"},
},
)
GEMINI_3_8_FLASH_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/responses",
litellm_request={
"model": "vertex_ai/gemini-3.8-flash",
"max_output_tokens": 1024,
"instructions": "You are a terse assistant.",
"input": "Say hello.",
"cache": {"no-cache": True},
},
expected_provider_endpoint="/v1/projects/synthetic-vertex-project/locations/global/publishers/google/models/gemini-3.8-flash:generateContent",
expected_provider_headers={"content-type": "application/json", "authorization": "Bearer scripted-token"},
expected_provider_request={
"contents": [{"role": "user", "parts": [{"text": "Say hello."}]}],
"system_instruction": {"parts": [{"text": "You are a terse assistant."}]},
"generationConfig": {"max_output_tokens": 1024},
},
mock_provider_response={
"candidates": [
{
"content": {
"role": "model",
"parts": [{"text": "Hello.", "thoughtSignature": GEMINI_3_8_FLASH_THOUGHT_SIGNATURE}],
},
"finishReason": "STOP",
}
],
"usageMetadata": {
"promptTokenCount": 9,
"candidatesTokenCount": 2,
"totalTokenCount": 118,
"trafficType": "ON_DEMAND",
"promptTokensDetails": [{"modality": "TEXT", "tokenCount": 9}],
"candidatesTokensDetails": [{"modality": "TEXT", "tokenCount": 2}],
"thoughtsTokenCount": 107,
},
"modelVersion": "gemini-3.8-flash",
"createTime": "2026-10-05T22:55:12.739855Z",
"responseId": "0CrEao-ULbuU9LsPk-mQ2A8",
},
expected_litellm_status_code=200,
expected_litellm_response={
"id": ANY,
"created_at": ANY,
"error": None,
"incomplete_details": None,
"instructions": "You are a terse assistant.",
"metadata": {},
"model": "vertex_ai/gemini-3.8-flash",
"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": 1024,
"previous_response_id": None,
"reasoning": None,
"status": "completed",
"text": {},
"truncation": None,
"usage": {
"input_tokens": 9,
"input_tokens_details": {
"audio_tokens": None,
"cached_tokens": 0,
"cached_tokens_details": None,
"image_tokens": None,
"text_tokens": 9,
"video_tokens": None,
},
"output_tokens": 109,
"output_tokens_details": {"audio_tokens": None, "reasoning_tokens": 107, "text_tokens": 2},
"total_tokens": 118,
"cost": None,
},
"user": None,
"store": None,
"provider_specific_fields": {"traffic_type": "ON_DEMAND"},
},
)
GEMINI_3_1_PRO_PREVIEW_TEST_CASE: Final = TranslationTestCase(
scenario="basic",
litellm_endpoint="/v1/responses",
litellm_request={
"model": "vertex_ai/gemini-3.1-pro-preview",
"max_output_tokens": 1024,
"instructions": "You are a terse assistant.",
"input": "Say hello.",
"cache": {"no-cache": True},
},
expected_provider_endpoint="/v1/projects/synthetic-vertex-project/locations/global/publishers/google/models/gemini-3.1-pro-preview:generateContent",
expected_provider_headers={"content-type": "application/json", "authorization": "Bearer scripted-token"},
expected_provider_request={
"contents": [{"role": "user", "parts": [{"text": "Say hello."}]}],
"system_instruction": {"parts": [{"text": "You are a terse assistant."}]},
"generationConfig": {"max_output_tokens": 1024},
},
mock_provider_response={
"candidates": [
{
"content": {
"role": "model",
"parts": [{"text": "Hello.", "thoughtSignature": GEMINI_3_1_PRO_PREVIEW_THOUGHT_SIGNATURE}],
},
"finishReason": "STOP",
}
],
"usageMetadata": {
"promptTokenCount": 9,
"candidatesTokenCount": 1,
"totalTokenCount": 99,
"trafficType": "ON_DEMAND",
"promptTokensDetails": [{"modality": "TEXT", "tokenCount": 9}],
"candidatesTokensDetails": [{"modality": "TEXT", "tokenCount": 1}],
"thoughtsTokenCount": 89,
},
"modelVersion": "gemini-3.1-pro-preview",
"createTime": "2026-10-05T22:55:14.874538Z",
"responseId": "0irEaqqwNbCdq8YP3L2mqQ4",
},
expected_litellm_status_code=200,
expected_litellm_response={
"id": ANY,
"created_at": ANY,
"error": None,
"incomplete_details": None,
"instructions": "You are a terse assistant.",
"metadata": {},
"model": "vertex_ai/gemini-3.1-pro-preview",
"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": 1024,
"previous_response_id": None,
"reasoning": None,
"status": "completed",
"text": {},
"truncation": None,
"usage": {
"input_tokens": 9,
"input_tokens_details": {
"audio_tokens": None,
"cached_tokens": 0,
"cached_tokens_details": None,
"image_tokens": None,
"text_tokens": 9,
"video_tokens": None,
},
"output_tokens": 90,
"output_tokens_details": {"audio_tokens": None, "reasoning_tokens": 89, "text_tokens": 1},
"total_tokens": 99,
"cost": None,
},
"user": None,
"store": None,
"provider_specific_fields": {"traffic_type": "ON_DEMAND"},
},
)

View file

@ -3,6 +3,7 @@ from integration._support.client import Gateway
from integration._support.provider import SharedProvider
from integration.translation.case import TranslationTestCase
from integration.translation.responses.bases.anthropic import (
CLAUDE_FABLE_5_1_TEST_CASE,
CLAUDE_HAIKU_4_5_TEST_CASE,
CLAUDE_HAIKU_5_5_TEST_CASE,
CLAUDE_OPUS_4_8_TEST_CASE,
@ -24,6 +25,7 @@ from integration.translation.runner import assert_translation
CLAUDE_OPUS_4_8_TEST_CASE,
CLAUDE_SONNET_5_5_TEST_CASE,
CLAUDE_OPUS_5_5_TEST_CASE,
CLAUDE_FABLE_5_1_TEST_CASE,
],
ids=lambda case: case.id,
)

View file

@ -3,6 +3,7 @@ from integration._support.client import Gateway
from integration._support.provider import SharedProvider
from integration.translation.case import TranslationTestCase
from integration.translation.responses.bases.azure_ai import (
CLAUDE_FABLE_5_1_TEST_CASE,
CLAUDE_HAIKU_4_5_TEST_CASE,
CLAUDE_HAIKU_5_5_TEST_CASE,
CLAUDE_OPUS_4_8_TEST_CASE,
@ -24,6 +25,7 @@ from integration.translation.runner import assert_translation
CLAUDE_OPUS_4_8_TEST_CASE,
CLAUDE_SONNET_5_5_TEST_CASE,
CLAUDE_OPUS_5_5_TEST_CASE,
CLAUDE_FABLE_5_1_TEST_CASE,
],
ids=lambda case: case.id,
)

View file

@ -3,6 +3,7 @@ from integration._support.client import Gateway
from integration._support.provider import SharedProvider
from integration.translation.case import TranslationTestCase
from integration.translation.responses.bases.bedrock_converse import (
CLAUDE_FABLE_5_1_TEST_CASE,
CLAUDE_HAIKU_4_5_TEST_CASE,
CLAUDE_HAIKU_5_5_TEST_CASE,
CLAUDE_OPUS_4_8_TEST_CASE,
@ -24,6 +25,7 @@ from integration.translation.runner import assert_translation
CLAUDE_OPUS_4_8_TEST_CASE,
CLAUDE_SONNET_5_5_TEST_CASE,
CLAUDE_OPUS_5_5_TEST_CASE,
CLAUDE_FABLE_5_1_TEST_CASE,
],
ids=lambda case: case.id,
)

View file

@ -3,6 +3,7 @@ from integration._support.client import Gateway
from integration._support.provider import SharedProvider
from integration.translation.case import TranslationTestCase
from integration.translation.responses.bases.bedrock_invoke import (
CLAUDE_FABLE_5_1_TEST_CASE,
CLAUDE_HAIKU_4_5_TEST_CASE,
CLAUDE_HAIKU_5_5_TEST_CASE,
CLAUDE_OPUS_4_8_TEST_CASE,
@ -24,6 +25,7 @@ from integration.translation.runner import assert_translation
CLAUDE_OPUS_4_8_TEST_CASE,
CLAUDE_SONNET_5_5_TEST_CASE,
CLAUDE_OPUS_5_5_TEST_CASE,
CLAUDE_FABLE_5_1_TEST_CASE,
],
ids=lambda case: case.id,
)

View file

@ -4,6 +4,7 @@ from integration._support.client import Gateway
from integration._support.provider import SharedProvider
from integration.translation.case import TranslationTestCase
from integration.translation.responses.bases.vertex_ai import (
CLAUDE_FABLE_5_1_TEST_CASE,
CLAUDE_HAIKU_4_5_TEST_CASE,
CLAUDE_SONNET_4_6_TEST_CASE,
CLAUDE_SONNET_5_TEST_CASE,
@ -26,6 +27,7 @@ from integration.translation.runner import assert_translation
CLAUDE_OPUS_4_8_TEST_CASE,
CLAUDE_SONNET_5_5_TEST_CASE,
CLAUDE_OPUS_5_5_TEST_CASE,
CLAUDE_FABLE_5_1_TEST_CASE,
GEMINI_3_5_FLASH_TEST_CASE,
GEMINI_3_8_FLASH_TEST_CASE,
GEMINI_3_1_PRO_PREVIEW_TEST_CASE,