Skip to content

Conversation

@0xMink
Copy link
Contributor

@0xMink 0xMink commented Feb 11, 2026

Closes #11404

Summary

  • Remove convertToolsForOpenAI() wrapper from Z-AI and Ollama handlers, passing tools directly to convertToolsForAiSdk() instead
  • The wrapper adds strict: true, forces all properties to required, and sets additionalProperties: false -- constraints that GLM and Qwen models do not support, causing malformed or missing tool call arguments
  • This aligns Z-AI and Ollama handlers with the OpenRouter handler, which already passes tools directly and works correctly with these model families

Test plan

  • Existing: parser tests (16/16) unaffected
  • Manual: Z-AI GLM-4.7 and Ollama Qwen2.5-Coder tool execution should no longer fail with "missing nativeArgs"
  • Verify: OpenRouter path unchanged (no regression)

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Feb 11, 2026
@roomote
Copy link
Contributor

roomote bot commented Feb 11, 2026

Rooviewer Clock   See task

No issues found. The change is minimal, type-safe, and consistent with the existing OpenRouter pattern that already passes tools directly to convertToolsForAiSdk(). Removing the convertToolsForOpenAI() wrapper is the correct fix for GLM and Qwen models that don't support OpenAI strict-mode tool constraints.

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tool execution fails: attempt_completion missing nativeArgs for Z-AI and Ollama after provider migrations

1 participant