API basics · Question 10 of 12
The code only reads the answer text and ignores the stop reason delivered with it (e.g. "stop_reason" / "finish_reason"). What problem can this cause?
1 answer is correct. Medium Created with AI
Show answer
Answer
- B Truncated answers or tool requests are wrongly treated as finished
Explanation
The stop reason says why the model stopped: finished normally, length limit reached, tool requested or refused. Ignoring it means showing half sentences or forgetting to run a tool.