Skip to content

test(ai): pin gateway tool schema conversion#2063

Draft
maxpetrusenkoagent wants to merge 1 commit into
garrytan:masterfrom
maxpetrusenkoagent:hermes/oss-pr-2026-06-10-gbrain-1487
Draft

test(ai): pin gateway tool schema conversion#2063
maxpetrusenkoagent wants to merge 1 commit into
garrytan:masterfrom
maxpetrusenkoagent:hermes/oss-pr-2026-06-10-gbrain-1487

Conversation

@maxpetrusenkoagent

Copy link
Copy Markdown
Contributor

Summary

  • Extract gateway tool conversion into toAISDKTools() so chat() and tests exercise the same schema builder
  • Keep AI SDK v6 tool schemas wrapped with jsonSchema() instead of the legacy bare { jsonSchema } object that triggers schema is not a function
  • Strengthen the real generateText() regression test for the gateway tool loop path

Closes #1487

Test Plan

  • bun test test/ai/gateway-tools-schema.test.ts
  • bun test test/ai/gateway-tools-schema.test.ts test/ai/gateway-chat.test.ts test/ai/gateway-tool-loop.test.ts
  • bun run verify

@maxpetrusenkoagent

Copy link
Copy Markdown
Contributor Author

Verification from Mac mini catch-up lane:

  • Focused tests: PATH=/Users/maxsmacmini/.local/bin:/opt/homebrew/bin:/Users/maxsmacmini/.bun/bin:$PATH bun test test/ai/gateway-tools-schema.test.ts test/ai/gateway-chat.test.ts test/ai/gateway-tool-loop.test.ts
  • Result: 32 pass, 0 fail

GitHub currently reports no status check suite for this draft PR.

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.

gateway.chat(): incorrect tool schema format breaks non-Anthropic providers (agent.use_gateway_loop)

1 participant