Skip to content

fix(tool): require plain-object parameter roots per OpenAI tools contract - #263

Merged
LeXwDeX merged 3 commits into
mainfrom
dev
Aug 14, 2026
Merged

fix(tool): require plain-object parameter roots per OpenAI tools contract#263
LeXwDeX merged 3 commits into
mainfrom
dev

Conversation

@LeXwDeX

@LeXwDeX LeXwDeX commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Summary

Promote to main: structural fix replacing the transport-level root-anyOf patch (#260/#261, superseded).

  • workflow tool Parameters nest the 10-branch discriminated union under a single params property — plain-object schema root on every transport
  • Tool.define asserts at construction time that parameters serialize to a plain object root; violations fail registration with guidance
  • provider transform root-anyOf patch deleted (superseded by the source-level contract)
  • native runtime gate keys off the SDK transport package (api.npm) instead of providerID

Evidence

Dev validation (PR #262)

  • Typecheck pass; dev full test run 31790426360: Unit (linux), E2E (linux), E2E (windows) — all success

…ract

Root-level anyOf in tool parameters violated the OpenAI tools contract:
OpenAI tolerated it, DeepSeek rejected it with a schema error, and GLM
silently emitted empty tool arguments (live-reproduced: five consecutive
workflow calls decoded as got {}). Replace the transport-level patch
with a structural contract:

- workflow Parameters: nest the 10-branch discriminated union under a
  single params property; the wire root is now a plain object
- Tool.define: assert at construction time that parameters serialize to
  a plain object root; violations fail registration with guidance
- provider transform: drop the openai-compatible root-anyOf patch,
  superseded by the source-level contract
- native runtime gate: key off the SDK transport package instead of the
  providerID so OpenAI-compatible relays can use the native path
fix(tool): require plain-object parameter roots per OpenAI tools contract
@LeXwDeX
LeXwDeX merged commit 8f23fcf into main Aug 14, 2026
15 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