# `Sycophant.WireProtocol.OpenAIResponses`

Wire protocol adapter for the OpenAI Responses API format.

Encodes Sycophant Request structs into the `POST /v1/responses`
JSON format and decodes responses back into Response structs.
Uses items instead of messages, flat tool definitions, and
extracts system messages into the `instructions` field.

# `t`

```elixir
@type t() :: %{
  optional(:stop) =&gt; [binary()],
  optional(:include) =&gt; [binary()],
  optional(:cache_key) =&gt; binary(),
  optional(:store) =&gt; boolean(),
  optional(:metadata) =&gt; any(),
  optional(:max_tokens) =&gt; integer(),
  optional(:temperature) =&gt; float(),
  optional(:top_p) =&gt; float(),
  optional(:top_k) =&gt; integer(),
  optional(:reasoning_effort) =&gt;
    :none | :minimal | :low | :medium | :high | :xhigh,
  optional(:reasoning_budget) =&gt; integer(),
  optional(:reasoning_summary) =&gt; :auto | :concise | :detailed | :none,
  optional(:service_tier) =&gt; binary(),
  optional(:tool_choice) =&gt; any(),
  optional(:parallel_tool_calls) =&gt; boolean(),
  optional(:top_logprobs) =&gt; integer(),
  optional(:cache_retention) =&gt; binary(),
  optional(:safety_identifier) =&gt; binary(),
  optional(:truncation) =&gt; :auto | :disabled,
  optional(:max_tool_calls) =&gt; integer(),
  optional(:stream_options) =&gt; any(),
  optional(:context_management) =&gt; any(),
  optional(:verbosity) =&gt; :low | :medium | :high,
  optional(:previous_response_id) =&gt; binary()
}
```

# `param_schema`

Options:

* `:stop` (list of `t:String.t/0`) - Stop sequences

* `:include` (list of `t:String.t/0`) - Additional output data to include in the response

* `:cache_key` (`t:String.t/0`) - Cache key for prompt caching

* `:store` (`t:boolean/0`) - Whether to store the response for later retrieval

* `:metadata` (`t:term/0`) - Key-value metadata to attach to the response

* `:max_tokens` (`t:integer/0`) - Maximum number of tokens to generate

* `:temperature` (`t:float/0`) - Sampling temperature

* `:top_p` (`t:float/0`) - Nucleus sampling threshold

* `:top_k` (`t:integer/0`) - Top-K sampling

* `:reasoning_effort` (`:none` | `:minimal` | `:low` | `:medium` | `:high` | `:xhigh`) - Extended thinking effort level

* `:reasoning_budget` (`t:integer/0`) - Explicit reasoning token budget

* `:reasoning_summary` (`:auto` | `:concise` | `:detailed` | `:none`) - How to summarize reasoning

* `:service_tier` (`t:String.t/0`) - Service tier selection

* `:tool_choice` (`t:term/0`) - Tool selection strategy

* `:parallel_tool_calls` (`t:boolean/0`) - Allow parallel tool calls

* `:top_logprobs` (`t:integer/0`) - Number of most likely tokens to return per position

* `:cache_retention` (`"in-memory"` | `"24h"`) - Cache retention policy

* `:safety_identifier` (`t:String.t/0`) - Safety identifier for content filtering

* `:truncation` (`:auto` | `:disabled`) - Context window overflow handling

* `:max_tool_calls` (`t:integer/0`) - Maximum number of tool calls per response

* `:stream_options` (`t:term/0`) - Options for streaming responses

* `:context_management` (`t:term/0`) - Context management configuration

* `:verbosity` (`:low` | `:medium` | `:high`) - Response verbosity level

* `:previous_response_id` (`t:String.t/0`) - ID of a previous response to chain from

---

*Consult [api-reference.md](api-reference.md) for complete listing*
