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(translation): recapture azure gpt-6-astra content_filters (#46691)
Kerry Lub5ef20e08483
diff --git a/tests/integration/translation/chat_completions/bases/azure.py b/tests/integration/translation/chat_completions/bases/azure.pyindex 96376beaefe..fc430b5682c 100644--- a/tests/integration/translation/chat_completions/bases/azure.py+++ b/tests/integration/translation/chat_completions/bases/azure.py@@ -751,19 +751,32 @@ GPT_6_1_SOL_TEST_CASE: Final = TranslationTestCase()GPT_6_ASTRA_CONTENT_FILTERS: Final[JsonValue] = [+ {+ "blocked": False,+ "source_type": "prompt",+ "content_filter_raw": [],+ "content_filter_results": {+ "hate": {"filtered": False, "severity": "safe"},+ "sexual": {"filtered": False, "severity": "safe"},+ "violence": {"filtered": False, "severity": "safe"},+ "self_harm": {"filtered": False, "severity": "safe"},+ "jailbreak": {"detected": False, "filtered": False},+ },+ "content_filter_offsets": {"start_offset": 0, "end_offset": 575, "check_offset": 0},+ },{"blocked": False,"source_type": "completion","content_filter_raw": [],"content_filter_results": {- "protected_material_text": {"detected": False, "filtered": False},"protected_material_code": {"detected": False, "filtered": False},+ "protected_material_text": {"detected": False, "filtered": False},"hate": {"filtered": False, "severity": "safe"},"sexual": {"filtered": False, "severity": "safe"},"violence": {"filtered": False, "severity": "safe"},"self_harm": {"filtered": False, "severity": "safe"},},- "content_filter_offsets": {"start_offset": 0, "end_offset": 459, "check_offset": 0},+ "content_filter_offsets": {"start_offset": 0, "end_offset": 511, "check_offset": 0},}]diff --git a/tests/integration/translation/messages/bases/azure.py b/tests/integration/translation/messages/bases/azure.pyindex 2cd98350622..b731f7b7760 100644--- a/tests/integration/translation/messages/bases/azure.py+++ b/tests/integration/translation/messages/bases/azure.py@@ -575,7 +575,21 @@ GPT_6_ASTRA_CONTENT_FILTERS: Final[JsonValue] = ["jailbreak": {"detected": False, "filtered": False},},"content_filter_offsets": {"start_offset": 0, "end_offset": 575, "check_offset": 0},- }+ },+ {+ "blocked": False,+ "source_type": "completion",+ "content_filter_raw": [],+ "content_filter_results": {+ "protected_material_code": {"detected": False, "filtered": False},+ "protected_material_text": {"detected": False, "filtered": False},+ "hate": {"filtered": False, "severity": "safe"},+ "sexual": {"filtered": False, "severity": "safe"},+ "violence": {"filtered": False, "severity": "safe"},+ "self_harm": {"filtered": False, "severity": "safe"},+ },+ "content_filter_offsets": {"start_offset": 0, "end_offset": 545, "check_offset": 0},+ },]GPT_6_ASTRA_TEST_CASE: Final = TranslationTestCase(diff --git a/tests/integration/translation/responses/bases/azure.py b/tests/integration/translation/responses/bases/azure.pyindex 8cc204ecacd..4237b8218d8 100644--- a/tests/integration/translation/responses/bases/azure.py+++ b/tests/integration/translation/responses/bases/azure.py@@ -1184,7 +1184,7 @@ GPT_6_ASTRA_CONTENT_FILTERS: Final[JsonValue] = ["violence": {"filtered": False, "severity": "safe"},"self_harm": {"filtered": False, "severity": "safe"},},- "content_filter_offsets": {"start_offset": 0, "end_offset": 567, "check_offset": 0},+ "content_filter_offsets": {"start_offset": 0, "end_offset": 507, "check_offset": 0},},]