Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Nov 19, 2025

Summary

This PR adds native tool calling support to all providers that extend BaseOpenAiCompatibleProvider, ensuring they can utilize the tool calling functionality that was recently added to the base class.

Changes

FeatherlessHandler

  • Updated getCompletionParams() to accept and pass through metadata parameter
  • Added tool support to DeepSeek-R1 path with proper tool call accumulation
  • Ensured tools are passed to both R1 and non-R1 model paths

ZAiHandler

  • Added tools and tool_choice parameters to the createStream() method
  • Tools are now properly passed through when creating chat completions

GroqHandler

  • Added tool call accumulation logic to createMessage()
  • Properly handles streaming tool calls and yields them when finish_reason is 'tool_calls'

Testing

All existing tests pass:

  • ✅ featherless.spec.ts (13 tests)
  • ✅ groq.spec.ts (10 tests)
  • ✅ zai.spec.ts (24 tests)

Impact

This change enables native tool calling for:

  • Featherless (including DeepSeek-R1 models)
  • Z AI (all models)
  • Groq (all models)

All changes are backward compatible and don't affect providers that don't use tools.

- Updated FeatherlessHandler to support tools in DeepSeek-R1 path
- Updated ZAiHandler to pass tools and tool_choice in createStream
- Updated GroqHandler to handle tool calls in createMessage
- All providers now utilize the native tool calling support from BaseOpenAiCompatibleProvider
@roomote roomote bot requested review from cte, jr and mrubens as code owners November 19, 2025 14:27
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Nov 19, 2025
@roomote
Copy link
Contributor Author

roomote bot commented Nov 19, 2025

Rooviewer Clock   See task on Roo Cloud

Re-review complete. The new commit enables supportsNativeTools for 8 additional Groq models. All changes are consistent with the existing implementation and no issues were found.

Previous reviews

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

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

4 participants