A reply that stops mid-sentence

Take your time, follow the code and check your understanding.

The codeLLM API basics
{
  "choices": [{
    "message": { "role": "assistant", "content": "The three main causes are first, the" },
    "finish_reason": "length"
  }]
}
Your answer4 min · no timer
What needs fixing?

Show solution and explanation

A finish_reason of "length" means the output hit the token limit. Raise max_tokens, shorten the prompt, or ask for a shorter answer.

The reply reached the max_tokens limit and was cut off.