Skip to content

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

Closed

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

Activity

  1. github-actions commented on Feb 15, 2026

    @github-actions
    Contributor

    This issue appears to be closely related to several existing issues addressing the same root cause - missing 'required' field in tool schemas and invalid Zod meta fields:

    All of these stem from the same problem in the schema transformation layer where object-based schemas don't include an explicit 'required' field and Zod's `` metadata isn't being stripped. Consider consolidating these issues or using one as the canonical issue for the fix across all providers.

  2. github-actions commented on Apr 17, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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