11805 Commits
Author SHA1 Message Date
Wolfsblvt 06bde939fb Fix npm release publishing workflow (#6037)
Allow npm releases to be retried from an existing release tag through the trusted publishing workflow, and scope the `allow-directory` workaround to the publish command.
2026-09-14 21:01:34 +02:00
Wolfsblvt 7e8663cd9c Merge pull request #6036 from SillyTavern/staging
1.19.0
1.19.0
2026-09-14 19:55:46 +02:00
Wolfsblvt 61139aa9b6 Update release version number (#6035) 2026-09-14 19:44:18 +02:00
Wolfsblvt 5e8d463ed4 feat: add Claude Fable 5.1 and GPT-6 Astra (#6015) 2026-09-14 19:03:39 +02:00
F.B. c0a417b240 Add image embed for DeepSeek V4 Flash Vision Exp (#5964) (#5996)
Add deepseek-v4-flash-vision-exp to image embed whitelist.
Block image embed in non `user` msg as DS doesn't allow this.
2026-09-07 23:09:17 +02:00
X00LAandClaude Sonnet 5 cc053e8356 Fix CORS proxy forwarding raw zstd-compressed bytes to the client (#6007)
undici (Node's fetch) transparently decompresses gzip, deflate, and br,
but not zstd. When a browser's full Accept-Encoding header is forwarded
as-is to the target origin, a Cloudflare-fronted server may respond
with zstd, and corsProxyMiddleware pipes those still-compressed bytes
straight through — the client receives garbage instead of the expected
body (e.g. "SyntaxError: Unexpected token" when parsing JSON).

Cap the outgoing Accept-Encoding to the encodings undici can actually
decode, so the target always responds with something we can forward
correctly.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-07 23:07:13 +02:00
Siyuan ChenandWolfsblvt d6b244cd25 Fix: Avoid cpSync crash when renaming characters (#6012)
* Fix: Avoid cpSync crash when renaming characters

Add a no-op filter to fs.cpSync during character renaming.

This avoids Node.js's native copyDir fast path, which can terminate
the process on Windows with affected Node.js versions instead of
throwing a catchable filesystem error.

Refs: https://github.com/nodejs/node/issues/63970

* docs: explain character rename copy workaround

---------

Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
2026-09-07 23:05:18 +02:00
voodoohop e7c4f8ee98 fix: resolve Pollinations TTS model aliases (#6010) 2026-09-07 23:03:43 +02:00
QiuLGandQiuLG a8f7e0d900 Fix Quick Reply overwrite cancellation (#6005)
Co-authored-by: QiuLG <195722592+QiuLsG@users.noreply.github.com>
2026-09-07 23:00:44 +02:00
saitewasreset 4613abc26e Google AI Studio: Fetch all model pages (#5954)
Paginate the Gemini models endpoint before returning available
generateContent models, and reject incomplete model lists.
2026-09-01 00:58:51 +02:00
Jeremy SchoemakerandWolfsblvt dd326d244f Return a degraded preview instead of dropping a chat whose last line is unparseable (#5969)
* fix: return a degraded preview instead of {} when a chat's last line is unparseable

getChatInfo resolved an empty object when the last line of a chat .jsonl
failed to parse or lacked known fields (truncated write, external edit).
All three consumers (chat list, search, recents) drop entries without a
file_name, so an otherwise intact chat silently disappeared from the UI
while still occupying its name for uniqueness checks (#5940).

Resolve the already-built chatData instead: file_id, file_name, file_size
and mtime-based last_mes are known good from stat(), chat_items comes from
the line count, and mes falls back to the existing placeholder. Matcher
results from the intact lines are preserved for search.

Fixes #5940

* fix: exclude unreadable chat line from message count

Keep degraded previews aligned with the messages that can actually be loaded by excluding both the metadata line and broken trailing line.

---------

Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
2026-09-01 00:38:40 +02:00
Zhewen Tan ccd8287833 fix: preserve zero NovelAI Math1 temperature (#5965) 2026-08-31 23:36:06 +02:00
Em 30eaf26a43 Update TavernAI link in README (#5987)
Update TavernAI link in README
2026-08-27 01:33:51 +02:00
PeterGriffin 98af17a8a4 fix(chat): delete associated tool calls with messages (#5949) 2026-08-21 06:35:50 +02:00
primorLee 0a9ba91852 fix: parse boolean values in env migrations (#5950) 2026-08-21 06:33:08 +02:00
Christoph 814734d4af Fix duplicate tool call IDs if provider repeats id, type, name (#5948)
Before this fix, tool call IDs were duplicated repeatedly with streaming requests if the provider repeats the "id" field in each streaming chunk:

```
{
    role: 'tool',
    content: 'content',
    tool_call_id: 'chatcmpl-tool-aa62chatcmpl-tool-aa62chatcmpl-tool-aa62chatcmpl-tool-aa62'
},
```

After this fix:

```
{
    role: 'tool',
    content: 'content',
    tool_call_id: 'chatcmpl-tool-aa62'
},
```

Example of raw streaming chunks received from Fireworks AI exhibiting this behavior of repeating "id", "type", "name":

```json
{
  "id": "chatcmpl-b7de",
  "object": "chat.completion.chunk",
  "created": 1783459695,
  "model": "accounts/fireworks/models/glm-5p2",
  "choices": [
    {
      "index": 0,
      "delta": {
        "tool_calls": [
          {
            "index": 0,
            "id": "chatcmpl-tool-aa62",
            "type": "function",
            "function": {
              "name": "debug_tool",
              "arguments": ""
            },
            "name": null
          }
        ]
      },
      "finish_reason": null,
      "raw_output": null
    }
  ],
  "usage": null
}
{
  "id": "chatcmpl-b7de",
  "object": "chat.completion.chunk",
  "created": 1783459695,
  "model": "accounts/fireworks/models/glm-5p2",
  "choices": [
    {
      "index": 0,
      "delta": {
        "tool_calls": [
          {
            "index": 0,
            "id": "chatcmpl-tool-aa62",
            "type": "function",
            "function": {
              "name": null,
              "arguments": "{\"input\": \""
            },
            "name": null
          }
        ]
      },
      "finish_reason": null,
      "raw_output": null
    }
  ],
  "usage": null
}
{
  "id": "chatcmpl-b7de",
  "object": "chat.completion.chunk",
  "created": 1783459695,
  "model": "accounts/fireworks/models/glm-5p2",
  "choices": [
    {
      "index": 0,
      "delta": {
        "tool_calls": [
          {
            "index": 0,
            "id": "chatcmpl-tool-aa62",
            "type": "function",
            "function": {
              "name": null,
              "arguments": "First"
            },
            "name": null
          }
        ]
      },
      "finish_reason": null,
      "raw_output": null
    }
  ],
  "usage": null
}
```
2026-08-21 06:16:41 +02:00
Christoph 8992872765 Fireworks: Request and process reasoning (#5947)
This change enables reasoning effort selection for the Fireworks provider as documented at https://docs.fireworks.ai/guides/reasoning#using-reasoning_effort.
2026-08-19 23:47:16 +02:00
Christoph 558d72dde2 Fireworks AI: Set session affinity header for improved caching (#5826)
This change adds a chat-specific "x-session-affinity" HTTP header to requests to Fireworks that use the full prompt. Quiet requests like summarization requests that don't use the same prompt prefix are excluded.

This improves prompt caching by
1. Adding a stable "x-session-affinity" header, which Fireworks AI recommends to route requests to the same replica
2. Separating different chats into different sessions
3. Separating main LLM calls from quiet calls which have a completely different prompt prefix

See https://docs.fireworks.ai/guides/prompt-caching.

This uses an HMAC with the cookie secret instead of simply hashing the chat title to avoid leaking chat titles. Session affinity headers may not fall under zero-data retention in Fireworks or could be cached by proxies on the way. Chat titles are tiny, so the HMAC computation is instant.
2026-08-19 23:25:15 +02:00
WolfsblvtandClaude Fable 5 4ad7af3c06 fix: use provider error fields instead of statusText for HTTP 200 errors (#5945)
Providers can return an HTTP 200 response whose body carries an error
object without a message field, or the error as a plain string. The
error message fell back to response.statusText, which is 'OK' for any
200 response, producing the opaque 'Error: OK'. Error messages now fall
back to the error's code or type field, then the string form, and only
use statusText for non-2xx responses where it carries meaning. Applies
to the non-streaming request path and both streaming error toasts.

Fixes #5647

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 21:05:04 +02:00
WolfsblvtandClaude Fable 5 bcc42de2e9 Give non-ASCII chat names distinct backup keys and throttles (#5944)
* fix: give non-ASCII chat names distinct backup keys and throttles

Backup filenames replace all non-alphanumeric characters with
underscores, so names such as equal-length CJK ones collapsed to the
same key and shared a single backup quota: busy chats evicted the
backups of unrelated quiet ones. The backup key now appends a short
hash of the raw name whenever the name contains non-ASCII characters,
keeping keys distinct and stable while ASCII names keep their exact
current keys and retention.

The backup throttle was also keyed per user only, so rapid saves in
one chat deferred or swallowed the backup of another chat saved in the
same window. It is now keyed per user and chat.

Fixes #5780

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: replace stray NUL byte in backup throttle key separator

A literal 0x00 byte slipped into the template string separator, which
made Git treat the whole file as binary.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: reunite backupChat docblock with its function

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 20:49:43 +02:00
WolfsblvtandClaude Fable 5 b4e162324b fix: mint a fresh integrity slug for new branches and checkpoints (#5943)
Branches and checkpoints inherited the parent chat's integrity UUID
through the chat_metadata spread in saveChat and saveGroupBookmarkChat,
so every member of a branch family shared one slug and the integrity
guard could not tell them apart. A save aimed at the wrong file within
the family would pass validation. New branches and checkpoints now get
their own slug at creation. Existing files are unaffected.

Fixes #5942

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 20:30:01 +02:00
Marcela Petra Ferraz de Novaes 2c61f3be1e fix: never resize avatars option does not work for group chat avatar (#5936)
* Check the never_resize_avatars setting to request or not cropping for group avatars.

* Change max width of thumbnail to 300px so square images are allowed.
2026-08-19 20:17:30 +02:00
48e7d605df fix(expressions): guard against null/undefined default-expression labels (#5938)
* fix(expressions): guard against null/undefined default-expression labels

Classifiers can return a falsy or literal "null"/"undefined" expression
label, and setDefaultEmojiForImage then requested the nonexistent
/img/default-expressions/null.png, producing a 404.

Fall back to DEFAULT_FALLBACK_EXPRESSION (joy) when the label is falsy,
a literal "null"/"undefined", or a custom expression without a default
asset. This is the only place the default-expressions URL is built, so the
guard covers all 404 paths.

Fixes #5863

* fix(expressions): fall back for any label without a default asset

Generalize the guard to a whitelist check against DEFAULT_EXPRESSIONS.
Every entry in that list has a matching default-expressions asset, so
any other label (falsy, literal null/undefined strings, custom
expressions, or unexpected classifier output) falls back to the
default expression instead of requesting a missing image.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 20:13:23 +02:00
WolfsblvtandClaude Fable 5 12b4fc50aa tests: set extensions enabled override for discover suite
PR #5571 added an extensionsEnabledFeatureGuard middleware that reads
extensions.enabled via getConfigValue. The test environment has no
config.yaml, so getConfig() exits the process and kills the Jest
worker, failing the extensions-discover suite. Set the env var
override so the guard resolves without touching the config file.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 20:06:43 +02:00
Yongjie Guan 742d5601be Prevent proxy access keys from triggering password-manager prompts in Chromium-based browsers (#5913)
* fix: prevent proxy keys from triggering password manager

Render reverse proxy credentials as visually masked text fields with password-neutral DOM identifiers while preserving existing settings, preset, and request field names. Align the Azure OpenAI key input and add regression coverage.

* fix: preserve masked secret clipboard protection
2026-08-19 20:05:15 +02:00
4ed1372411 fix: correct malformed multimodal caption request for oobabooga (#5915)
Closes #4448

The 'ooba' special case in the caption-image route split the correctly
structured message (a single user message with a content array
containing text + image_url) into two separate messages, moving
image_url to a top-level property with an empty content array.

oobabooga's own multimodal image handling (modules/image_utils.py)
only looks for images inside content array items with
type: 'image_url', so this transformation caused the image to be
silently dropped, producing hallucinated or "I can't see an image"
captions - even though the request appeared to contain valid image
data.

Removing the special case lets 'ooba' use the same, already-correct
message structure as every other multimodal-capable API.

Verified against a local oobabooga (llama.cpp/GGUF loader) with a
vision-capable GGUF + mmproj pair: before the fix, captions ignored
the attached image; after the fix, captions accurately describe real
photos.

Co-authored-by: bbastex <bbastex@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-17 03:33:13 +02:00
Christoph 86b55c8696 Fireworks: Update model fetching because /v1/models is broken (#5831)
* Fireworks AI: Fetch model list from custom URL

Fireworks provides the model list on a custom URL in a custom format, see https://docs.fireworks.ai/api-reference/list-models. The standard /v1/models endpoint no longer works correctly and returns a wrong list of models:

```
Available models: [
  'accounts/fireworks/models/deepseek-v4-pro',
  'accounts/fireworks/models/flux-1-schnell-fp8',
  'accounts/fireworks/models/glm-5p1',
  'accounts/fireworks/models/glm-5p2',
  'accounts/fireworks/models/gpt-oss-120b',
  'accounts/fireworks/models/kimi-k2p5',
  'accounts/fireworks/models/kimi-k2p6'
]
```

Many new models like Deepseek V4 Pro, Kimi K2.7 Code are missing.

* Fireworks AI: Add "fast" models

Some models have a "fast" variant. The model list endpoint does not return this information, so for now the available fast versions are listed explicitly.

Fast models have the same parameters (max context etc.) as the regular ones. They are only faster and cost more.
2026-08-17 03:30:30 +02:00
Martin TibkeandMartin Tibke 1a7f88861d fix(tags): drop filters for tags with no assigned entities (#5911)
Filter lists only print tags that are assigned to at least one entity, so a
persisted filter on an unassigned tag has no element to toggle. "Clear all
filters" cannot reset it either, since it works by clicking the printed
elements. The result is a character list that stays empty on every app start,
showing only an "N characters hidden" notice with no visible cause.

removeMissingTagFilters() already dropped filters for deleted tags and for
empty open bogus folders (#5225). Generalize that check to any tag without
assigned entities, which covers plain tags as well, and clear the matching
account storage entry so the filter does not come back on the next reload.

Co-authored-by: Martin Tibke <martin@tibke.net>
2026-08-17 03:01:40 +02:00
WolfsblvtandClaude Fable 5 800caeb9e0 fix: skip extension folders without a manifest during discovery (#5934)
A manually deleted extension often leaves a folder husk on disk, for
example when Windows fails to remove locked .git files. The discover
endpoint listed any directory, so the husk kept reporting as an
installed extension: /extension-exists and /extension-state returned
true after a fresh load and the manifest fetch produced a 404 in the
console on every load. Discovery now skips folders without a
manifest.json and logs a warning naming the exact path, and the
client drops any discovered name whose manifest could not be loaded
so state queries cannot report ghost extensions.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 02:47:08 +02:00
f91050136c fix: show full Generic textgen model list in a select (#5897)
Browsers filter datalist suggestions to the current input value, so
Generic OpenAI-compatible text completion looked like a single model
while Chat Custom's select showed the full /v1/models list. Add an
Available Models select (select2 + reconnect) matching other textgen
backends, and keep the optional free-text Model ID field.

Co-authored-by: trahloc <trahloc@proton.me>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-17 02:21:11 +02:00
f199580102 fix: remove GroupId requirement from MiniMax TTS (#5920)
* Update TTS model from Gemini 2.5 to 3.1 in TTS Extension (#5778)

* Update TTS model from Gemini 2.5 to 3.1 in TTS Extension

Added New versions and new Default model

* Add glm-5.2 option to model selection dropdown

* fix: remove GroupId requirement from MiniMax TTS

MiniMax's current API (sk-cp- keys) uses Bearer auth only. GroupId
is a legacy parameter from the pre-2025 API that the current API
tolerates/ignores. Requiring it blocks new users from setting up
MiniMax TTS.

- Backend: drop groupId from required params and URL
- Frontend: remove Group ID input field and all validation checks

Fixes #5909

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Co-authored-by: Samueras <Samueras@jackoedv.de>
Co-authored-by: chen-jiying <chen-jiying@users.noreply.github.com>
2026-08-17 01:36:56 +02:00
eaf2858e43 fix: use exact ArrayBuffer slices for BYAF imports (#5917)
* Update TTS model from Gemini 2.5 to 3.1 in TTS Extension (#5778)

* Update TTS model from Gemini 2.5 to 3.1 in TTS Extension

Added New versions and new Default model

* Add glm-5.2 option to model selection dropdown

* Refactor file reading to use getArrayBufferSlice

* Update util.js

* Update util-pure.test.js

* test: add real-archive regression for BYAF pooled buffer handling

Builds an actual BYAF zip in memory, embeds it at an offset inside a
larger backing buffer to simulate Node's buffer pooling, and proves
through the real parser that the exact ArrayBuffer slice parses
correctly while the raw oversized backing buffer does not.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Co-authored-by: Samueras <Samueras@jackoedv.de>
Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 01:28:15 +02:00
1cfdcd82e1 fix: skip non-image ComfyUI outputs (#5910)
* fix: skip non-image ComfyUI outputs

* test: cover ComfyUI gif fallback and no-output error paths

Extends the skip-non-image regression with the gifs fallback that
animated workflows rely on and the error path when no output node
carries images or gifs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: CaoBochun <caobochun@bytedance.com>
Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 01:19:49 +02:00
7228502f0b Add Claude Opus 5 / Sonnet 5 and Gemini 3.7 Flash / 3.6 Flash / 3.5 Flash-Lite (#5883)
* feature: add Claude Opus 5, Sonnet 5, and Gemini 3.6 Flash / 3.5 Flash-Lite

Enable adaptive thinking and strip rejected sampling/prefill fields so the new models work with Chat Completions and Image Captioning.

* feature: add Gemini 3.7 Flash

Strip rejected sampling/prefill fields and map min thinking to low so the model works with Chat Completions and Image Captioning.

* feat: refresh Claude and Gemini model lists on top of Claude 5 support

Builds on the Claude 5 and Gemini wiring in this branch: removes
retired models from the Claude and Gemini dropdowns and captioning
lists (claude-opus-4-1 verified retired with a live 404; Gemini 2.0
experimental models, 2.5 preview snapshots, and gemini-3-pro-preview
are shut down per Google's model docs), labels deprecated models
without touching option values so saved selections keep working, adds
claude-fable-5 to the captioning list, and moves new-install defaults
to claude-sonnet-5 and gemini-3.7-flash. Claude 5 generation, vision,
web search, and effort mapping verified live against the API; the
trailing-prefill test now uses a plain loop so the tests lint passes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 01:10:28 +02:00
WolfsblvtandClaude Fable 5 4f6977b779 feat: verify GPT-5.6 support and refresh OpenAI model list (#5932)
Verifies Sol, Terra, and Luna live against the API: generation,
vision, effort values (none/low/xhigh), the unlisted gpt-5.6 alias,
and the sampler contract (temperature and top_p are rejected even
with reasoning off, so the strict stripping stays). Removes models
OpenAI has shut down from the model dropdowns, labels announced
deprecations without touching option values, orders groups newest
first, and moves the new-install and captioning defaults off
gpt-4-turbo, which shuts down on October 23, 2026.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 00:37:46 +02:00
6fea520309 Don't do a full chat reload from /addswipe (#5903)
* Don't reload chat from addswipe

* test: add /addswipe regression and harden e2e login helper

Covers both /addswipe modes through the real command pipeline:
swipe data, counters, visible text, and message element identity,
which a full chat reload would break. The login helper now tries
accounts from last to first so password-protected accounts don't
break local e2e runs, and the test waits out fresh-account
onboarding before measuring.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 00:13:30 +02:00
aca0684c0b Fix crash when a chat is deleted during a search/recent scan (#5871)
* Update TTS model from Gemini 2.5 to 3.1 in TTS Extension (#5778)

* Update TTS model from Gemini 2.5 to 3.1 in TTS Extension

Added New versions and new Default model

* Add glm-5.2 option to model selection dropdown

* Fix crash when a chat file is deleted mid-scan

getChatInfo() stats a chat file without handling ENOENT. If the file
is deleted (e.g. from the UI) while a search or the recent-chats list
is scanning the same directory, the stat throws, and since it's inside
new Promise(async (res) => {...}) with no reject wired up, it becomes
an unhandled rejection that kills the whole server process.

This catches ENOENT and resolves with { match: false } instead, same
as the fallback already used elsewhere in this function/its callers
for corrupted or unmatched entries.

* fix: handle all mid-scan chat deletion races in getChatInfo

The stat guard alone left the function unsound: it lived inside an
async promise executor, so a non-ENOENT error became an unhandled
rejection and the promise never settled. A file deleted between the
stat and the stream opening still crashed via an unhandled stream
error, which readline re-emits, and a file truncated to empty mid-scan
hung the request because the close handler never resolved.

getChatInfo now uses plain async/await up to the streaming part,
resolves a no-match sentinel when the file vanishes at either point,
resolves an empty object on truncation, and properly rejects
everything else. Comes with deterministic regression tests for each
race window.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Co-authored-by: Samueras <Samueras@jackoedv.de>
Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-16 23:51:08 +02:00
0x4kgi 54aedc8797 Add/enable low reasoning effort for Deepseek (#5924)
Also mapping min/minimum as low as it makes sense here.
2026-08-16 23:45:06 +02:00
b5cc683074 Update BFL generation and polling endpoints to api.bfl.ai (#5681)
* Fix BFL API endpoint and polling URL handling

* fix: send authentication header when polling BFL results

The bfl.ai API requires the x-key header on the polling request as
well; the retired bfl.ml API tolerated unauthenticated polling. Without
the header every poll returns 403 and generation never completes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-16 23:41:48 +02:00
WolfsblvtandClaude Fable 5 cd2c65c9d4 fix: await chat completion preset application when switching presets (#5930)
Applying a CC preset deferred the actual settings update behind an
unawaitable event continuation, so /preset resolved before the preset
was applied. A connection profile switch runs /api, /preset, /api in
sequence, and the preset's stored chat_completion_source would land
after the final /api check, reverting the source to the previous
provider. Requests then silently went to the wrong endpoint.

The preset application chain is now captured in a promise that
selectPreset awaits, so /preset resolves only when the preset is fully
applied and follow-up commands sequence correctly. The UI dropdown
path is unchanged, and callers that do not await selectPreset keep
the exact previous behavior.

Fixes #5926
Fixes #5147

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-16 23:21:01 +02:00
ed563cb7d8 fix: reject localhost and .localhost domains in /api/search/visit to prevent SSRF bypass (#5749)
* fix: reject localhost and .localhost domains in /api/search/visit to prevent SSRF bypass

The hostname check in /api/search/visit only validated IP addresses using
ipRegex, but did not block 'localhost' or subdomains ending in '.localhost'.
This allowed SSRF bypasses to internal services via localhost URLs.

Changes:
- Add explicit rejection of 'localhost' hostname
- Add rejection of any hostname ending in '.localhost' (RFC 6761 reserved)

Closes GHSA-wm7j-m6jm-8797

* fix: enforce SSRF boundary for /api/search/visit at connection time

The URL string checks only guard the literal input. Hostnames resolving
to private addresses, redirects into internal services, and DNS
rebinding all bypassed them. The visit endpoint now routes its outbound
request through a strict PrivateRequestAgent even when the private
request filter is disabled: the resolved IP is validated at connection
time on every hop and the connection is pinned to the validated IP.
When the private request filter is enabled its configured whitelist
keeps applying, and an enabled request proxy keeps owning routing.
Also rejects bracketed IPv6 literals, which kept their brackets and
slipped past the hostname check.

Fixes GHSA-wm7j-m6jm-8797

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-16 22:56:44 +02:00
WolfsblvtandClaude Fable 5 32e1966757 fix: require confirmation before overwriting chats with unparseable headers (#5928)
An existing non-empty chat file whose first line could not be parsed as a
JSON object passed the integrity check as if it were a legacy chat, so a
save silently replaced the file and only the replacement got backed up.
The check now fails closed for unparseable, truncated, or non-object
headers, routing the client into the existing overwrite confirmation
dialog. A UTF-8 BOM in front of an otherwise valid header is stripped
before parsing. Empty files, valid legacy headers, and force saves behave
as before.

Fixes #5454

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-16 22:23:29 +02:00
Frank Schubert 380e31e8c5 fix: fetch only current prompt from ComfyUI history endpoint (#5790)
The ComfyUI polling loop fetches /history every 100ms to check if the
current prompt has completed. This returns the entire history, which
grows unboundedly. After ~170 generations, the JSON response exceeds
Node.js's 512MB string length limit, crashing the server with:

  RangeError: Invalid string length

Fix by requesting /history/{id} instead, which returns only the single
prompt entry needed. This is a supported ComfyUI API endpoint that
returns the same data structure.
2026-07-12 00:43:10 +02:00
Tony Gies 46bd341ec1 perf(plugins): list plugin dirs without per-entry statSync (#5690)
updatePlugins called fs.statSync on every entry returned by readdirSync
just to test isDirectory(). Pass withFileTypes to readdirSync and filter
on the Dirent type instead. Symlinks are still treated as directories.
2026-07-12 00:31:20 +02:00
Tony Gies aaf12b4925 perf(util): read each file's mtime once when getImages sorts by date (#5689)
The previous date sort read file modification times while comparing
items, which meant stat'ing the same files over and over for one
listing. mtimes are now read once per file before sorting. Files that
disappear during the call (e.g. concurrent deletion) sort to the start
instead of crashing.
2026-07-12 00:25:22 +02:00
DeathStalker471andWolfsblvt c4672e953e chore: Sync NanoGPT providers: UOMI and Wafer (#5707)
* Sync Nanogpt providers again

* Sort providers alphabetically

---------

Co-authored-by: Wolfsblvt <wolfsblvt@gmail.com>
2026-07-12 00:21:37 +02:00
cloak1505 4259eb7220 Sync OpenRouter providers list (#5686) 2026-07-12 00:04:43 +02:00
DragonFSKY 0168803f41 Fix whitespace-only reasoning block controls (#5636)
* Fix whitespace-only reasoning block controls

* Fix duplicate hidden reasoning editor

* Fix hidden reasoning open state cleanup

* Add reasoning message edit regression tests
2026-07-11 23:54:25 +02:00
Wolfsblvt 2463e83966 Fix: remove trailing whitespace from variable macros (#5848)
- Restore root lint compliance for the variable macro registry.
2026-07-11 23:23:19 +02:00
Wolfsblvt 0a1a746bfd Fix: ignore local third-party extensions during linting (#5847)
- Keep root lint focused on core sources.
- Ignore local .windsurf IDE settings.
2026-07-11 23:22:56 +02:00