Skip to content

Tool schemas cause 400 errors on strict validators (Codex, Vertex AI) #13737

@sametakofficial

Description

@sametakofficial

Built-in tool schemas (like question) break on providers with strict JSON Schema validation — Codex, Vertex AI OpenAI-compatible, SGLang, etc.

The question tool has two problems:

  • additionalProperties: false is set but multiple isn't in required, which strict validators reject
  • Zod .meta() injects $schema and ref keywords that aren't valid in OpenAI function parameter schemas

Error from Codex:

Invalid schema for function 'question': In context=('properties', 'questions',
'items'), 'required' is required to be supplied and to be an array including
every key in properties. Missing 'multiple'.

Related: #11413, #8184

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions