Skip to content

Misc. bug: gpt-oss Jinja template error when assistant message has reasoning_content and tool_calls #19703

@abhijitb11

Description

@abhijitb11

Summary

I had a working build of llama-cli and llama-server that was previously stably running gpt-oss-120b from ggml huggingface. After pulling and rebuilding many commits later, I found that during multi-turn chat requests (specifically while coding against this model using OpenCode) that 500 errors were starting to appear.

I narrowed down the issue to a specific PR that caused the regression. There is a potential one-line fix for this.

Details

Error output:

Server error output
srv    operator(): got exception: {"error":{"code":500,"message":"...
  Error: Jinja Exception: Cannot pass both content and thinking in an
  assistant message with tool calls! Put the analysis message in one
  or the other, but not both.","type":"server_error"}}

Metadata

Metadata

Assignees

No one assigned

    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