Commit Graph

1989 Commits

Author SHA1 Message Date
Timothy Carambat
9fe6bbfb09 v1.13.0 release (#5693) v1.13.0 2026-05-26 12:04:13 -07:00
Timothy Carambat
f45d0555ce refactor Prompt to not block main chat content (#5691) 2026-05-23 16:02:49 -07:00
Timothy Carambat
28e496bed7 hide invalid integrations when disabled in mulit-user mode resolves #5688 2026-05-23 15:39:57 -07:00
Timothy Carambat
857c2fce0b update placeholder, update LMStudio failover
resolves #5689
2026-05-23 15:28:01 -07:00
Timothy Carambat
5981d482f3 router-models: accurate token/message counting for model router decisions (#5680)
* fix: accurate token/message counting for model router decisions
Previously the router only counted tokens from the current user message,
ignoring system prompt, chat history, pinned docs, and parsed files.
Introduce ModelRouterService.gatherRoutingContext() to compute the true
conversation token count and reuse the fetched context downstream to
avoid redundant DB/filesystem lookups.
Also adds model router support to the OpenAI-compatible and API chat
handlers, propagates usageMetrics through ephemeral agents, and fixes
the router input to use the attachment-injected message.

* fix /chat API counter

* count current message in message count for router

* add router handler everywhere these is getLLMProvider

* router logic overhaul and refactor

* fix tests

* fix logger

* support generic openAI auto-detection for dropdown in model rules provider - fails over to plaintext input
2026-05-22 18:21:34 -07:00
Timothy Carambat
2f189f9703 bump docker run in HOW_TO_USE_DOCKER 2026-05-22 14:56:27 -07:00
Timothy Carambat
df4fea22f8 Migrate slash commands to admin user on multi-user-mode (#5684)
migrate slash commands to admin user on multi-user-mode
2026-05-22 09:44:56 -07:00
Timothy Carambat
ef06f33c6a stop AI GHSA spam for the same fucking issue holy shit 2026-05-22 09:18:10 -07:00
Timothy Carambat
a4e7595a41 prevent contextualsavebar from showing on toggle of clarifying questions 2026-05-21 09:22:35 -07:00
Timothy Carambat
315391c04c better Gemini errors 2026-05-21 08:31:37 -07:00
Marcello Fitton
755b4da141 Agent Skill: User Survey (#5577)
* initialize feature

* lint

* fix stale comment

* fix number input

* remove needless condition

* add survey persistence

* add clarifying uestions buffer to aibitat instance with helper methods

* move plugin specific config data away from aibitat instance and into plugin itself

* create useTimeoutProgress hook

* ui refactor

* change [skipped] to [user skipped]

* implement designs

* add agent settings clairfying questions translations

* prompting

* refactor UI
fix issue where text input still submits on skip if anything typed
multi-choice selection not persisting
regen overwriting prompt

* simplify components, translations, agent settings menu

* remove timeout config functionality
replace number inputs with real number inputs?

* rename skill/plugin

* remove i18n

* 5577 i18n (#5669)

connect #5577

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-05-20 22:32:43 -07:00
Sean Hatfield
4e324105bb Model router (#5324)
* add model router backend: schema, models, API, evaluator, provider, and cooldown

* add model router frontend: settings pages, workspace integration, rule builder with DnD, and system LLM support

* add routing indicator, new rule types, and UX improvements for model router

* add provider credential validation to model router and fix icon alignment

* add llm classifcation rules for model router

* lint

* add vision routing, agent support, and configurable cooldown to model router

* add english translations for model router

* move isPathMatch to path utils

* fix model router sticking to first model in agent mode

* make model router notifications ephemeral and add CSV rule support

* improve model route notification ux and fix agent image routing

* split RuleForm into subcomponents

* extract RuleRow subcomponent and move ModalWrapper to NewRouterModal

* remove /admin prefix from model router endpoints

* use single query for model router list endpoint

* clean up model router error handling and http methods

* refactor model router rule update method and fix stale error field names

* add model router env vars to .env.example

* update fallback model description to mention llm rule classification

* fix model router rule row alignment and badge readability

* Model Router: Multi-condition rules, updated designs, and router edit support (#5478)

* Implement draft designs

* add matches comparator for prompt content

* implement multi conditional to a calculated rule

* fix between comparator

* restyle model router modals to match light mode designs

---------

Co-authored-by: shatfield4 <seanhatfield5@gmail.com>

* replace model route spinner with webm animation

* route llm classifier through aibitat tool call

* fix: rule form state not resetting when making new rules

* rename router form to rules page + fix and/plus button styles

* add telemetry for model router creation

* fix x button alignment on rule condition rows

* simple UI changes

* fix router

* Refactor model routing into singleton with sticky routes and LLM caching

Consolidate router/index.js, router/deterministic.js, and router/cooldown.js
into a single ModelRouterService singleton class that manages all routing state.

Key changes:
- Sticky model routing: once a rule matches, the model stays active for
  follow-up messages that don't match any rule (e.g., "tell me more"),
  preventing unwanted bouncing back to the fallback model.
- LLM classification cache: expensive LLM classifier calls are cached for
  the full sticky window (default 5 min), running at most once per window.
- Calculated rules always re-evaluate (they're instant), so topic shifts
  that match a different rule still route correctly.
- Route notifications only fire when the model actually changes, not on
  every message.
- Router config is cached in-memory and invalidated on CRUD operations.
- Detailed logging for cache hits/misses/expiry and rule evaluation.

* fix model router notification text to be i18n

* prevent history overwrite on regen

* fix in-processing post-routed chat spacing in UI

* reset router on thread reset

* update translation key

* refactor route name label on chat history

* use system LLM on new model router

* frontend modular cleanup

* fix UI/UX on how rules are shown

* rule builder translations

* translations

* endpoint cleanup

* refactor rules

* fix router translation for no rule
remove from default plugins
port support for model router to ephemeral

* simplify stream handler

* do not route notify on first message (non-agent chat)

* fix cache keys

* ttl reset on followups

* Differentiate between short TTL and long TTL when we actually have run an LLM eval route

* port embed support for router option

* frontend fixes

* dynamic key

* 5315 i18n (#5666)

* translations

* norm

* readme entry

* update comments

---------

Co-authored-by: Marcello Fitton <106866560+angelplusultra@users.noreply.github.com>
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-05-20 17:16:02 -07:00
Timothy Carambat
e1035dec79 Merge branch 'master' of github.com:Mintplex-Labs/anything-llm 2026-05-20 17:02:40 -07:00
Timothy Carambat
94ed62d320 fix for GHSA-6hrp-7mw6-8v59 2026-05-20 17:02:33 -07:00
Sean Hatfield
d348b17449 Workspace deletion protection (#5662)
* add WORKSPACE_DELETION_PROTECTION env flag to disable workspace deletion from UI and APIs

* minor nits

* patch test for phrase

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-05-20 08:53:00 -07:00
Timothy Carambat
b4a68c6910 add memories 2026-05-19 21:00:51 -07:00
Sean Hatfield
bd7d30a96d feat: Memories/Personalization (#5269)
* add memory storage layer with model, endpoints, schema, and system setting

* add memory extraction background worker

* handle single-user and multi-user mode for memory extraction

* add memory injection and personalization ui

* lint

* personalization UI polish, fix RBAC for all roles, and endpoint guards

* split admin personalization page into subcomponents

* split admin personalization page into subcomponents, use early return instead of ternary for readability

* make error responses consistent in memory endpoints

* consolidate duplicate MemoryItem into shared component

* skip memory reranking when no query context is available

* extract promptWithMemories util to deduplicate memory injection

* add english translations

* refactor memory api routes to eliminate ambiguous path params

* make memory extraction interval and idle threshold configurable via env vars

* add hint to memory form input

* inline personalization content in admin settings page

* consolidate unprocessed chat queries into single fetch

* simplify personalization page with early returns and layout subcomponent

* add memories sidebar with chat settings menu redesign

* remove legacy personalization ui

* split MemoriesSidebar into subcomponent folders

* fix memory card menu spacing to match design

* fix memories visibility for non-admin users

* add english translations for memories sidebar ui

* add workspace access checks to all memory endpoints

* pass user prompt to agent getDefinition for memory reranking

* check idle threshold per user/workspace group instead of globally

* use factory pattern for i18n text sizes and replace Trans with plain t() keys

* add placeholder examples and format guidance for manual memory creation

* remove stale comment

* refactor chat menu

* refactor sidebar to use provider and simplified DOM rendering

* fix memories sidebar overflow from long workspace names, widen memories options menu

* fix edit memory modal cursor landing at start of input

* hide memory add/move actions when at limit

* revert scope of workspace settings route changed for first pass of memories ui

* jsdoc memory model methods, drop redundant error logs

* inline error response returns and move body validation after perms in memory endpoints

* run memory fetches concurrently in list endpoint and prompt injection

* jsdoc server memory model methods

* normalize memory_enabled to true/false and add SystemSettings helper

* extract memory ownership middleware, strip redundant .end() calls

* use validWorkspaceSlug middleware for memory endpoints, switch to slug-based urls

* add description to memories util

* simplify memory ownership middleware to single db query

* use aibitat tool call for memory extraction, add chat safety limits

* truncate per-chat prompt/response before memory extraction

* add input validation to memory model

* validate ids array input in markMemoryProcessed

* inline memory injection in chatPrompt and systemPrompt

* make memory migration additive and drop unused sourceThreadId

* normalize translation files

* reset translations, minor nit

* refactor consts, extract memories with outputs

* set intervla

* sync

* rearch how memory extract works by moving to Observer/Reflector pattern (Mastra aspect)

* remove timeout on load

* Feat/memory i18n (#5661)

translations for #5269

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-05-19 17:24:18 -07:00
Timothy Carambat
0579a86814 Embed logos in docker prod build (#5660)
* embed logos in docker build

* forgot assets
2026-05-19 15:00:25 -07:00
Timothy Carambat
779b6cf3d8 Support pulling generated documents from API calls (#5658)
* support pulling generated documents from API calls

* revert async wait

* fix strictness of packMessages to handle streaming chunks but keep functionality
2026-05-19 14:25:14 -07:00
Timothy Carambat
9d714f95c1 Update DeviceTokens to already-admin user on MUM migration (#5655)
resolve GHSA-h349-hp2v-8rhw
2026-05-19 11:29:55 -07:00
Timothy Carambat
2d61397222 Support reasoning content in v2 stream handler (#5654)
* refactor LMStudio for reasoning_content
closes #5584
resolves #5583

* Lemonade stream/completion reasoning optional via v2 change
resolves #5585

* migrate Deepseek and GiteeAI
2026-05-19 11:17:02 -07:00
Sean Hatfield
5b2808e5b1 fix: prevent gemini agent 400s from parallel tool calls (#5630)
fix: disable parallel tool calls for gemini agent provider

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-05-18 18:51:32 -07:00
Daniel Dutra
b5f138fe55 feat: adding MiniMax LLM provider (#5450)
* add MiniMax LLM provider support

* add MiniMax LLM provider to the docs

* fix: add trailing newlines for lint compliance

* add env vars to system settings | make max tokens configurable via ui | pass max tokens into minimax llm provider

* change fallback max tokens value to null to use provider default | pass max tokens into handleFucntionCallStream and chat

* add minimax to getModelTag switch

* pass provider into tooledStream and tooledComplete

* remove max tokens param

* update image

---------

Co-authored-by: angelplusultra <macfittondev@gmail.com>
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-05-18 13:20:57 -07:00
Sean Hatfield
26a81a2665 fix: auto-speak not playing in agent mode (#5595)
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-05-18 12:56:02 -07:00
Timothy Carambat
b4d5892bd4 Merge branch 'master' of github.com:Mintplex-Labs/anything-llm 2026-05-16 14:20:10 -07:00
Timothy Carambat
d3510d8bd4 norm symlink fix from GHSA-vjrp-43mm-j7vw to directories. resolves #5642 2026-05-16 14:20:03 -07:00
markov12
b1e5b6f961 fix: add font fallback for form controls (#5618)
* fix: add font fallback for form controls

* fix: restore complete index.css with font fallback

* move to end and mark important

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-05-13 16:17:56 -07:00
Timothy Carambat
a49959621a stringify uuid for embed 2026-05-12 14:39:27 -07:00
Timothy Carambat
b1ad553b9e build from https://github.com/Mintplex-Labs/anythingllm-embed/pull/16 2026-05-11 20:28:41 -07:00
Timothy Carambat
a6076d5ce0 build from https://github.com/Mintplex-Labs/anythingllm-embed/pull/17 2026-05-11 17:54:00 -07:00
Asish Kumar
720ea69929 feat: allow configurable collector port (#5607)
* feat: allow configuring collector port

* refactor

* persist collector save in prod

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-05-11 17:29:01 -07:00
Asish Kumar
b90aa12b66 fix: scope thread options hover state (#5606)
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-05-11 17:05:35 -07:00
Timothy Carambat
12f4a263ba sync build from embed changes in https://github.com/Mintplex-Labs/anythingllm-embed/pull/18 2026-05-11 12:48:27 -07:00
Timothy Carambat
21ce030871 apply refactor for recursive copy-file with symlinks: GHSA-vjrp-43mm-j7vw 2026-05-10 13:11:33 -07:00
Marcello Fitton
ce900cb517 fix: tools popover overflowing screen on small viewports (#5549)
* fix tools popover from expanding beyond screen height limits

* fix max height clamp | remove unneeded useLayoutEffect dependency

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-05-01 17:27:33 -07:00
Sean Hatfield
2c82e9df5f fix: SPA nav for thread/workspace switching (#5528)
* fix: white flash when switching between threads

* nest thread route under workspace

* fix: white flash when switching between workspaces

* simplify Link usage in workspace/thread sidebar items

* smooth workspace and thread switching

* fix race condition on send during thread/workspace switch

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-05-01 17:09:40 -07:00
Marcello Fitton
7ea6196570 Fix Community Hub import page responsiveness on narrow widths (#5544)
* make community hub import page responsive | fix top border bug

* fix top border bug

* fix layout shift

* remove bg to keep designs in spec

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-05-01 16:01:09 -07:00
Gopal Bagaswar
7d884c7863 fix(tts): strip Markdown syntax before sending text to TTS engines (#5560)
* fix(tts): strip Markdown syntax before sending text to TTS engines

Chat responses are rendered as Markdown but the TTS components piped the
raw response into Piper / the browser's `SpeechSynthesis` API. The
synthesizer reads every special character literally — `**bold**` becomes
"asterisk asterisk bold asterisk asterisk", `# Heading` becomes "pound
heading", code fences are read backtick-by-backtick, and bullet lists
become "hyphen item". The result is unintelligible whenever the assistant
includes any formatting, which is most of the time.

This commit adds a small `messageToSpeech` helper that converts a
Markdown chat message into plain text suitable for TTS:

- fenced code blocks and images are dropped (nothing useful to read)
- inline code and link labels keep their text content
- emphasis markers, headings, blockquote markers, list markers, and
  horizontal rules are stripped while preserving the underlying words
- HTML tags are removed but their text content kept
- table pipes become commas so rows read naturally

The helper is regex-based — no new dependency — and is wired into both
the native (`SpeechSynthesis`) and Piper TTS components in
`WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/Actions/TTSButton`.

Closes #5557.
---
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-05-01 12:44:19 -07:00
Timothy Carambat
667db6d13b update scheduled job continue CTA (#5558) 2026-04-29 16:27:55 -07:00
Sean Hatfield
b2285180af Auto-rename thread in agent mode (#5550)
auto-rename thread in agent mode

Made-with: Cursor
2026-04-29 12:33:42 -07:00
Sean Hatfield
b5a72eb62e Rename auto mode to agent mode (#5551)
* update auto mode to agent

* auto-translate agent mode title for all locales

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-04-29 12:23:15 -07:00
Marcello Fitton
41495cdabe feat: Scheduled Jobs (#5322)
* initialize

* expand tool result text limit | add syntax highlighting and json formatting to tool result rendering

* fix onError jsdoc

* lint

* fix unread icon

* route protection

* improve form handling for NewJobModal

* safeJsonParse

* remove unneeded comments

* remove trycatch

* add truncateText helper

* add explicit fallback value tos safeJsonParse

* add shared cron constant and helpers

* reduce frontend indirection

* use isLight to compute syntax highlighting theme

* remove dead code

* remove forJob and make job limit to 50

* create recomputeNextRunAt helper method

* add comment about nextRunAt recomputation

* add job queue and concurrency control to scheduled jobs

* use p-queue

* change default max concurrent value to 1

* add comment explaining internal scheduling system

* add recomputeNextRunAt on boot

* add generated documents to run details

* Modify toolsOverride functionality where no tools selected means no tools are given to the agent

add a select all/deselect all toggle button for easily selecting all
tools in the cerate job form

* create usePolling hook

* add polling to scheduled jobs and scheduled job runs pages

* add cron generation feature in job form

* remove cron generation feature | add cron builder feature | add max active scheduled jobs limit

* set MAX_ACTIVE to null

* replace hour and minute input fields with input with type time

* simplify

* organize components

* move components to bottom of page component

* change Generated Documents to Generated Files

* add i18n to cronstrue

* add i18n

* add type="button" to button elements

* refactor fileSource retrieval logic

* one scheduled job run can have status "running"

* add protection of file retrieveal from scheduled job in multiuser mode

* fix comments

* make job status default to queued

* add queued status

* fix bug with result trace rendering

* store timeout ref and clearTimeout once race settles

* remove unneeded handlerPromise tracking

* move imports to top level

* refactor hardcoded paths to path resolve functions

* implement new job form design

* simplify

* fix button styles

* fix runJob bug

* implement styles for scheduled jobs page

* apply dark mode figma styles

* delete unused translation key

* implement light mode for new new job modal, run history, and run details

* lint

* fix light mode scroll bar in tool call card

* adjust table header contrast

* fix type in subtitle

* kill workers when job is in-flight before deleting job

* add border-none to buttons

* change locale time to iso string

* import BackgroundService module level | instatiate backgroundService singltone once and reuse across handlers

* add p-queue, @breejs/later and cron-validate as core deps

* parse cron expression to a builder state once

* add theme to day buttons in cron builder

* fix stale tools selection caption

* flip popover when popover clips screen height

* make ScheduleJob.trigger() await the run insertion | disable run now button if job is in flight

* regen table

* refactor generated file card

* refactor frontend

* remove logs

* major refactor for tool picking, fix bree/later bug

* combine action endpoints, move contine to method

* fix unoptimized query with include + take + order

* fix dangerous use, refactor job to utils

* add copy content to text response

* improve notification system subscription for browser

* remove unused translations

* prevent gen-file cleanup job from deleting active job file generated references

* rich text copy

* Scheduled Jobs: Translations (#5482)

* add locales for scheduled jobs

* i18n

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>

* add config flag with UI notice

* update README

* telemetry datapoints

* Always use UTC on backend, convert to local in frontend

* fix tz render

* Add job killing

* cleanup thinking text in job notifications and break out reasoning in response text.
Also hide zero metrics since that is useless

* Port generatedFile schema to the normalized workspace chat `outputs` file format so porting to thread is simple and implem between chats <> jobs is 1:1

* what the fuck

* compiled bug

* fixed thinking oddity in complied frontend

* supress multi-toast

* fix duration call

* Revert "fix duration call"

This reverts commit 0491bc71f4.

* revert and reapply fix

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-04-29 12:05:46 -07:00
timothycarambat
02c2db4ee3 Update Sponsors README 2026-04-29 12:40:43 +00:00
Timothy Carambat
b5f29f6dca Normalize lemonade embedder error handling (#5547)
closes #5318
resolves #5305
2026-04-28 10:59:14 -07:00
Petre Ghita
c8113aa188 fix: support OpenShift arbitrary UID/GID-0 in Docker image (#5136)
* fix: support OpenShift arbitrary UID/GID-0 in Docker image

Made-with: Cursor

* move to community

---------

Co-authored-by: Petre Ghita <petre.ghita@asset-metrix.com>
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-04-28 10:10:27 -07:00
Sean Hatfield
5eb9842533 Fix double /reset in agent mode (#5516)
fix double /reset in agent mode

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-04-28 09:50:22 -07:00
Chris Z
ae9960b8ba fix(agent): check auto-approved skills env correctly (#5511)
* fix(agent): check auto-approved skills env correctly

* remove file

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-04-28 09:29:46 -07:00
Timothy Carambat
2029f90b42 fix priority for workspace sidebar items that are unclear. Resolves #5502 2026-04-24 15:52:37 -07:00
Timothy Carambat
7ead0449f2 Fix deepseek v4 reasoning inject thoughts (#5527)
* Fix deepseek v4 injectReasoning error
resolves #5509

* comment
2026-04-24 15:40:05 -07:00
Timothy Carambat
bde72505ff Remove default models to show empty until real models are retreieved (#5524)
resolves #5505
Fix placeholder
resolves #5503
resolves #5522
2026-04-24 15:13:57 -07:00