In this article
Reasoning continuation data can be protocol state; preserve its returned structure and order rather than treating every field as editable display text.
A model response can include reasoning-related material as well as user-facing text and tool requests. OpenRouter documents how to preserve that material when continuing supported workflows. The important client-design question is not how to paraphrase an internal explanation, but how to return the protocol state that the next request requires.
Keep Responses output items intact
For Responses, the documentation instructs clients to return previous output items in their original order and append the corresponding function-call outputs. Reasoning item fields such as signatures or encrypted content remain unchanged. In a hypothetical lookup workflow, the application executes the requested lookup and adds its result without rewriting earlier protocol items. A human-readable summary is not a replacement for those returned objects.
Preserve Chat Completions reasoning structures
Chat Completions supports reasoning fields on assistant messages, including the reasoning_details array for structured forms. The documentation says consecutive reasoning blocks must not be rearranged or modified. Use the full structure when a model returns summarized or encrypted forms. Flattening the array into a string can discard information needed for continuation even if the visible text appears to say the same thing.
Separate continuation from display
A product may display only the final answer or a permitted summary. That projection should be separate from the object used for the next API call. The lookup result belongs to its correlation identifier, while reasoning data belongs to the returned sequence. Keeping these relationships explicit prevents a display cleanup operation from silently breaking a tool conversation that depends on the original output order.
Do not invent hidden reasoning content
Encrypted or opaque content should remain opaque to the application. Do not claim that it exposes the model’s full private reasoning or fabricate an explanation for what it contains. The client can document its role in preserving continuation without interpreting the payload. For the hypothetical lookup, the observable evidence remains the proposed call, actual tool result and final answer, not an invented narrative about inaccessible internal computation.
Test a complete tool continuation
Use a harmless lookup fixture and preserve the first response exactly before returning the tool output. Confirm that the second request follows the chosen API family and produces a coherent final result. Also test the client’s history transformation so signatures, arrays and ordering survive serialization. This verifies the integration’s state handling without making unsupported claims that all models expose identical reasoning content or accept every reasoning-control option.
Documentation and further study
Related engineering guides: Tool calling through OpenRouter: the model proposes, your app executes; OpenRouter usage: reconciling tokens and request cost.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.