Merge PR #2608: fix: give lesson preparation and grading room for reasoning models

This commit is contained in:
Bingxi Zhao (Frank)
2026-11-14 22:58:03 +08:00
3 changed files with 4 additions and 4 deletions

View File

@@ -537,7 +537,7 @@ async def _ask(
{"role": "system", "content": instruction},
{"role": "user", "content": content},
],
max_tokens=1800,
max_tokens=8192,
allow_image_fallback=False,
)
except LessonUnavailable:

View File

@@ -157,7 +157,7 @@ async def _request(config, instruction, payload, sources=None, native_images=Non
# Do not impose a shorter assessment timeout on a reasoning provider.
return await _complete_json(
config or get_llm_config(),
max_tokens=2200,
max_tokens=8192,
messages=messages,
allow_image_fallback=False,
)

View File

@@ -75,7 +75,7 @@ def test_ask_retries_once_with_reasoning_turned_down(monkeypatch):
async def complete(**kwargs):
efforts.append(kwargs["config"].reasoning_effort)
assert kwargs["max_tokens"] == 1800
assert kwargs["max_tokens"] == 8192
# The first reply spent its budget thinking and returned no answer.
return "<think>Considering the objective" if len(efforts) == 1 else '{"queries": ["a"]}'
@@ -126,7 +126,7 @@ def test_assessment_requests_share_the_parser_and_retry(monkeypatch):
async def complete(**kwargs):
efforts.append(kwargs["config"].reasoning_effort)
assert kwargs["max_tokens"] == 2200
assert kwargs["max_tokens"] == 8192
if len(efforts) == 1:
return ""
return 'Verdicts follow.\n```json\n{"verdicts": []}\n```'