Skip to content

This "RootModel" key is non-standard and will cause any real OpenAI-compatible client to fail. #971

@markstur

Description

@markstur

This "RootModel" key is non-standard and will cause any real OpenAI-compatible client to fail.

The standard OpenAI tool format sends parameters as a bare JSON Schema object:

"parameters": {
    "type": "object",
    "properties": { ... },
    "required": [...]
}

This server requires the non-standard {"parameters": {"RootModel": {...}}} envelope because FunctionParameters in cli/serve/models.py defines RootModel as a literal field name rather than accepting the schema directly. Any client using the OpenAI SDK, LangChain, or the standard tool format will get a Pydantic validation error.

This is a pre-existing issue in models.py, but this PR introduces the first public examples that document and normalise the non-standard shape. Worth opening a tracked issue to fix FunctionParameters to accept a bare dict[str, Any] before these examples become the established pattern.

Originally posted by @planetf1 in #850 (comment)

Metadata

Metadata

Assignees

No one assigned

    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