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: prepare reference input before tracing path-sourced peak
yuneng8554d1f8275d
diff --git a/tests/unit/llms/vertex_ai/files/test_vertex_ai_files_streaming.py b/tests/unit/llms/vertex_ai/files/test_vertex_ai_files_streaming.pyindex a824a1b75d9..29eaf38b427 100644--- a/tests/unit/llms/vertex_ai/files/test_vertex_ai_files_streaming.py+++ b/tests/unit/llms/vertex_ai/files/test_vertex_ai_files_streaming.py@@ -347,8 +347,9 @@ class TestPathSourcedStreaming:def test_path_source_peak_stays_below_list_pipeline(self, tmp_path):cfg = VertexAIFilesConfig()- path, _ = self._write_jsonl(tmp_path, 8000)+ path, raw = self._write_jsonl(tmp_path, 8000)data = self._batch_request(path)+ content_str = raw.decode("utf-8")def drain_stream():cfg.get_complete_file_url(@@ -366,9 +367,7 @@ class TestPathSourcedStreaming:passstreaming_peak = _measure_peak(drain_stream)- list_peak = _measure_peak(- lambda: _reference_vertex_jsonl_string(cfg, path.read_bytes().decode("utf-8"))- )+ list_peak = _measure_peak(lambda: _reference_vertex_jsonl_string(cfg, content_str))assert streaming_peak < list_peak * 0.3, (f"path-sourced streaming peak {streaming_peak} not a clear win over list pipeline "