Skip to content

llama.cpp backend: allow --reasoning on|off in runtime flag allowlist #1064

Description

@lwsrbrts

llama.cpp's llama-server (verified on build 9879 / 72874f559) exposes a first-class server flag:

--reasoning [on|off|auto]   Use reasoning/thinking in the chat (default: auto = detect from template)

docker model configure rejects it:

$ docker model configure <model> -- --reasoning off
runtime flag "--reasoning" is not allowed for backend "llama.cpp"

It's missing from pkg/inference/runtime_flags_allowlist.go (which already allows --reasoning-format, --reasoning-budget, --reasoning-preserve, --chat-template-kwargs).

Why it matters: for hybrid thinking models (Qwen 3.5/4B family), the current way to pin a model non-thinking at the server level is --chat-template-kwargs '{"enable_thinking": false}'. On current builds this logs a deprecation warning at every server start:

W Setting 'enable_thinking' via --chat-template-kwargs is deprecated. Use --reasoning on / --reasoning off instead.

The flag is a simple enum, touches no files or external resources, and fits the existing allowlist security model (cf. #1032 for the reasoning-preserve flags).

Related: #1028 (request-body reasoning_effort: none), #1032 (reasoning-preserve flags).

Activity

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

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