Skip to content

capabilities.toolcall is populated but never honored — tool_call: false still sends the full tool roster #45327

Closed

Description

@yanglinfang

Description

Setting tool_call: false on a model has no effect. The flag reaches Provider.Model.capabilities.toolcall (packages/opencode/src/provider/provider.ts:1288 and :1519), but nothing in the session, tool, or provider-transform paths ever reads it back — so every request still carries the full native tool roster.

For local models behind OpenAI-compatible endpoints that can't emit native tool calls, the result is a dead-ended turn: the model writes the call as text (<tool_call>{...}</tool_call> or a fenced JSON block), opencode stores it as ordinary assistant text, and the tool never runs. From the user's side it looks like the model simply refused to do the work.

Steps to reproduce

  1. Point a provider at a local OpenAI-compatible endpoint (ollama, llama-server, vLLM) and set "tool_call": false on the model in opencode.json
  2. Ask for something that needs a tool ("read util.py and describe it")
  3. The request still includes the full tool roster; when the model answers with a text-shaped call it is stored as plain text and nothing executes

Expected

The flag should have an observable effect — either withhold the native roster and parse a text protocol back into tool calls, or at minimum surface that the model cannot use tools.

OpenCode version

1.18.23

Activity

  1. github-actions commented on Aug 26, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. yanglinfang commented on Sep 2, 2026

    @yanglinfang
    Author

    Closing — recent opencode versions work well enough for our local-model setup that this isn't worth pursuing. Withdrawing the associated PR too.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions