mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-15 17:25:26 -04:00
Skills test: set explicit max_tokens=4096 instead of 0
max_tokens=0 made stream_agent_loop omit the param entirely, which on some OpenAI-compat upstreams (DeepSeek in the report) meant the model defaulted to a very short or zero-token completion — the user saw "the model returned an empty" even though normal chat with the same model worked (chat sends its preset's max_tokens). Match the chat default.
This commit is contained in:
@@ -691,8 +691,12 @@ async def _run_skill_test_once(md: str, task: str, url, model, headers, owner) -
|
||||
{"role": "user", "content": task},
|
||||
]
|
||||
try:
|
||||
# max_tokens explicitly set: passing 0 lets some upstreams (Ollama,
|
||||
# OpenAI-compat) generate an empty completion, which manifested as
|
||||
# the skill test returning nothing while chat (which carries its
|
||||
# preset's max_tokens) worked. 4096 matches the chat default.
|
||||
async for chunk in stream_agent_loop(url, model, messages, headers=headers,
|
||||
temperature=0.3, max_tokens=0, max_rounds=8, owner=owner):
|
||||
temperature=0.3, max_tokens=4096, max_rounds=8, owner=owner):
|
||||
if not chunk.startswith("data: ") or chunk.strip() == "data: [DONE]":
|
||||
continue
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user