Auto-stream threshold 8192→100000 (streaming strips all thinking params on GLM gateway; non-streaming works for 32k); EVALHARNESS_NO_AUTOSTREAM=1 to disable entirely
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
f5aaddb870
commit
ed675e790f
@ -205,7 +205,8 @@ class OpenAICompatible(ModelAdapter):
|
|||||||
if stream:
|
if stream:
|
||||||
out = await self._post_stream_perf(
|
out = await self._post_stream_perf(
|
||||||
f'{self.api_base}/chat/completions', payload, headers, t0)
|
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).
|
# long generation: stream and aggregate (gateway-safe).
|
||||||
# Some gateways drop chat_template_kwargs on the STREAM
|
# Some gateways drop chat_template_kwargs on the STREAM
|
||||||
# path only (non-stream honors it) -- append the /no_think
|
# path only (non-stream honors it) -- append the /no_think
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user