@nhtio/adk/batteries/llm/openai_responses/validation
Runtime validation schema and wrapper for OpenAI Responses adapter options.
Remarks
Schema and call-site wrapper for validating OpenAIResponsesAdapterOptions. Used at construction time and at the start of every iteration against the merged options shape (stash > executor > constructor). Throws E_INVALID_OPENAI_RESPONSES_OPTIONS on failure — same hard-fail policy as every other ADK contract.
Notable divergences from the sibling openai_chat_completions/anthropic_messages schemas:
- NO
instructionskey and NOstorekey at all — both are exclusively adapter-owned (see the battery's design notes)..unknown(false)rejects them the same way it rejectsprevious_response_id/conversation/prompt/context_management— ADK owns history and the system prompt on every battery; this one simply has no escape hatch for either. max_output_tokenscarries.min(16)— an undocumented API minimum (400 Invalid 'max_output_tokens'... Expected a value >= 16) enforced at config time instead of dispatch time.backgroundonly acceptsfalse/undefined —trueis rejected, since this adapter has no polling/resumption logic for a queued/in_progress background response (see the option's own doc comment in types.ts).
Variables
| Variable | Description |
|---|---|
| openAIResponsesOptionsSchema | Validator schema for OpenAIResponsesAdapterOptions. |
Functions
| Function | Description |
|---|---|
| validateOptions | Validates an arbitrary input against openAIResponsesOptionsSchema and returns the resolved options shape. Throws E_INVALID_OPENAI_RESPONSES_OPTIONS (carrying the validator's error report on cause) on failure. |