ChatGPT Responses API Guide: Tracing Tools and Output Quality
Answer in brief
A production-minded ChatGPT Responses API guide for tracing semantic events, correlating tool calls by call_id, validating structured output, retrying safely, and preserving operator evidence.
Key facts at a glance
| Product / model | Current ID or version | Use case | Evidence |
|---|---|---|---|
| OpenAI GPT-5.6 Sol | gpt-5.6-sol |
complex reasoning and coding | Official source |
| OpenAI GPT-5.6 Luna | gpt-5.6-luna |
cost-sensitive, high-volume workloads | Official source |
Failure modes and verification
| Failure mode | Verification action |
|---|---|
| Stale model or version reference | Compare the model name and ID with the official source before release. |
| Unstructured or incomplete output | Validate the response against the documented contract and a deterministic fixture. |
| Unverified factual claim | Keep the claim qualified or remove the claim when the official source does not support it. |
FAQ
What should an operator trace in a streamed Responses API run?
Record the event type, arrival time, trace context, tool identifiers, validation outcome, final status, and retry decision. The Responses API streaming guide documents typed semantic events such as response.created, response.output_text.delta, response.completed, and error: Streaming API responses.
How should a function call be correlated with its tool result?
Read call_id from the function_call output item and send a function_call_output item with the same call_id. Do not rely on array position or tool name alone. See the official Function calling guide.
How should output validation handle refusal and incomplete responses?
Use Structured Outputs and a schema, then inspect response.status, response.incomplete_details.reason, and refusal content before publication. Publish only a completed, non-refusal, schema-valid result. See Structured model outputs.
When should a Responses API request be retried?
Retry only classified transient failures, using a brief wait, exponential backoff or header-aware logic, and honoring Retry-After when present. The official error guide does not specify one universal maximum retry count: Error codes.
Which model records are verified for this guide?
The supplied verified records are OpenAI / GPT-5.6 Sol / gpt-5.6-sol / complex reasoning and coding, and OpenAI / GPT-5.6 Luna / gpt-5.6-luna / cost-sensitive, high-volume workloads. The source for both records is the official model documentation.
Sources and freshness
- Official source
- Last verified: 2026-08-22
Extended guide
The reliable pattern is to treat each streamed Responses API run as an evidence chain: record semantic event types, correlate every function_call with its function_call_output through call_id, publish output only after completion and validation, and retry only transient failures with duplicate-safe execution. The official source does not specify a required operator-evidence schema, retention period, or universal retry count.
Scope and verified models
Product identifier: chatgpt. Verification date: 2026-08-20. The official model page states that OpenAI models are available through the Responses API and Client SDKs. The current reference data is:
| provider | name | id | role | source |
|---|---|---|---|---|
| OpenAI | GPT-5.6 Sol | gpt-5.6-sol | complex reasoning and coding | https://developers.openai.com/api/docs/models |
| OpenAI | GPT-5.6 Luna | gpt-5.6-luna | cost-sensitive, high-volume workloads | https://developers.openai.com/api/docs/models |
Use the official model documentation for model identity and availability. The model page does not specify an operator trace format, a retry budget, or a quality score.
Numbered implementation steps
-
Establish trace context. Set
stream=truewhen incremental processing is needed. The Responses API uses typed semantic events. The Streaming API responses guide documents event families such asresponse.created,response.in_progress,response.output_item.added,response.output_text.delta,response.function_call_arguments.delta,response.function_call_arguments.done,response.output_item.done,response.completed, anderror. Store each receivedtype, arrival time, and internal trace context.run_id,span_id, sequence counters, and redaction rules are application fields; the official source does not prescribe those fields. -
Correlate tool calls. A
function_calloutput item containscall_id,name, and JSON-encodedarguments. Parse and validate arguments before executing an approved tool. Append afunction_call_outputitem with the samecall_id; never correlate by array position or tool name alone. Multiple calls can appear in one turn. Setparallel_tool_callstofalsewhen deterministic zero-or-one-call behavior is required. Setstricttotruefor compatible schemas. The Function calling guide recommends strict mode and requiresadditionalPropertiesto befalseand every property to berequired; optional semantics can usenull. -
Validate before release. Use Structured Outputs with a schema, then inspect
response.statusand the parsed object. A refusal may not follow the supplied schema. An incomplete response can result from a token limit or content filter, so inspectresponse.incomplete_details.reason. Publish only a completed, non-refusal, schema-valid result. The Structured model outputs guide does not promise business correctness; add domain checks for ranges, authorization, freshness, and tool-result consistency. -
Retry deliberately. Classify failures before retrying. The Error codes guide recommends a brief wait for transient server errors, exponential backoff or header-aware logic, and honoring
Retry-Afterwhen present. The official source does not specify one maximum retry count. Do not retry invalid authentication, permission, or schema errors unchanged. After a broken stream or timeout, verify whether a side-effecting tool already ran. An internal execution key derived from trace context andcall_idcan prevent duplicate side effects; the execution key is an application control, not a documented API field. -
Preserve operator evidence. Keep a redacted ledger containing the model ID, response identifier when returned, event
type,call_id, tool name, argument and result hashes, validator result, final status, retry reason, and operator action. Store raw payloads only under the applicable privacy and retention policy. Evidence should answer which event requested a tool, which result satisfied the call, whether validation passed, and why publication or retry occurred.
Evidence checklist
- Every event records
type, time, and trace context. - Every
function_call_outputmatches exactly onecall_id. - Arguments and final output pass schema and domain validation.
- Refusal, incomplete, and
errorpaths are explicit. - Retry decisions honor
Retry-Afterand duplicate-safe execution. - Logs are redacted and sufficient for operator review.
For model identity and the supplied model records, consult the official model documentation. For event definitions, tool correlation, structured validation, and retry behavior, consult the linked OpenAI guides above.
Evidence refresh
The model and feature records below are rechecked against the linked official sources. If availability changes, update this table and the verification date together.
| Product / model | Current ID or version | Use / caution | Evidence |
|---|---|---|---|
| OpenAI GPT-5.6 Sol | gpt-5.6-sol |
complex reasoning and coding | Official source |
| OpenAI GPT-5.6 Luna | gpt-5.6-luna |
cost-sensitive, high-volume workloads | Official source |
Sources
- Official source
- Official source
- Official source
- Official source
- Official source
- Last verified: 2026-08-22
Evidence and freshness
Last verified:
Primary sources
- developers.openai.com
- developers.openai.com
- developers.openai.com
- developers.openai.com
- developers.openai.com
Verified model records
- OpenAI · GPT-5.6 Sol · gpt-5.6-sol — complex reasoning and coding
- OpenAI · GPT-5.6 Luna · gpt-5.6-luna — cost-sensitive, high-volume workloads