Commit graph

1631 commits

Author SHA1 Message Date
Concedo
dfab7c1bf0 stop seq fix 2026-08-12 21:34:31 +08:00
Concedo
7fd4acc35c reasoning budget for muse glimmer 2026-08-11 15:43:23 +08:00
Concedo
b39ff27d6f muse glimmer jinja and tool calls working 2026-08-11 15:06:30 +08:00
Concedo
b3d0475aae muse glimmer templates 2026-08-10 21:44:56 +08:00
Concedo
59d92956f7 use python csv writer for benchmark 2026-08-09 09:28:18 +08:00
Concedo
8a16f96307 Merge branch 'upstream' into concedo_experimental
# Conflicts:
#	.github/workflows/build-apple.yml
#	.github/workflows/build-self-hosted.yml
#	.github/workflows/release.yml
#	SECURITY.md
#	build-xcframework.sh
#	ci/run.sh
#	docs/development/HOWTO-add-model.md
#	examples/model-conversion/scripts/causal/convert-model.sh
#	examples/model-conversion/scripts/embedding/convert-model.sh
#	scripts/sync_vendor.py
#	scripts/ui-assets.cmake
#	tests/test-arg-parser.cpp
#	tests/test-backend-sampler.cpp
#	tests/test-grammar-parser.cpp
#	tests/test-llama-archs.cpp
#	tests/test-sampling.cpp
#	tools/cli/README.md
#	tools/completion/README.md
#	tools/mtmd/CMakeLists.txt
#	tools/mtmd/mtmd.h
#	tools/mtmd/tests/test-deepseek-ocr.py
#	tools/server/README.md
#	tools/tts/CMakeLists.txt
#	tools/tts/convert_pt_to_hf.py
2026-08-07 20:46:56 +08:00
Concedo
0132829017 openai image edit endpoint 2026-08-07 14:40:54 +08:00
Concedo
927b997345 autoswap for oai images 2026-08-07 14:30:23 +08:00
Concedo
61bfce83de fix some issues with the preview image: Preview generation is disabled by default and only done when requested
Cleared stale generation state at job start/end.
Fixed the animated preview GIF buffer leak.
2026-08-07 00:19:39 +08:00
Wagner Bruna
e3cb5e9e44
sd: support for the /sdapi/v1/progress endpoint (#2316)
Co-authored-by: LostRuins Concedo <39025047+LostRuins@users.noreply.github.com>
2026-08-06 23:52:31 +08:00
Concedo
a8a8371229 increase max lora to 10 2026-08-06 22:31:52 +08:00
Concedo
348f7bf7f4 fix autoswap 2026-08-06 22:01:45 +08:00
Tai An
9fdd21de1b
fix(router): don't let an unmatched model field block autoswap (#2384) (#2387)
In autoswap mode, a POST to /v1/completions or /v1/chat/completions
carrying a `model` name that is not an entry in the admin dir set
`model_switch_pass = True` before checking the whitelist. No swap was
performed, but the flag suppressed the request-type dispatch below it,
so the text model was never loaded on demand.

The same requests without a `model` field, and every other model type
(stt/tts/embed/music/image), skip that branch entirely and load fine --
which is why only chat was affected, and why sending one model-less
request worked around it. It also recurs after --adminunloadtimeout
fires, since the "nomodel" state is recovered from by that same
dispatch.

Only set the flag on the path that actually issues the reload.
2026-08-06 21:58:44 +08:00
Julien BODIN
152e080b6a
Add Mistral [THINK]/[/THINK] thinking format (mistral3 arch) (#2380)
The reasoning budget derived from reasoning_effort never applied to Mistral
models. gpttype_adapter.cpp picks the think delimiters from a switch on the
model architecture, and mistral3 has no case, so it falls back to <think> /
</think>. Those are not vocabulary tokens for Ministral-3, so TokenizeString
returns more than one token each, the expected_start/end_tokens guard clears
all three vectors, and apply_reasoning_budget() returns at its first if.
The parameter is accepted, converted and passed down to the sampler, then
dropped on a size check, with nothing logged.

Adding the mistral3 case arms the budget. [THINK] and [/THINK] are single
vocabulary tokens (ids 34 and 35 on Ministral-3), so the size guard passes.

The thinkformats entry is a separate fix for a separate defect: without it the
thinking block was never split out, so it leaked into content with its [THINK]
marker still in it, instead of going to reasoning_content.

Measured on Ministral-3-14B-Reasoning-2512 (IQ4_XS, ctx 8192, --jinja), 5 real
prompts x 3 samples per cell, max_tokens 3000 (so a 750-token budget at "low"):

  reasoning_effort   thinking words before      thinking words after
  none               311 - 2314                 7 (the forced-close phrase)
  low                340 - 2255                 521 - 574

Forced closes: 0/15 before, 14/15 after at "low" and 15/15 at "none". Three
samples per cell because this model's variance at temperature 0.7 spans a
factor of 4 on an identical payload — a single sample per cell cannot tell an
effect from noise.

No regression on a non-reasoning mistral3 model: Ministral-3-8B-Instruct with
reasoning_effort "low" returns finish_reason "stop", a normal answer and zero
forced closes, since apply_reasoning_budget() bails out when the start marker
never appears.
2026-08-05 18:51:55 +08:00
Concedo
4dc9df05f6 increase max images 2026-08-05 14:30:32 +08:00
Concedo
bf9b9bd455 type check hardening 2026-08-02 10:48:23 +08:00
Concedo
9e64023c7b mcp media strip normalize 2026-08-02 10:46:26 +08:00
Tai An
4423b3af55
fix(api): strip MCP image base64 from tool results in the jinja path (#2374) (#2376)
When a tool/MCP result carries an image, the OpenAI-compatible chat
adapter's jinja code path left the base64 payload in the rendered
prompt as plain text (a single 1024x1024 jpeg bloated the context by
~120k tokens), while the legacy path already stripped it via
strip_mcpcontent_of_media.

- format_jinja now strips the base64 from tool-role string content
  before rendering, matching the legacy path; the image itself is
  still swept out and attached separately.
- sweep_media_from_messages now also recognizes MCP-style image
  content blocks (type == "image") inside a content list, so images
  delivered that way are attached instead of dropped.
2026-08-02 10:40:17 +08:00
Concedo
da8a5e4461 bump version 2026-08-02 10:33:54 +08:00
Concedo
57250b17dd untoggle no_host to try 2026-08-02 01:07:56 +08:00
Concedo
7a69646196 qwen3tts support languages 2026-07-27 22:45:04 +08:00
Concedo
304bd3d119 no host by default 2026-07-27 21:03:34 +08:00
Wagner Bruna
fd44ba2c61
sd: sync with master-795-87a0177 (#2338)
* sd: sync with master-782-b290693

* sd: sync with master-788-8a51eb9

* sd: sync with master-789-5114672

* sd: sync with master-795-87a0177

* sd: expose ref_image_args and make it trigger edit mode
2026-07-25 19:04:50 +08:00
Concedo
832ffa569e try to set the env vars first for cuda 2026-07-22 23:00:42 +08:00
Concedo
d097e369f5 fix for https://github.com/LostRuins/koboldcpp/discussions/2358
Revert "fix device enumeration issues"

This reverts commit 287f3cdb53d4c663d3108c6ad6e4e45624c45104. (+4 squashed commit)

Squashed commit:

[38bf57e59] Revert "try init cuda even earlier"

This reverts commit fa3d4dfd22284099d1484f3597ae60162d420e1b.

[fa3d4dfd2] try init cuda even earlier

[287f3cdb5] fix device enumeration issues

[02f9543f1] fix for https://github.com/LostRuins/koboldcpp/discussions/2358
2026-07-22 22:50:16 +08:00
Concedo
01f2fa51e4 patch from https://github.com/LostRuins/koboldcpp/pull/2352 2026-07-20 18:29:50 +08:00
DilanRG
a5560fc61d
fix(gui): preserve disabled VAE tiling in configs (#2346)
Treat the presence of sdtiledvae separately from its truthiness so the documented zero value survives a launcher config reload. Fixes #2065.

Co-authored-by: LK-Customs <lolikun@sunpraise-mc.com>
2026-07-19 17:37:37 +08:00
Concedo
768a2ca38c ipv4 and ipv6 total 40 threads for the http server 2026-07-18 18:55:46 +08:00
Tai An
8b85ba1a33
fix(api): don't iterate a string banned_tokens character by character (#2333) (#2336)
* fix(api): don't iterate a string banned_tokens character by character (#2333)

banned_tokens/banned_strings are consumed as a list of substrings. When a
caller supplies a bare string instead, `banned_tokens[:ban_token_max]`
slices it and `for tok in banned_tokens` walks it one character at a time,
so every letter in the value becomes its own banned substring. Banning
common letters like "e" makes generation collapse into garbage, with no
error to point at the cause.

Coerce a string value into a single-element list, matching how the OpenAI
`stop` parameter is already normalized in transform_genparams.

* fix(api): parse a JSON-array string in banned_tokens instead of inerting it

Per review: coercing the string form to a single-element list left the
reported gendefaults case a seemingly-effective no-op. Parse a JSON array
supplied as a string so the reported config bans "exclude" as intended,
and keep the bare-string form ("exclude") working as a single substring ban.

---------

Co-authored-by: Anai-Guo <antai12232931@anaiguo.com>
2026-07-18 10:46:02 +08:00
Tai An
3b6d698616
fix(console): print websearch status on its own line (#2340)
The two websearch status messages in koboldcpp.py print with no leading
newline, so they run onto the end of the preceding generation-stats line
(which has no trailing newline), e.g.:

    ...Total:26.31sReturning cached websearch...

Give both the cached-result print and the new-search print a leading
newline so each starts on its own line, matching the approach already
taken elsewhere (adding the missing newline at the offending print
rather than changing the stats line). Fixes #2337.

Co-authored-by: Anai-Guo <antai12232931@anaiguo.com>
2026-07-18 10:33:49 +08:00
Concedo
362d3a3d7b fixed cli jinjathink 2026-07-17 17:09:45 +08:00
Concedo
04111eeadb jinjathink enables jinja 2026-07-15 00:22:51 +08:00
Wagner Bruna
1f9dd9c398
sd: sync with master-775-b5d8120 (#2321)
* sd: expose extra_sample_args parameter

* sd: sync with master-773-1b04283

* sd: sync with master-775-b5d8120
2026-07-13 20:42:22 +08:00
Concedo
2f7d1bb5c4 fixed nonetype error 2026-07-13 18:04:37 +08:00
Concedo
f2f9d9d2b3 cont: abort bug for images 2026-07-12 22:37:12 +08:00
Concedo
30def702a0 fixed abort bug for images 2026-07-12 21:01:15 +08:00
Concedo
062a2d0bd3 added support for qwen3tts aliases, replaces https://github.com/LostRuins/koboldcpp/pull/2315 2026-07-12 11:49:33 +08:00
Concedo
6fffdb5c62 rowsplit removed 2026-07-12 09:58:39 +08:00
Wagner Bruna
ce3623ad8b
sd: make aborting on client disconnect opt-out (#2322) 2026-07-11 22:21:22 +08:00
Wagner Bruna
c43c27c838
sd: cancel image generation on client disconnect (#2318) 2026-07-11 12:28:04 +08:00
Concedo
cf11aeb27e bump version 2026-07-11 11:37:54 +08:00
Concedo
3f0bab3a3b fixed default gen amt not actually increased (+1 squashed commits)
Squashed commits:

[8e2417d83] fixed default gen amt not actually increased
2026-07-10 15:18:56 +08:00
Concedo
dc8f2b2cd1 updated cmake 2026-07-08 17:26:47 +08:00
Wagner Bruna
e11d3ddef0
sd: sync with master-767-885f01a (#2310)
* sd: minor API path handling cleanup

* sd: sync with master-749-b11c95a

* sd: use original API parameters at the internal C++ API

* sd: split_mode and auto_fit backend support

* sd: sync with master-758-c674225

* sd: sync with master-765-bb84971

* sd: sync with master-767-885f01a
2026-07-08 17:08:19 +08:00
Concedo
adb2e96e3c allow viewing last generated image with the correct genkey 2026-07-06 23:33:33 +08:00
Concedo
6c3f7018a7 increase max defaultgenamount limit 2026-07-06 20:12:11 +08:00
Concedo
56d11ad4e8 Merge branch 'upstream' into concedo_experimental
# Conflicts:
#	docs/backend/OPENCL.md
#	ggml/src/ggml-hexagon/CMakeLists.txt
#	ggml/src/ggml-hexagon/ggml-hexagon.cpp
#	ggml/src/ggml-hexagon/htp/CMakeLists.txt
#	ggml/src/ggml-hexagon/htp/flash-attn-ops.c
#	ggml/src/ggml-hexagon/htp/hex-dma.h
#	ggml/src/ggml-hexagon/htp/hmx-utils.h
#	ggml/src/ggml-hexagon/htp/htp-ops.h
#	ggml/src/ggml-hexagon/htp/hvx-base.h
#	ggml/src/ggml-hexagon/htp/hvx-exp.h
#	ggml/src/ggml-hexagon/htp/hvx-sigmoid.h
#	ggml/src/ggml-hexagon/htp/main.c
#	ggml/src/ggml-hexagon/htp/matmul-ops.c
#	ggml/src/ggml-opencl/CMakeLists.txt
#	ggml/src/ggml-opencl/ggml-opencl.cpp
#	ggml/src/ggml-opencl/kernels/cvt.cl
#	scripts/snapdragon/adb/run-completion.sh
#	scripts/snapdragon/adb/run-tool.sh
#	scripts/snapdragon/ggml-hexagon-profile.py
#	tests/test-backend-ops.cpp
2026-07-02 21:42:36 +08:00
Concedo
44c966a764 ollama show model name to return 2026-07-01 22:31:04 +08:00
Concedo
0bc2936f06 ollama tool calling 2026-07-01 22:19:28 +08:00
Concedo
f76b5a9e31 ollama streaming 2026-07-01 21:37:51 +08:00