Skip to content

Add empty properties to GetIndexInfoRequest schema for OpenAI compatibility#96

Open
mcthesw wants to merge 1 commit intobartolli:mainfrom
mcthesw:fix/openai-schema-missing-properties
Open

Add empty properties to GetIndexInfoRequest schema for OpenAI compatibility#96
mcthesw wants to merge 1 commit intobartolli:mainfrom
mcthesw:fix/openai-schema-missing-properties

Conversation

@mcthesw
Copy link

@mcthesw mcthesw commented Mar 19, 2026

GetIndexInfoRequest is the only empty struct deriving JsonSchema. schemars 1.2.1 generates {"type":"object"} for it — without a properties field. OpenAI's function calling API strictly rejects object schemas missing properties, which is why this only fails with OpenAI. (The image shows error in Copilot CLI when using GPT series LLM)

82a120eb73ffd9c3334751e94786ff7a

Fix: replace the derived JsonSchema with a manual impl that explicitly emits {"properties": {}}, and add a regression test.

de6361be5019e619c06ab9f779a25358

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant