You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(responses): give every function tool schema an object root
Providers that validate strictly, DeepSeek among them, reject a function
schema whose root has no type. The parser forwarded (t.parameters ?? {})
untouched, so a tool declared without parameters — or with properties
but no root type — went out as an invalid schema.
Both routes are covered. The parser normalizes at build time, and the
raw Responses passthrough normalizes top-level tools and
input[].additional_tools.tools before serializing, because that path
copies _rawBody and never reaches the parser. Fixing only the parser
would have left every passthrough request still broken.
Valid schemas are returned unchanged rather than rebuilt, so existing
property sets cannot be reordered or dropped on the way through.
PR #745 by @white-source proposed the right normalizers but carried no
tests, which is why it could not land as-is. Ablating both normalizers
fails three tests: the parser root-type case and the two serialized
passthrough cases.
Co-authored-by: Mr.Hat <white-source@users.noreply.github.com>
0 commit comments