The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
test(cost): add azure gpt-6 /v1/messages bridge cost parity pairs (#46139)
Kerry Luce6fcafd04f7
diff --git a/tests/integration/cost_calculation/cases/azure.py b/tests/integration/cost_calculation/cases/azure.pyindex b6d6d0496da..df96d1d9993 100644--- a/tests/integration/cost_calculation/cases/azure.py+++ b/tests/integration/cost_calculation/cases/azure.py@@ -17,6 +17,7 @@ from integration.cost_calculation.cost_tracking_case import (SseResponse,WavUpload,)+from integration.cost_calculation.bridge_cost_parity.case import BridgeCostParityTestCasefrom integration.cost_calculation.stream_parity.case import StreamParityTestCase, sse_frames@@ -5572,7 +5573,59 @@ AZURE_GPT_6_LUNA_TOOL_CALL: Final = CostTrackingTestCase(),)+AZURE_GPT_6_SOL_MESSAGES_BRIDGED_JSON: Final = AZURE_GPT_6_SOL_INPUT_TEXT.model_copy(+ update={+ "name": "azure-gpt-6-sol-messages_bridged_json",+ "endpoint": "/v1/messages",+ "request": {+ "model": "$MODEL",+ "max_tokens": 412,+ "messages": [{"role": "user", "content": "azure chat native fixture"}],+ },+ }+)++AZURE_GPT_6_LUNA_MESSAGES_BRIDGED_JSON: Final = AZURE_GPT_6_LUNA_INPUT_TEXT.model_copy(+ update={+ "name": "azure-gpt-6-luna-messages_bridged_json",+ "endpoint": "/v1/messages",+ "request": {+ "model": "$MODEL",+ "max_tokens": 412,+ "messages": [{"role": "user", "content": "azure chat native fixture"}],+ },+ }+)++AZURE_GPT_6_ASTRA_MESSAGES_BRIDGED_JSON: Final = AZURE_GPT_6_ASTRA_INPUT_TEXT.model_copy(+ update={+ "name": "azure-gpt-6-astra-messages_bridged_json",+ "endpoint": "/v1/messages",+ "request": {+ "model": "$MODEL",+ "max_tokens": 412,+ "messages": [{"role": "user", "content": "azure chat native fixture"}],+ },+ }+)++AZURE_GPT_6_1_SOL_MESSAGES_BRIDGED_JSON: Final = AZURE_GPT_6_1_SOL_INPUT_TEXT.model_copy(+ update={+ "name": "azure-gpt-6.1-sol-messages_bridged_json",+ "endpoint": "/v1/messages",+ "request": {+ "model": "$MODEL",+ "max_tokens": 412,+ "messages": [{"role": "user", "content": "azure chat native fixture"}],+ },+ }+)+CASES: Final[tuple[CostTrackingTestCase, ...]] = (+ AZURE_GPT_6_SOL_MESSAGES_BRIDGED_JSON,+ AZURE_GPT_6_LUNA_MESSAGES_BRIDGED_JSON,+ AZURE_GPT_6_ASTRA_MESSAGES_BRIDGED_JSON,+ AZURE_GPT_6_1_SOL_MESSAGES_BRIDGED_JSON,AZURE_GPT_5_4_MINI_INPUT_TEXT,AZURE_GPT_5_4_MINI_CACHE_READ,AZURE_GPT_5_4_MINI_AUDIO_INPUT,@@ -5656,3 +5709,10 @@ PARITY: Final[tuple[StreamParityTestCase, ...]] = (StreamParityTestCase(plain=AZURE_GPT_6_ASTRA_INPUT_TEXT, streamed=AZURE_GPT_6_ASTRA_STREAM),StreamParityTestCase(plain=AZURE_GPT_6_1_SOL_INPUT_TEXT, streamed=AZURE_GPT_6_1_SOL_STREAM),)++BRIDGE_COST_PARITY: Final[tuple[BridgeCostParityTestCase, ...]] = (+ BridgeCostParityTestCase(native=AZURE_GPT_6_SOL_INPUT_TEXT, bridged=AZURE_GPT_6_SOL_MESSAGES_BRIDGED_JSON),+ BridgeCostParityTestCase(native=AZURE_GPT_6_LUNA_INPUT_TEXT, bridged=AZURE_GPT_6_LUNA_MESSAGES_BRIDGED_JSON),+ BridgeCostParityTestCase(native=AZURE_GPT_6_ASTRA_INPUT_TEXT, bridged=AZURE_GPT_6_ASTRA_MESSAGES_BRIDGED_JSON),+ BridgeCostParityTestCase(native=AZURE_GPT_6_1_SOL_INPUT_TEXT, bridged=AZURE_GPT_6_1_SOL_MESSAGES_BRIDGED_JSON),+)diff --git a/tests/integration/cost_calculation/catalog.py b/tests/integration/cost_calculation/catalog.pyindex 994a7e56c29..9f99d8fb2c1 100644--- a/tests/integration/cost_calculation/catalog.py+++ b/tests/integration/cost_calculation/catalog.py@@ -54,6 +54,7 @@ REALTIME_CASES: Final[tuple[RealtimeCostCase, ...]] = batch_realtime.REALTIME_CABRIDGE_COST_PARITY_CASES: Final[tuple[BridgeCostParityTestCase, ...]] = (*openai.BRIDGE_COST_PARITY,*bedrock_converse.BRIDGE_COST_PARITY,+ *azure.BRIDGE_COST_PARITY,)_PARITY_LEGS: Final = frozenset(leg.name for pair in PARITY_CASES for leg in (pair.plain, pair.streamed)) | frozenset(leg.name for pair in BRIDGE_COST_PARITY_CASES for leg in (pair.native, pair.bridged)