Skip to content
1 min read · 108 words

@nhtio/adk/batteries/generation/openai/validation

Runtime validation schema and wrapper for OpenAI media generation adapter options.

Remarks

Validates OpenAIGenerationAdapterOptions at construction time. Throws E_INVALID_OPENAI_GENERATION_OPTIONS on failure — the same hard-fail policy as every other ADK contract. model is required; unknown top-level keys are rejected so typos fail loud.

Variables

VariableDescription
openAIGenerationOptionsSchemaValidator schema for OpenAIGenerationAdapterOptions. Rejects unknown top-level keys.

Functions

FunctionDescription
validateOptionsValidates an arbitrary input against openAIGenerationOptionsSchema and returns the resolved options shape. Throws E_INVALID_OPENAI_GENERATION_OPTIONS (carrying the validator's report on cause) on failure.