plandex-ai/plandex · error

model stopped with error status | The model is not respondin

Error message

model stopped with error status | The model is not responding.

What it means

The provider sent a chunk whose first choice has FinishReason == "error", signaling the model stopped abnormally server-side. The library converts this into a hard error attached to the partial result. It is the in-band error signal as opposed to transport errors.

Source

Thrown at app/server/model/client_stream.go:193

				// Previously we'd return an error if there were no choices, but some models do this and then keep streaming, so we'll just log it and continue
				log.Println("processChatCompletionStream - no choices in response")
				// err := fmt.Errorf("no choices in response")
				// return accumulator.Result(false, err), err
				emptyChoices = true
			}

			// We'll be more accepting of multiple choices and just take the first one
			// if len(response.Choices) > 1 {
			// 	err = fmt.Errorf("stream finished with more than one choice | The model failed to generate a valid response.")
			// 	return accumulator.Result(true, err), err
			// }

			if !emptyChoices {
				choice := response.Choices[0]

				if choice.FinishReason != "" {
					if choice.FinishReason == "error" {
						err = fmt.Errorf("model stopped with error status | The model is not responding.")
						return accumulator.Result(true, err), err
					} else {
						// Reset the timer for the usage chunk
						if !timer.Stop() {
							<-timer.C
						}
						timer.Reset(USAGE_CHUNK_TIMEOUT)
						streamFinished = true
						continue
					}
				}

				if req.Tools != nil {
					if choice.Delta.ToolCalls != nil {
						toolCall := choice.Delta.ToolCalls[0]
						content = toolCall.Function.Arguments
					}
				} else {

View on GitHub (pinned to e2d772072e)

Solutions

  1. Retry the request, ideally on a different model or provider fallback
  2. Check provider status page for ongoing incidents
  3. Inspect proxy (LiteLLM) logs to see the original upstream error mapped to finish_reason=error
  4. Reduce request complexity (shorter prompt) if it consistently triggers the abort
  5. Configure model fallbacks in modelConfig so the router picks a healthy model

Example fix

// before: single model, hard failure
res, err := call(model)
// after: fallback model on error finish reason
res, err := call(model)
if err != nil && strings.Contains(err.Error(), "stopped with error status") {
    res, err = call(fallbackModel)
}
Defensive patterns

Strategy: fallback

Type guard

func isModelErrorFinish(err error) bool { return err != nil && strings.Contains(err.Error(), "stopped with error status") }

Try / catch

result, err := call(primary)
if isModelErrorFinish(err) {
    result, err = call(fallback)
}

Prevention

When it happens

Trigger: A received response chunk has response.Choices[0].FinishReason exactly equal to "error" (non-empty choices), e.g. provider-side model crash, content policy abort, or upstream failure relayed by a proxy.

Common situations: Provider incidents/outages; requests routed to an unhealthy model replica; LiteLLM mapping an upstream failure into a synthetic 'error' finish reason; content filter terminating generation.

Related errors


AI-assisted analysis of plandex-ai/plandex@e2d772072e (2026-09-05). Data as JSON: /api/errors/bac818f7f1796160. Report an issue: GitHub.