2.2 KiB
Responses contract status
The Rust control plane has a POST /v1/responses route and a reusable response trace builder. The route parses a subset of Responses requests and returns OpenAI-shaped JSON errors. It returns 503 worker_not_ready until the engine handshake completes, then 501 inference_adapter_missing. It does not generate a response yet.
The offline trace builder accepts text fragments, function-call argument fragments, and token usage. It assembles a non-streaming response or an ordered SSE stream ending in response.completed. Tool arguments must form a JSON object. text.format supports text, json_object, and json_schema validation in the offline builder. External schema references are rejected. The synthetic fixture at benchmarks/fixtures/responses/structured-tool.json demonstrates text plus a tool call; it is not evidence of live Codex compatibility.
control-plane/src/wire.rs encodes the upstream GEN request line and parses the current T, PP, DONE, and ERR output lines. The supervisor can accept an internal token-ID generation command, check its context budget, send it to a resident worker, and collect output through DONE. This path is tested with a fake worker. The HTTP route is not connected to it because native tokenization and prompt assembly are still pending. The current internal command collects a whole result; cancellation and incremental HTTP streaming remain to be implemented.
Current request parsing supports model, string or array input, stream, instructions, max_output_tokens, previous_response_id, parallel_tool_calls, reasoning, text, named function tools, tool_choice, temperature, top_p, truncation, metadata, and store: false. Unknown fields and store: true are rejected. Parsing support does not imply execution support. The body limit is 16 MiB.
Before live serving, connect tokenization, prompt assembly, generation and cancellation to the resident Strata --serve protocol; map engine stop conditions and tool calls; return live SSE incrementally with backpressure; and compare sanitized real Codex replays against the upstream Python server. Do not mark Gate A complete based on this synthetic fixture.