Tool schema required field handling for strict OpenAI backends
NousResearch/hermes-agent · cluster 56123 · agent
Data as of
4 open items. Fix merged in #68154. Check it covers your case.
The short answer
- Known?
- Yes. 21 related items grouped here, 3 issues already closed.
- Fix event
- A fix was merged to main in PR #68154. Check it covers your case. No release data is tracked.
- Tracker
- The maintainers' tracker marks this
partially resolved, deciding PRs #68154, #112169, #115854. That is separate from the fix event. - Still open
- 1 issue and 3 PRs.
Next step: read #68154, then check whether your report is one of the 1 still open.
Read #68154Pick up a Lab task
These issues and fixes concern how the required field in tool/JSON schemas is handled when communicating with strict OpenAI-compatible backends, specifically whether it should be preserved as an empty array, injected when missing, or stripped when null/malformed to avoid HTTP 400 errors. The cluster centers on Moonshot/Kimi and delegate_task schemas, with overlapping but sometimes conflicting approaches to the fix.
Open issues1
- Issue#60752[Bug]: "Tool schema with required: null causes HTTP 400 on strict OpenAI-compatible backends (e.g. arityflow.top) since v0.11+"
Open PRs3
Fixes on record
-
#68154 fix(moonshot): inject required:[] on object schemas to fix kimi HTTP 400 (#66835)
files:
agent/moonshot_schema.py,tests/agent/test_moonshot_schema.py,tests/agent/transports/test_chat_completions.py -
#112169 fix(tools): zero-argument tool schemas keep `required: []` so strict OpenAI-compatible proxies stop 400ing (#111684, #59386, salvage #20151)
files:
contributors/emails/[redacted:email],tests/tools/test_schema_sanitizer.py,tools/schema_sanitizer.py -
#115854 fix(mcp): MCP tool schemas keep required: [] so strict OpenAI-compatible backends stop rejecting requests (#56123, salvage #106288)
files:
contributors/emails/[redacted:email],tests/tools/test_mcp_tool.py,tests/tools/test_schema_sanitizer.py,tools/mcp_tool_schema.py,tools/schema_sanitizer.py
11 PRs closed without merging
From the close comments: duplicate 3 · merged via another change 3 · superseded by another PR 3 · stale or abandoned 2
-
#56136 fix(tools): preserve empty required array instead of dropping key · superseded by another PR →
#20151 -
#59416 fix: drop malformed required schema values · superseded by another PR →
bd0affe -
#59459 fix: keep empty required: [] instead of removing key (#59386) · merged via another change →
40b47b8,#112169 - #59684 fix(delegate_task): mark tasks parameter nullable for strict OpenAI-compatible backends · stale or abandoned
- #60702 fix(schema): preserve empty required array in sanitizer and add additionalProperties to delegate_task (#59386) · stale or abandoned
Show 6 more
-
#60755 fix(schema): drop null required from tool schemas · duplicate →
#59416,#29329,#59421,#60752 - #66849 fix(tools): keep empty required array instead of stripping it · merged via another change
-
#66853 fix(moonshot): ensure required array is always present in tool schemas · duplicate →
#66852 -
#66855 fix(agent): inject empty required array on Moonshot object schemas (#66835) · merged via another change →
#68154 -
#67430 fix(moonshot): inject required: [] on object schemas missing it · superseded by another PR →
#68154,#66855,#66852 -
#71220 fix(tools): keep empty required[] instead of dropping the key (#59386) · duplicate →
#59459
Closed issues · 3
- Closed#56123fix: schema_sanitizer strips required field causing HTTP 400 on strict OpenAI-compatible backends
- Closed#59386[Bug]: `delegate_task` schema causes HTTP 400 / non-retryable crash on strict OpenAI-compatible backends
- Closed#66835Moonshot/Kimi: tool schemas with empty properties missing "required" array cause HTTP 400
How this cluster was grouped
-
Link evidence (
partly structural links): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text. - Members outside that structural core may belong to a different underlying problem.
-
Pairwise link density
0.09: the share of item pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36.1.00means every pair is linked.
Pick up a Lab task
Check whether a fix covers the open issues here, with your own agent. Bring back evidence for maintainers.
Open the Lab