Skip to content

feat(ollama): make tool_call interception configurable#7

Open
bussyjd wants to merge 1 commit intomainfrom
fix/ollama-tool-call-passthrough
Open

feat(ollama): make tool_call interception configurable#7
bussyjd wants to merge 1 commit intomainfrom
fix/ollama-tool-call-passthrough

Conversation

@bussyjd
Copy link
Collaborator

@bussyjd bussyjd commented Feb 27, 2026

Summary

  • Makes tool_call behavior configurable per-provider via providers.json
  • OllamaProvider hardcodes tool_call: True for all discovered models, causing llmspy to intercept tool_calls and execute them server-side via g_exec_tool()
  • When llmspy is used as a transparent proxy (e.g., for OpenClaw agent), the client needs tool_calls returned in the API response — not executed by llmspy
  • Setting "tool_call": false in the ollama provider config makes tool_calls pass through untouched
  • Defaults to True for full backwards compatibility

Test plan

  • Verified tool_calls are intercepted with tool_call: true (default, existing behavior)
  • Verified tool_calls pass through to client with tool_call: false in providers.json
  • Tested end-to-end with OpenClaw heartbeat running qwen3.5:35b through llmspy

OllamaProvider hardcodes tool_call: True for all models, causing
llmspy to intercept tool_calls and execute them server-side via
g_exec_tool(). When llmspy is used as a proxy (e.g. for OpenClaw),
the client needs tool_calls returned in the response, not executed
by llmspy.

Add tool_call_enabled attribute to OllamaProvider, sourced from
providers.json kwargs (defaults to True for backwards compat).
Setting "tool_call": false in providers.json makes tool_calls pass
through to the client untouched.
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.

1 participant