Skip to content

local-model workers: prompted-tools text mode breaks tool calls + dominates prompt size #442

Description

@webdevtodayjason

Found during the 2026-06-10 overnight conductor-demo rehearsal (isolated gateway, LM Studio).

Evidence

  • The lmstudio/openai-compat provider path injects ALL tool schemas as prompt text ('You have access to the following functions: {…}') instead of the native tools API field. A 119-tool turn ships a ~43k-token prompt (LM Studio rejected with n_keep 43019 vs n_ctx 4096 until the model was reloaded at 64k).
  • Under the execution-worker job prompt, both gemma-4-12b and qwen3.6-35b-a3b narrate intent and emit malformed pseudo-calls ('<|tool_call>call:tasks.search{…}', '[ tasks: list, status: open ]') that never execute → no board change → runs auto-block after maxNoProgressAttempts. A plain foreground chat turn on the same model DID parse a correct call, so the format-following is prompt-sensitive.
  • Worker mechanics verified fine end-to-end with the same template (cycle picks up task, simulate-mode external-tool policy enforced, governance metadata recorded) — the failure is purely the tool-call channel on local providers.

Asks

  1. Use native tool-calling (OpenAI 'tools' field) for lmstudio/ollama/openai-compatible providers where the server supports it (LM Studio does).
  2. This is also ~the entire perf: 113-tool JSON-schema block (~17k tokens) sent on every turn regardless of intent #407 prompt-size tax made measurable: tool schemas as text dominate the 43k. Selective injection + native tools together make small local models viable workers — which matters for client-site Mac minis with no cloud keys.

Related: #407, #423 (silent tool-skip class). Demo kit: scripts/demo/conductor-demo.mjs (PR #441).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions