Skip to content

fix(hub): stop the model inventing optional tool fields - #201

Merged
TheGreatAxios merged 2 commits into
mainfrom
fix-optional-tool-fields
Nov 6, 2026
Merged

TheGreatAxios merged 2 commits into
mainfrom
fix-optional-tool-fields

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

What changed

On an OpenAI API key, agents filled optional tool fields with made-up values like "dummy" or a blank space, so the calls failed. When the coordinator repeated one three times it was shut down, and the project looked frozen. Now agents leave optional fields out.

Cause: OpenAI treats tools as strict unless told otherwise, which makes every field required.

  • Tools sent through the OpenAI Responses adapter are now marked non-strict. That covers OpenAI and xAI API keys, and custom connections set to the Responses format.
  • The ChatGPT and xAI logins are unchanged; they use their own adapters.

How it was verified

  • Replayed the start of a real project 10 times each: made-up values in 20 of 20 calls before, 0 of 20 after.
  • Ran full projects locally through the writers and the designer: the coordinator went from 33 made-up values and 33 failed calls in 196 to none in 61. Writers and the designer were no worse.
  • Without this fix, 4 of 8 local projects froze on their first turn this way.
  • Lint, typecheck and tests pass.
  • Not tested: xAI API keys and custom Responses-format servers; no key or server was available.

@TheGreatAxios TheGreatAxios reopened this Nov 5, 2026
@TheGreatAxios
TheGreatAxios marked this pull request as draft November 5, 2026 23:39
@corbits-triage

corbits-triage Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Triage: Pass

No changes needed from you. A maintainer will review this pull request.

OpenAI treats a function tool without strict as strict, so every
property counted as required and the model filled optional fields with
made-up values, which failed and could end a coordinator as a doom loop.
The OpenAI API adapter now sends its tools non-strict.
@TheGreatAxios
TheGreatAxios marked this pull request as ready for review November 6, 2026 02:35
@TheGreatAxios
TheGreatAxios force-pushed the fix-optional-tool-fields branch from dce61aa to 0450cad Compare November 6, 2026 02:36

@corbits-triage corbits-triage Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No defects reported.

@TheGreatAxios
TheGreatAxios added this pull request to the merge queue Nov 6, 2026
Merged via the queue into main with commit 690d837 Nov 6, 2026
9 checks passed
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