Refinement always fails with 400 on models that can't disable thinking #2081
Closed
pcarielo
started this conversation in
Bug reports
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hey! Hit a refinement bug on 0.9.3 and want to report it the right way this time (I opened issue #2080 first, then read CONTRIBUTING, so feel free to close that one, this is the real intake).
What happens:
Every refinement fails with my current model because the refinement call forces non-reasoning mode and the model can't disable thinking.
Where it comes from:
In
dist/core/refinement/refinement.js,planRefinementandreviewAutoRefineboth discard the sessionthinkingLevelon purpose (void thinkingLevel;) and callcompleteSimplewithout reasoning. The comment explains it keeps the output budget for the JSON object, which makes sense, but it hard fails with models that always think.Impact:
All refinement paths break with these models:
refine.run(),/refine, and the auto refine review. So harness refinement is basically unusable there.Suggested fix:
Instead of forcing reasoning off, pass the lowest supported thinking level for the model (
THINKING_LEVELSis already around) or catch the 400 and retry with reasoning enabled. Either way keeps the JSON goal without hard failing on always-thinking models.Happy to test a fix or provide more details. Thanks!
All reactions