You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(selfhost): force JSON mode on OpenAI-compatible review calls and stop retrying deterministic-identical outputs (#8790) (#8794)
Confirmed live 2026-07-26 (the back-to-back inconclusive-review incident):
the ollama fallback answered the review prompt with the same 2,814-char
markdown prose on all 3 attempts — hasJsonObject:false every time — so any
primary-model bail became a guaranteed "no usable verdict" manual hold, and
the retry budget was pure waste (reviews run at temperature 0; identical
input yields identical output).
- AiRunOptions gains responseFormat: "json_object"; createOpenAiCompatibleAi
forwards it as OpenAI's response_format (Ollama/vLLM honor it), with a
single 400-fallback retry stripping the parameter for older servers that
reject it (degrade to ask-nicely, never fail the call). Non-400 failures
and 400s without the declared contract throw exactly as before.
- runWorkersOpinion declares the JSON contract on every review call (other
providers ignore the field; the subscription CLIs already comply via the
prompt) and stops a model's retries when an attempt returns byte-identical
output to the previous one — the same stop-retrying-this-model reasoning
as the deliberate-bail/timeout/429 breaks. The next model keeps its full
budget. New diagnostic status: identical_retry_skipped.
Co-authored-by: loopover-orb[bot] <296761690+loopover-orb[bot]@users.noreply.github.com>
it("attributes usage.provider from its own configured providerName (#ai-usage-provider-attribution) since an HTTP chat-completions response never reports one itself",async()=>{
0 commit comments