Repository navigation
fix(llm): stop sending repetition penalties to cloud models - #4068
Conversation
Cloud reasoning models ran away in their thinking under GAIA's local anti-loop penalties: on fireworks.deepseek-v4p1-flash an 80-line list took 105-128 s and hit the length limit with 0-2 lines, versus 20 s and 80/80 lines without the penalties. The frequency/presence/repeat defaults now apply only to local models; a caller's explicit values still go through.
|
Verdict: Approve with suggestions — merge-ready; the two notes below are non-blocking. GAIA was applying its local anti-loop sampling penalties to cloud models as well, which made cloud reasoning models spiral in their thinking. This PR limits those defaults to local models only, leaves local behaviour byte-identical, and still honours a penalty a caller passes explicitly. The gate lives at the single place the defaults were injected, so there's no second path left to fix. Two things worth a follow-up, neither blocking:
The unchecked eval item in the test plan looks safe to close out: local models receive exactly the same four defaults as before, and the eval baseline runs locally, so there's no path for it to move. Real-world evidenceN/A — no evidence bundle was produced for this run, so my verdict rests on static review plus the tests in the diff. The PR description does carry author-run measurements on a real cloud model (105–128 s with 0–2 of 80 lines, versus ~20 s and 80/80 without the penalties); I'm relaying those as reported by the author, not as something reproduced here. The new unit tests do assert on the actual serialized request body for both the streaming and non-streaming paths, which is stronger than the usual "we called the method" mock and directly covers the contract that broke. 🔍 Technical detailsIssues Found🟢 Sibling test not updated — now exercises the cloud branch (
🟢 Detection is name-based for unknown providers (
Strengths
|
…odel The repeat-penalty override test was passing for the wrong reason: its bare mock backend made every model look like a cloud model, so the defaults block never ran and the test asserted an explicit value against nothing. It now pins a local model and checks a sibling default came through, so the test fails if the override ever stops overriding.
|
Refreshed this branch against current The update was a clean merge: nothing was resolved by hand, and no commit on this branch was rewritten. CI now runs against an up-to-date base. |
# Conflicts: # tests/unit/test_lemonade_cloud_models.py
GAIA sent its local anti-loop penalties to cloud models too, and they made cloud reasoning models think in circles. On the same 80-line prompt (
fireworks.deepseek-v4p1-flash, 2 runs each):On the TheRock coding benchmark this was the main reason GAIA was about 5× slower than Claude Code: half of its 2,916 s went to 15 runaway thinking bursts. Cloud models now get no penalties unless the caller sets them. Local models behave exactly as before, still with all four defaults. Temperature is unchanged.
Test plan
tests/test_lemonade_client.pyshows the same 7 failures and 15 errors with and without this change; they need a live Lemonade server.gaia eval agent --category tool_selectioncompared against the committed baseline