* 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
Co-authored-by: Samueras <Samueras@jackoedv.de>
"for 3rd party API customers: GET /user/information, GET /user/data, GET /user/subscription should now be called from https://image.novelai.net. The old URL will be non-functional in a couple of hours. The old URL is currently non-functional."
from NAI devs, this change has already been implemented from NAI side, no backward compat.
* Split Pollinations into two separate API providers: (Key) and (No Key)
- Replaces the single "Pollinations" source with two distinct entries:
- "Pollinations (Key)": uses gen.pollinations.ai/v1 with Bearer token auth,
supports BYOP OAuth flow with app key pk_Gu8Ta8q6QhS67hSg and manual key entry
- "Pollinations (No Key)": uses text.pollinations.ai/v1, no authentication required
- Renames CHAT_COMPLETION_SOURCES.POLLINATIONS to POLLINATIONS_KEY/POLLINATIONS_NOKEY
throughout the codebase (constants, endpoints, frontend scripts)
- Adds BYOP authorize button and OAuth callback handler for key-based source
- Updates all data-source attributes, secret key mappings, model selectors,
tool-calling, reasoning, slash-commands, caption, and SD extension references
https://claude.ai/code/session_01T57Cm84cv2GiSL4DPCccBj
* Fix POLLINATIONS_NOKEY: exempt from API key check, fix placeholder text
- Add POLLINATIONS_NOKEY to the keyless providers exemption in the
/generate endpoint's API key guard (was hitting the 400 check)
- Remove 'pk_...' from the key input placeholder since pk_ is the
app key used in the BYOP auth link, not the user's secret key
https://claude.ai/code/session_01T57Cm84cv2GiSL4DPCccBj
* Add Pollinations anonymous/authenticated endpoint selector
Implements reviewer feedback to use a single Pollinations provider with
an endpoint dropdown (similar to Z.AI) rather than two separate sources.
- Add POLLINATIONS_ENDPOINT enum (anonymous / authenticated)
- Anonymous uses text.pollinations.ai/v1, no API key required
- Authenticated uses gen.pollinations.ai/v1, requires sk_... key with BYOP OAuth support
- Key input and BYOP button are hidden when anonymous endpoint is selected
- Backend skips key guard for anonymous requests
- Reasoning effort and JSON schema only sent for authenticated mode
- Connection status check passes for anonymous without a saved key
https://claude.ai/code/session_01T57Cm84cv2GiSL4DPCccBj
* Fix broken Pollinations references after resolving merge conflicts
- Replace POLLINATIONS_KEY/NOKEY in CHAT_COMPLETION_SOURCES with POLLINATIONS
- Fix SECRET_KEYS.POLLINATIONS → SECRET_KEYS.POLLINATIONS_KEY in backend
- Update all chat_completion_sources references in openai.js to use unified POLLINATIONS
- Consolidate duplicate model select/change handlers into single pollinations_model
- Keep backward compat in caption-image handler for pollinations_key/nokey multimodal API
- Fix openai.js inline handler to route pollinations to correct endpoint based on endpoint field
https://claude.ai/code/session_01T57Cm84cv2GiSL4DPCccBj
* Complete Pollinations unification: remove all pollinations_key/nokey splits
- Fix committed merge conflict in openai.js (Wolfsblvt review)
- Replace POLLINATIONS_KEY/NOKEY in chat_completion_source dropdown with single POLLINATIONS option
- Replace pollinations_key,pollinations_nokey in all data-source attributes with pollinations
- Merge duplicate /pollinations_key and /pollinations_nokey multimodal routes into single /pollinations
- Update caption extension: single "Pollinations" option using pollinations_endpoint from oai_settings
- Update slash-commands.js model selector to single pollinations entry
- Clean up caption-image handler (openai.js) to use only 'pollinations' api type
- Pass pollinations_endpoint in caption request body (shared.js)
- Add settings migration: pollinations_key → pollinations, pollinations_nokey → pollinations (anonymous)
https://claude.ai/code/session_01T57Cm84cv2GiSL4DPCccBj
* Address Cohee review: named constants, mock key, revert POLLINATIONS_KEY rename, default to authenticated
- Use POLLINATIONS_ENDPOINT named constants throughout (no magic 'anonymous' strings)
- Use mock key pattern (set key to POLLINATIONS_ENDPOINT.ANONYMOUS value) so no guard exception needed
- Revert POLLINATIONS_KEY rename back to POLLINATIONS in secrets.js files
- Default pollinations_endpoint to AUTHENTICATED so saved keys aren't bypassed
- Remove redundant isPollinationsAnon check from getReasoningEffort() (backend handles it)
- Unify tool-calling.js, caption, shared, stable-diffusion to single POLLINATIONS source
https://claude.ai/code/session_01T57Cm84cv2GiSL4DPCccBj
* Fix ESLint padded-blocks error in BYOP OAuth callback
https://claude.ai/code/session_01T57Cm84cv2GiSL4DPCccBj
* fix: regression in caption API validation
* fix: remove unneeded migration
* fix: remove duplicate keyless check in apiSourceConfig
* fix: regression in extractReasoningFromData
* refactor: simplify UI unhide logic
* fix: remove BYOP flow due to security concerns
* fix: use a string instead of a constant reference for placeholder key
* fix: reconnect when switching endpoints
* feat: support pollinations in /api-url command
* fix: remove endpoint check from image generation (it always uses authenticated)
* fix: default to authenticated
* fix: use a named constant in auto-connect logic
* fix: filter by modality in anon models list
* fix: remove bespoke model loading logic for anon endpoint
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
* feat(core): add MessageFormatter pipeline for extension message hooks
Introduces a new MessageFormatter singleton class (public/scripts/message-formatter.js)
that allows extensions to transform message text at well-defined stages of the
messageFormatting() pipeline, before the result reaches the DOM.
The pipeline exposes three hook stages (all before DOMPurify sanitization):
- BEFORE_REGEX -- raw Markdown, before custom regex rules
- AFTER_REGEX -- plain Markdown, after regex, before showdown conversion
- AFTER_MARKDOWN -- rendered HTML, after showdown, before sanitization (default)
There is intentionally no post-sanitize stage to prevent XSS vectors.
Extensions register hooks via getContext().messageFormatter.addHook(fn, { stage, order }).
Stage and order enums (formatting_stage, hook_order) are re-exported on the
singleton instance itself so extensions need no additional imports beyond getContext().
The formatter also exposes a .format() shim over messageFormatting() for
convenience. messageFormatting() itself gains full JSDoc documentation.
* feat(core): add pipeline documentation to MessageFormatter.format()
Adds detailed JSDoc documentation to the MessageFormatter.format() method
describing the complete 11-step message formatting pipeline, from prompt-bias
stripping through DOMPurify sanitization. Clarifies that all extension hooks
(beforeRegex, afterRegex, afterMarkdown) run before sanitization to ensure
their output is always sanitised.
* feat(core): add async detection and non-string return guards to MessageFormatter
Adds runtime and registration-time safety checks to the MessageFormatter hook system:
- Throws TypeError at registration if an async function is passed to addHook()
- Emits console warning and ignores return value if a hook returns non-string at runtime
- Detects Promise returns and includes helpful hint that hook may be async
- Updates JSDoc to clarify synchronous string return requirement and error conditions
* test(frontend): add comprehensive e2e tests for MessageFormatter
Adds full test coverage for the MessageFormatter singleton class including:
- Module exports validation (formatting_stage, hook_order enums)
- Singleton instance constant re-exports
- Registration validation (rejects non-functions, async functions, unknown stages)
- Hook execution pipeline (stage isolation, order sorting, context freezing)
- Error handling (continues on throw, warns on non-string/Promise returns)
- Stage injection
* refactor(core): rename ch_name parameter to characterName in MessageFormatter
Renames the `ch_name` parameter to `characterName` throughout MessageFormatter for improved code clarity and consistency with modern naming conventions. Updates JSDoc typedef and method signatures.
* fix: handle scoped comment macro closing tag tokenization edge case
The lexer greedily tokenizes '//' before '/', causing {{///}} to parse as {{// /}} instead of {{/ //}}. Added special case detection in MacroCstWalker to check if the comment macro's first argument starts with '/' and treat it as a closing block. Removed list/strictArgs flags from comment macro definition and added comprehensive e2e tests for scoped comment blocks.
* refactor: DRY, remove unneccessarily duplicated private extractMacroInfo
* feat: enhance world info sorting with ascending/descending modes and animation
- Add autoFocus property to popup inputs with autofocus attribute and tabIndex
- Add slide animation to setInfoBlock/clearInfoBlock with configurable animate option
- Replace simple input prompt with detailed popup for applying current sorting
- Add ascending/descending order toggle for world info entry sorting
- Add configurable step value between order assignments
- Add real-time warning when starting value is below
* fix: improve world info sorting warning to account for step value
- Update warning calculation to consider step size when detecting order collisions
- Add step input parameter to updateWarning function
- Attach input listener to step field for real-time warning updates
- Display more detailed warning message showing the calculated final order value
Temporarily commented out Filter.Pipe and Filter.EscapedPipe token handling in MacroLexer to fix issue where pipe characters in argument values (e.g., {{setvar::foo::|bar}}) were incorrectly parsed as filter operators. Added regression tests for pipe handling in argument values and skipped existing output modifier tests until filter flag (>) logic is properly implemented.
Resolves: #5618
When a textarea is removed from the DOM before the autocomplete
clone-positioning logic runs, parentElement is null and
MutationObserver.observe throws. This can happen when extensions
abort generation early (via generate_interceptor) and the textarea
is torn down before autocomplete finishes setup.
Add a null check so the observer is only attached when the parent
still exists.
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* fix mislabelled popup for "Replace existing Quick Reply Set"
it currently provides a popup asking for confirmation "Replace existing World Info" when user tries to create a new QR Set with an existing name.
Checked that it does not conflict/reuse anything from the actual world info screen.
* capitalisation
* Add message indicating that the 'Request mode reasoning' checkbox
controls whether reasoning is generated at the source, for Deepseek API.
* Added zai and moonshot to conditions for showing message indicating reasoning is enabled/disabled by 'request model reasoning' toggle..
* Added new message indicating openrouter's behaviour when 'request model reasoning' setting is disabled.
* fix: grammar
* fix: duplication for openrouter
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* update: improve fetching of selected default expression
It includes the fallback values #emoji and #none.
* update: allow expression-list to filter custom expressions
It can allow, filter out, or only include custom expressions in the result.
* update: separate getLastExpression from the slash command to use on macros
* feat: register defaultExpression macro
It will fetch the label of the currently selected global fallback expression.
* feat: register lastExpression macro
It will return the last expression used by the selected character.
* feat: register availableExpressions macro
Returns a list of all expressions provided by the Classifier API.
* update: fix macros labels
* update: normalize return label for defaultExpression macro
* Fix - Typos
* Update - Add compatibility with old macro engine
* Fix - Remove redundant structuredClone
* Update - Consider sprite folders to fetch the last expression used
* Update - Improve last message handling when name is provided
* Fix - Update description of getLastCharacterMessage
* Update - Bring back using active character as fallback for groups
Just weighted that if no name is provided, doing fallback to the active character generating prompt is more useful for groups than grabbing the expression used by another character, after randomly removing that prev commit.
* Fix personal lore stale update on rename (#5628)
* Add test for rename persona lore
Co-authored-by: Copilot <copilot@github.com>
* Fix stale update on personal lore rename
Co-authored-by: Copilot <copilot@github.com>
Given the recent work to fix#5610, this is a continuation to fix a
similiar bug in the persona lore.
* Add newline for linter check
---------
Co-authored-by: Copilot <copilot@github.com>
* feat: update links for other personas
---------
Co-authored-by: Unnatural Developer <40277404+unnaturaldeveloper@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
* Add test to reproduce chat lore bug
Co-authored-by: Copilot <copilot@github.com>
Given that I wanted to reliably reproduce the bug, I created a playwright Docker container as part of this commit, along with the applicable unit test. The included docker-compose includes an environment variable that is passed for use by the frontend test harness, default to the host that the playwright and the ST instance containers are running on.
* Fix stale chat bound lore name after rename
Co-authored-by: Copilot <copilot@github.com>
Given the function renameWorldInfo and the resulting call to updateWorldInfoLinks, this fix ensures that if the world_info key in the chat_metadata is still set to the old name, it will be updated to the name
Resolves: #5608
* Start to separate test runner from branch
Given the bug fix for #5608 should be separate from the test runner
compose file, this commit removes the file from the branch associated
with the bug fix.
* Fix frontend test setup to check for login page
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* Make change to eslint configuration
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Given the updates to the setup of frontend-utils, configure eslint to
recognize browser and jquery specific globals
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* feat: add allowBaseName option to getUniqueName utility function
* feat: simplify getUniqueName by removing allowBaseName option and changing default startIndex to 0
* fix: remove the cloned directory if it contains no manifest
* fix: apply feature flag guard to user extension data hosting
* fix: disable inactive controls when feature flag is off
* fix: change response status to 404
* feat: add user account version to session cookie
Co-authored-by: Copilot <copilot@github.com>
* feat: include user handle in account version hash calculation
* feat: refactor recovery code generation to use a dedicated function
* fix: don't overwrite current session version if updating another user
Co-authored-by: Copilot <copilot@github.com>
* fix: reset session version instead of nullifying the entire session
* fix: short circuit and clear cookie on request invalidation
Co-authored-by: Copilot <copilot@github.com>
* fix: update account version on recovery
---------
Co-authored-by: Copilot <copilot@github.com>
* Update - Turn expression-set-fallback into expression-fallback
Make the extension a getter and setter instead of a setter only.
* Update - Rewrite the help string and add usage examples
* Fix - Remove the alias
* Feat - Add expression-set-fallback slash command
* Fix ESLint
* Fix - Use proper name convention for slash command method
* Fix - Change misleading expression-set-fallback help string label
* Fix - Use normal description for expression label argument
* Update - Make expression-set-fallback case unsensitive
Also fixed array creation by removing the spread syntax and added warning.
* pass jsonSchema options through sendStreamingRequest in Generate
* translate json_schema to response_format for CUSTOM chat completion source
* pass jsonSchema through generateGroupWrapper params in group chat generation
* feat: enhance asset management with extension categories
Co-authored-by: Copilot <copilot@github.com>
* fix: enhance extension name validation in server endpoints
* feat: display extension author in the extensions list
* fix: unify server error response format
Co-authored-by: Copilot <copilot@github.com>
* feat: add splash on installing third-party for the first time
* fix: add URL format validation, unify validation error messages
Co-authored-by: Copilot <copilot@github.com>
* fix: apply object freeze to EMPTY_AUTHOR value
Co-authored-by: Copilot <copilot@github.com>
* fix: typecheck extensionName in API requests
Co-authored-by: Copilot <copilot@github.com>
* feat: add feature flag guard to extensions endpoints
Co-authored-by: Copilot <copilot@github.com>
* fix: parse URL before checking
Co-authored-by: Copilot <copilot@github.com>
* fix: use case insensitive regex check
* fix: make debug log more useful
Co-authored-by: Copilot <copilot@github.com>
* fix: add pre-validation of URL format and protocol
Co-authored-by: Copilot <copilot@github.com>
* fix: leaner installation success toast
* fix: settings data loss when extensions are disabled
* fix: don't try to auto-focus elements that don't exist
Co-authored-by: Copilot <copilot@github.com>
* fix: set Popup.defaultResult to negative
Co-authored-by: Copilot <copilot@github.com>
* revert: restore undefined default result
---------
Co-authored-by: Copilot <copilot@github.com>