From ed675e790f12e6d5166f9ab1f4a7ae86928a971d Mon Sep 17 00:00:00 2001 From: sora <2075279110@qq.com> Date: Fri, 11 Sep 2026 09:50:03 +0000 Subject: [PATCH] =?UTF-8?q?Auto-stream=20threshold=208192=E2=86=92100000?= =?UTF-8?q?=20(streaming=20strips=20all=20thinking=20params=20on=20GLM=20g?= =?UTF-8?q?ateway;=20non-streaming=20works=20for=2032k);=20EVALHARNESS=5FN?= =?UTF-8?q?O=5FAUTOSTREAM=3D1=20to=20disable=20entirely?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude --- evalharness/model/adapter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/evalharness/model/adapter.py b/evalharness/model/adapter.py index feebd20..44cbc75 100644 --- a/evalharness/model/adapter.py +++ b/evalharness/model/adapter.py @@ -205,7 +205,8 @@ class OpenAICompatible(ModelAdapter): if stream: out = await self._post_stream_perf( f'{self.api_base}/chat/completions', payload, headers, t0) - elif int(payload.get('max_tokens') or 0) > 8192: + elif int(payload.get('max_tokens') or 0) > 100000 \ + and not os.environ.get('EVALHARNESS_NO_AUTOSTREAM'): # long generation: stream and aggregate (gateway-safe). # Some gateways drop chat_template_kwargs on the STREAM # path only (non-stream honors it) -- append the /no_think