Apply suggestion from @greptile-apps[bot]

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
moe-berri 2026-09-05 09:30:42 -07:00 committed by GitHub
parent 955baf8a5c
commit 03da725ee4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -159,7 +159,7 @@ def _reasoning_judge_router(
if kwargs["metadata"].get(INTERNAL_CALL_ORIGIN_METADATA_KEY) == SHADOW_EVAL_ROUTER_CALL_ORIGIN:
kwargs["metadata"]["routing_decision"] = {"tier_label": "SIMPLE", "routed_model": "cheap-model"}
return {"choices": [{"message": {"content": "shadow answer"}}]}
budget_for_the_answer = kwargs["max_tokens"] - reasoning_tokens
budget_for_the_answer: Final = kwargs["max_tokens"] - reasoning_tokens
return {"choices": [{"message": {"content": verdict[: max(0, budget_for_the_answer)]}}]}
router.acompletion = MagicMock(side_effect=acompletion)