Add tool calling support and expand model catalog#6
Merged
Conversation
Tool calling: - New Tools module bridging RubyLLM::Tool <-> Candle::Tool - Enable supports_functions? capability - perform_tool_completion! routes tool-bearing requests through red-candle's chat_with_tools (execute: false, RubyLLM manages loop) - Handle tool_prefs/thinking kwargs for RubyLLM 1.14 compatibility - Default max_length: 1000 for tool calls (Qwen3 needs room for <think>) Models: - Add all red-candle 1.5 supported models (22 total) - Qwen3 0.6B/4B, SmolLM2, Yi, Granite 7B/4.0, GLM-4, Phi-4, Mistral v0.3 Dependencies: - red-candle ~> 1.5 (tool calling support) - ruby_llm >= 1.10 (verified compatible with 1.10-1.14) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Triggers on semver tags, verifies version matches, builds gem, pushes to RubyGems, and creates GitHub Release. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The models spec expected 5 models but the catalog now has 20.
Schema validation failed because RubyLLM wraps schemas in
{name:, schema:, strict:} format — now unwrapped before validation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds tool/function calling support to the red-candle RubyLLM provider, enabling local models to invoke tools through RubyLLM's standard tool interface.
New: Tool Calling
supports_functions?now returnstrueToolsmodule bridgesRubyLLM::Tool↔Candle::Toolperform_tool_completion!routes tool-bearing requests through red-candle'schat_with_toolswithexecute: false(RubyLLM manages the execution loop)max_length: 1000for tool calls (Qwen3 needs room for<think>blocks)tool_prefs/thinkingkwargs)Verified
Expanded Model Catalog (22 models)
Added all models supported by red-candle 1.5:
Dependencies
red-candle ~> 1.5(requires tool calling support)ruby_llm >= 1.10(tested compatible through 1.14)Test plan
🤖 Generated with Claude Code