]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
Send reasoning content back to the model across turns via the reasoning_content API...
authorPascal <redacted>
Fri, 27 Mar 2026 07:17:35 +0000 (08:17 +0100)
committerGitHub <redacted>
Fri, 27 Mar 2026 07:17:35 +0000 (08:17 +0100)
commitd0fa2c9fbb8414a509fc8c4f534ad3c03e591735
tree5c9e2088dbc0b77474200a3f8e7dbea5dfdf24e9
parent9bcb4eff4d7e7755276645c767948c25c00481b8
Send reasoning content back to the model across turns via the reasoning_content API field (#21036)

* webui: send reasoning_content back to model in context

Preserve assistant reasoning across turns by extracting it from
internal tags and sending it as a separate reasoning_content field
in the API payload. The server and Jinja templates handle native
formatting (e.g. <think> tags for Qwen, GLM, DeepSeek...).

Adds "Exclude reasoning from context" toggle in Settings > Developer
(off by default, so reasoning is preserved). Includes unit tests.

* webui: add syncable parameter for excludeReasoningFromContext

* chore: update webui build output
tools/server/public/index.html.gz
tools/server/webui/src/lib/components/app/chat/ChatSettings/ChatSettings.svelte
tools/server/webui/src/lib/constants/agentic.ts
tools/server/webui/src/lib/constants/settings-config.ts
tools/server/webui/src/lib/constants/settings-keys.ts
tools/server/webui/src/lib/services/chat.service.ts
tools/server/webui/src/lib/services/parameter-sync.service.ts
tools/server/webui/src/lib/stores/chat.svelte.ts
tools/server/webui/src/lib/types/api.d.ts
tools/server/webui/src/lib/types/settings.d.ts
tools/server/webui/tests/unit/reasoning-context.test.ts [new file with mode: 0644]