Agent Application DevelopmentAccount
Knowledge catalogChoose core direction and segmented content
Practice 63FundamentalsConceptsAbout 12 minutes

Corresponding knowledge: Model-response lifecycle and completion semantics

Does text or a tool request mean the model has finished? How should a disconnected stream be classified?

Judge the end of transfer, model termination, output type and tool results separately to know which fragments can be previewed and which states can be delivered.

Model interfaceResponse life cycleStreaming outputtool requestreject and truncate

Knowledge content check2026-10-03 · Check the source of the original question2026-10-03

Knowledge unit directory

LEARN · PRACTICE · REFLECT

Knowledge exercises·Independent answers

My notes and review ↗

Principles and Solutions have been collapsed. Explain the core mechanism, boundaries and verification methods in your own words, and then compare them.

Answers and personal notes

Each modified commit will be kept as an independent history. Your level of mastery is up to you to evaluate yourself against the standards.

Explain in your own words first

The core principles, analysis, Q&A and migration cases have been closed. When you are ready, unfold it and compare it with the content to find any omissions.

Hands-on verificationComplete on demand · Suggestions20 minutes

Without calling the real model, use paper or local tables to interpret five teaching tracks: A. response.completed after text increment, including normal text; B. response.completed after complete function_call, the client tool has not yet been executed; C. response.completed, the message content is refusal; D. response.incomplete and the reason is max_output_tokens; E. tool response.function_call_arguments.done, response.output_item.done Then the connection was disconnected and the entire response was not terminated. For each entry, fill in the transmission evidence, whether the final state of the model is known, the content type, the allowed next step, and the status description for the user. Then change E to "The read-only tool has been started after the complete item" and re-judge the two statuses.

Expand acceptance requirements and checkpoints
  • A can mark the completion of the generation and enter content acceptance, but does not regard the completion mark as a correct proof of fact; B marks that the tool results are pending, but cannot mark that the business is completed.
  • C recognition is rejected, and D recognition is known to be incomplete. Incomplete parameters will not be executed and normal JSON will not be forged.
  • E It is clear that the tool item is closed and the response final state is unknown at the same time, not only the disconnection assertion canceled/failed.
  • The variant of E records the unknown model response and the tool's own results respectively; the status of the started tool is not erased because the flow is interrupted.
  • Explain which judgments are teaching strategies for this question and which ones come from the specified interface; add a comparison of Claude message_stop and pause_turn to indicate that the server tool round still needs to be continued.

Key inspections

  • The transmission status, model termination status, output content type, and tool business results can be expressed separately.
  • Recognize complete text, tool requests, rejections, known incompleteness, and unknown disconnections without using text length or HTTP 200 as a substitute.
  • Distinguish between increment, content block completion and entire response termination; only complete tool parameters can enter the execution process.
  • Keep the original fields and calling identities of the interface, and explain the differences between Responses and Messages.
  • Generation termination neither guarantees factual correctness nor proves that a tool's business operation completed.