Skip to content

Tools enabled but no tool execution with OpenAI-compatible endpoint (request lacks tools, response contains only reasoning_content and empty content) — gpt-oss + llama.cpp #354

@dragonkz01

Description

@dragonkz01

When Tools are enabled (e.g., search, website) and Newelle is configured to use an OpenAI-compatible endpoint (llama.cpp server), the assistant often produces no visible response and no tool is executed. Captured HTTP traffic shows Newelle sends /v1/chat/completions WITHOUT the OpenAI tools: [...] parameter, while the system prompt embeds “Tools Usage Rules”. With gpt-oss on llama.cpp, the model replies with content: null/"" and only reasoning_content (e.g., “Use search tool.”), so Newelle never sees a parsable tool-call JSON nor a tool_calls structure to run. (Logs attached)

Suggested fixes

Implement true OpenAI tool calling for OpenAI providers/endpoints:

add tools: [...] to request payload when Tools are enabled

support tool_calls responses, run tools, and send results back via role: "tool" messages

Robust fallback for prompt-based tools:

if content is empty but reasoning_content indicates a tool directive, show an actionable error or retry with a different mode (or parse tool JSON if present)

Reasoning mode compatibility:

allow disabling/overriding reasoning_effort for models/endpoints where it breaks tool output, or detect the empty-content case and retry with lower reasoning

Notes/evidence

Manual curl tests against llama.cpp show that the model CAN return proper OpenAI tool_calls when tools + tool_choice are provided, but Newelle does not appear to send tools in its API requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions