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(together_ai): annotate preserved-thinking test helper and capture list
mateo-berri8a61b286d1c2
diff --git a/tests/test_litellm/llms/together_ai/chat/test_together_ai_chat_transformation.py b/tests/test_litellm/llms/together_ai/chat/test_together_ai_chat_transformation.pyindex 110d93cbc0d..f6d4b73f27a 100644--- a/tests/test_litellm/llms/together_ai/chat/test_together_ai_chat_transformation.py+++ b/tests/test_litellm/llms/together_ai/chat/test_together_ai_chat_transformation.py@@ -1,5 +1,6 @@import jsonimport logging+from collections.abc import Mapping, Sequencefrom unittest.mock import MagicMockimport httpx@@ -283,7 +284,7 @@ PRESERVED_THINKING_MESSAGES = []-def _assert_internal_fields_stripped_reasoning_kept(transformed_messages: list):+def _assert_internal_fields_stripped_reasoning_kept(transformed_messages: Sequence[Mapping[str, object]]):assistant_message = transformed_messages[1]assert assistant_message["reasoning_content"] == REPLAYED_ASSISTANT_MESSAGE["reasoning_content"]assert "thinking_blocks" not in assistant_message@@ -320,7 +321,7 @@ async def test_async_transform_request_keeps_reasoning_content_strips_internal_fdef test_completion_sends_chat_template_kwargs_and_preserved_reasoning():from litellm.llms.custom_httpx.http_handler import HTTPHandler- captured_requests = []+ captured_requests: list[httpx.Request] = []def respond(request: httpx.Request) -> httpx.Response:captured_requests.append(request)