Title: Multiple providers return HTTP200 finish_reason=stop with empty content, usage=0, no exception thrown, downstream client trigger retries
Body:
Two failure patterns observed in production:
- Reasoning‑model case(MiniMax‑M2.7 / GLM‑5.1): valid output stored in
reasoning_content, message.content empty. Global toggle merge_reasoning_content_in_choices not respected by some adapters.
- Native empty response case(GLM‑5.1): both
content and reasoning_content are empty string, total_tokens=0, upstream provider returns complete 200 OK response.
In both patterns LiteLLM treats as successful completion, no error raised, router fallback & built‑in retry NOT triggered. Downstream openai‑compatible client receives malformed payload and triggers massive client‑side retries.
Expected:
- Enforce
merge_reasoning_content_in_choices across all adapters.
- Add configurable semantic validation hook: detect pattern (
content empty && finish_reason=stop && total_tokens=0), allow raising error to trigger retry/fallback, instead forward bad payload downstream.
Title: Multiple providers return HTTP200 finish_reason=stop with empty content, usage=0, no exception thrown, downstream client trigger retries
Body:
Two failure patterns observed in production:
reasoning_content,message.contentempty. Global togglemerge_reasoning_content_in_choicesnot respected by some adapters.contentandreasoning_contentare empty string, total_tokens=0, upstream provider returns complete 200 OK response.In both patterns LiteLLM treats as successful completion, no error raised, router fallback & built‑in retry NOT triggered. Downstream openai‑compatible client receives malformed payload and triggers massive client‑side retries.
Expected:
merge_reasoning_content_in_choicesacross all adapters.content empty && finish_reason=stop && total_tokens=0), allow raising error to trigger retry/fallback, instead forward bad payload downstream.