Release notes with sanitized content. Update CHANGELOG.md with merged changes. - Add v1.0.7-summary.md (Ollama function calling) - Add v1.0.8-summary.md (Ollama reliability, auto-detection) - Update CHANGELOG.md with release history Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
5.8 KiB
Version 1.0.7 Release Summary
Release Date: 2026-06-03
Type: Bug Fix
Focus: Ollama Function Calling Support
Overview
Version 1.0.7 adds function calling (tool use) support to the Ollama AI provider, enabling local Ollama models to execute shell commands and interact with system tools just like OpenAI-compatible providers.
What Changed
Function Calling Support for Ollama
Problem: The Ollama provider was ignoring the tools parameter and could not execute function calls (like execute_shell_command). Models would output text descriptions of tool calls instead of actually invoking them.
Solution: Implemented full function calling support in the Ollama provider:
- Tool Registration: Ollama provider now accepts and formats tools in the request
- Tool Call Parsing: Response handler parses
tool_callsfrom Ollama API responses - Arguments Handling: Supports both object and string argument formats
- ID Generation: Generates fallback IDs when Ollama doesn't provide them
Files Changed:
src-tauri/src/ai/ollama.rs- Added function calling support
Technical Details
Ollama API Integration
The Ollama provider now sends tools in the request body:
{
"model": "llama3.1:8b",
"messages": [...],
"stream": false,
"tools": [
{
"type": "function",
"function": {
"name": "execute_shell_command",
"description": "Execute shell commands...",
"parameters": {...}
}
}
]
}
Response Parsing
Parses tool calls from Ollama's response format:
{
"message": {
"content": "...",
"tool_calls": [
{
"id": "call_123",
"function": {
"name": "execute_shell_command",
"arguments": {"command": "kubectl get pods"}
}
}
]
}
}
Before vs After
Before (v1.0.6)
User: "Can you tell me all the namespaces in my cluster?"
Ollama Response (broken):
tool_calls:
- command: kubectl get ns --all-namespaces=false
output_format: table
Output is just text, no actual command execution
After (v1.0.7)
User: "Can you tell me all the namespaces in my cluster?"
Ollama Response (working):
- Executes:
kubectl get namespaces - Returns: Actual namespace list from cluster
- Format: Natural language summary with data
Impact
User Benefits
- ✅ Local Ollama models now work properly with diagnostic commands
- ✅ No cloud API required for function calling (privacy benefit)
- ✅ Consistent behavior across OpenAI and Ollama providers
- ✅ Lower costs by using local models for incident response
Developer Benefits
- ✅ Unified tool interface across all providers
- ✅ Easier testing with local models
- ✅ Better debugging without API dependencies
Testing
Test Cases
-
Simple Information Query:
- Input: "What pods are running in my namespace?"
- Expected: Executes
kubectl get pods -n <namespace>and returns results
-
Diagnostic Investigation:
- Input: "Investigate telemetry issues in cluster"
- Expected: Executes multiple kubectl commands, analyzes results
-
Tool Call Arguments:
- Test both object and string argument formats
- Verify proper JSON serialization
Verified Models
- ✅
llama3.1:8b- Full function calling support - ✅
gemma4:e2b- Full function calling support - ⚠️ Other models may require testing (phi3, mistral, codellama)
Migration Guide
For Users
No configuration changes required. If you're using Ollama provider, function calling will now work automatically.
For Developers
No code changes required. The Ollama provider signature matches the existing Provider trait.
Known Limitations
-
Model Support: Function calling availability depends on the Ollama model's capabilities. Not all models support tools.
-
Response Format: Ollama's tool call format may vary slightly from OpenAI's. The provider handles common variations.
-
Error Handling: If Ollama returns malformed tool calls, they are skipped and the response content is returned instead.
Related Issues
- Fixes: Tool calls not working with local Ollama
- Related to: PR #40 (removed JSON examples from agent prompts)
- Complements: liteLLM timeout fixes for remote models
Upgrade Instructions
- Pull latest code:
git pull origin main - Rebuild application:
npm run tauri build - Install updated app: Replace existing installation
- Test function calling: Use Ollama provider with diagnostic queries
Future Enhancements
Potential Improvements
- Streaming Support: Add function calling for streaming responses
- Tool Choice Control: Support
tool_choiceparameter (auto/required/none) - Parallel Tool Calls: Handle multiple simultaneous tool invocations
- Model Capability Detection: Auto-detect which Ollama models support tools
Compatibility
This release maintains backward compatibility with:
- OpenAI provider function calling
- Anthropic provider function calling
- Gemini provider function calling
- Custom provider formats
Credits
- Issue Identification: Testing revealed Ollama tool calling regression after PR #40
- Root Cause Analysis: Ollama provider was ignoring tools parameter entirely
- Implementation: Added full function calling support matching OpenAI format
- Testing: Verified with llama3.1:8b and gemma4:e2b models
Version History
- v1.0.7 (2026-06-03): Added Ollama function calling support
- v1.0.6 (2026-06-03): Removed JSON examples from agent prompts
- v1.0.5 (2026-06-03): Agent output quality improvements
Release Type: Bug Fix
Breaking Changes: None
API Changes: None (internal implementation only)
Documentation Updated: Yes