Responses API: emit response.in_progress and built-in-tool event families
#7
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Scope cut from Step 2 (commit
957f704)The Responses projector emits a tight 8-event sequence:
response.created→response.output_item.added→response.content_part.added→response.output_text.delta× N →response.output_text.done→response.content_part.done→response.output_item.done→response.completedThat's enough for a Responses client to recover the assistant text. Out-of-scope today:
response.in_progress— OpenAI emits this betweenresponse.createdand the first content delta to signal "we're past prompt validation, model is generating". Some clients render a different spinner state based on it.response.web_search_call.*,response.code_interpreter_call.*,response.file_search_call.*,response.image_generation_call.*. These exist for OpenAI's hosted tools; neuron doesn't have any of those tools wired up, so the events would never fire — but the clients that look for them will today render an error or fall back to chat-completions semantics.See
crates/cortex-core/src/responses.rs::eventsfor the constants module, andcrates/neuron/src/wire/openai_responses.rs::emit_start_frames/emit_finish_framesfor the emission sites.Why it was cut
Most of these events carry no information the consumer doesn't already get from the surrounding events.
in_progressis a marker, not a payload; the built-in-tool families are no-ops without the underlying tools. The minimum useful set was what mattered for Stage 6 of helexa-acp to start exercising the route.What implementation looks like
response.in_progresspub const IN_PROGRESS: &str = "response.in_progress";tocortex_core::responses::events.response.createdand the first output_item event inemit_start_frames. Payload mirrorsresponse.created— the shell withstatus: "in_progress".full_stream_emits_expected_event_sequenceto assert it's present.That one is trivial. The next two depend on tool wiring that doesn't exist:
Hosted-tool families
Don't emit anything until we have the tools themselves. When we do (e.g. a
web_searchtool that proxies to an external search engine):InferenceEventwithToolInvocation { tool_id, name, status, … }variants.TextDeltas.ToolInvocationevents to the appropriateresponse.<tool>_call.*family.This is the natural extension once tool wiring lands. No work to do until then.
Acceptance
response.in_progresslands cleanly with a test.Tracking
Cosmetic for in_progress (some clients are fussier than others). Hosted-tool families are blocked on actually having hosted tools; not relevant for neuron's current scope.