931 Commits

Author SHA1 Message Date
Neha Prasad
09d2161476 fix(lemonade): throw on embedding failures instead of returning empty (#5325)
* fix(lemonade): throw on embedding failures instead of returning empty vectors

* use class logger

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-04-02 14:57:54 -07:00
Sean Hatfield
b9f0d98345 Redesign Telegram bot settings UI (#5306)
* redesign telegram bot settings ui/refactor ui components

* fix positioning of user row

* move ConnectedBotCard to subcomponent

* fix redirect

* remove redundant guard

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-03-31 13:34:59 -07:00
Timothy Carambat
3934b1a585 show links in /proof on TG 2026-03-31 13:22:21 -07:00
Timothy Carambat
e1ad9080de Automatic mode is now default 2026-03-31 13:11:46 -07:00
Timothy Carambat
ddc89851fa Merge branch 'master' of github.com:Mintplex-Labs/anything-llm 2026-03-30 21:47:13 -07:00
Timothy Carambat
77d42e6564 add batching Intelligent Tool Selector for performance and scoring 2026-03-30 21:47:07 -07:00
Timothy Carambat
7aaea7f514 File creation agent skills (#5280)
* Powerpoint File Creation (#5278)

* wip

* download card

* UI for downloading

* move to fs system with endpoint to pull files

* refactor UI

* final-pass

* remove save-file-browser skill and refactor

* remove fileDownload event

* reset

* reset file

* reset timeout

* persist toggle

* Txt creation (#5279)

* wip

* download card

* UI for downloading

* move to fs system with endpoint to pull files

* refactor UI

* final-pass

* remove save-file-browser skill and refactor

* remove fileDownload event

* reset

* reset file

* reset timeout

* wip

* persist toggle

* add arbitrary text creation file

* Add PDF document generation with markdown formatting (#5283)

add support for branding in bottom right corner
refactor core utils and frontend rendering

* Xlsx document creation (#5284)

add Excel doc & sheet creation

* Basic docx creation (#5285)

* Basic docx creation

* add test theme support + styling and title pages

* simplify skill selection

* handle TG attachments

* send documents over tg

* lazy import

* pin deps

* fix lock

* i18n for file creation (#5286)

i18n for file-creation
connect #5280

* theme overhaul

* Add PPTX subagent for better results

* forgot files

* Add PPTX subagent for better results (#5287)

* Add PPTX subagent for better results

* forgot files

* make sub-agent use proper tool calling if it can and better UI hints
2026-03-30 15:13:39 -07:00
Marcello Fitton
0bfd27c6df feat: add optional API key support for Lemonade provider (#5281)
* add API key param to Lemonade LLM Provider and Embedding Provider

* add LEMONADE_LLM_API_KEY to .env.example

* add api key to aibitat provider

* fix api key from being sent to frontend

* fix tooltip id

* add null fallback for `apiKey`

* remove console log

* add missing api keys

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-03-30 14:44:12 -07:00
Timothy Carambat
3f9eaa1a76 fix openapi spec 2026-03-30 14:42:54 -07:00
Marcello Fitton
b15353cd39 feat: add missing Lemonade LLM provider env vars to .env.example (#5275)
add llm provider lemonade env vars to .env.example
2026-03-26 21:43:44 -07:00
Timothy Carambat
fb4dff618f remove legacy cost estimate for embedding 2026-03-26 15:02:23 -07:00
Timothy Carambat
3dedcede34 Filesystem Agent Skill overhaul (#5260)
* wip

* collector parse fixes

* refactor for class and also operation for reading

* add skill management panel

* management panel + lint

* management panel + lint

* Hide skill in non-docker context

* add ask-prompt for edit tool calls

* fix dep

* fix execa pkg (unused in codebase)

* simplify search with ripgrep only and build deps

* Fs skill i18n (#5264)

i18n

* add copy file support

* fix translations
2026-03-26 14:07:46 -07:00
Timothy Carambat
7e9737dd86 add ask to run prompt for tool calls (demo) (#5261)
* add ask to run prompt for tools

* border-none on buttons

* translations

* linting

* i18n (#5263)

* extend approve/deny requests to telegram

* break up handler
2026-03-24 15:18:17 -07:00
Timothy Carambat
1b0add0318 add Dynamic max_tokens retreival for Anthropic models (#5255) 2026-03-23 15:45:22 -07:00
Mike Lambert
9d242bc053 Add User-Agent header for Anthropic API calls (#5174)
* Add User-Agent header for Anthropic API calls

Passes User-Agent: AnythingLLM/{version} to the Anthropic SDK
so Anthropic can identify traffic from AnythingLLM.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* remove test, simplify header default

* unset change to spread

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-03-23 15:19:33 -07:00
Sean Hatfield
192ca411f2 Telegram bot connector (#5190)
* wip telegram bot connector

* encrypt bot token, reorg telegram bot modules, secure pairing codes

* offload telegram chat to background worker, add @agent support with chart png rendering, reconnect ui

* refactor telegram bot settings page into subcomponents

* response.locals for mum, telemetry for connecting to telegram

* simplify telegram command registration

* improve telegram bot ux: rework switch/history/resume commands

* add voice, photo, and TTS support to telegram bot with long message handling

* lint

* rename external_connectors to external_communication_connectors, add voice response mode, persist chat workspace/thread selection

* lint

* fix telegram bot connect/disconnect bugs, kill telegram bot on multiuser mode enable

* add english translations

* fix qr code in light mode

* repatch migration

* WIP checkpoint

* pipeline overhaul for using response obj

* format functions

* fix comment block

* remove conditional dumpENV + lint

* remove .end() from sendStatus calls

* patch broken streaming where streaming only first chunk

* refactor

* use Ephemeral handler now

* show metrics and citations in real GUI

* bugfixes

* prevent MuM persistence, UI cleanup, styling for status

* add new workspace flow in UI
Add thread chat count
fix 69 byte payload callback limit bug

* handle pagination for workspaces, threads, and models

* modularize commands and navigation

* add /proof support for citation recall

* handle backlog message spam

* support abort of response streams

* code cleanup

* spam prevention

* fix translations, update voice typing indicator, fix token bug

* frontend refactor, update tips on /status and voice response improvements

* collapse agent though blocks

* support images

* Fix mime issues with audio from other devices

* fix config issue post server stop

* persist image on agentic chats

* 5189 i18n (#5245)

* i18n translations
connect #5189

* prune translations

* fix errors

* fix translation gaps

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-03-23 15:10:21 -07:00
Timothy Carambat
96965b3f30 Intelligent Skill Selection (#5236)
* Beta Intelligent Tooling
todo: Agent Skill banner warning when tool # is high or % of content window?

* forgot files

* add UI controls and maxToolCallStack setting

* update docs link

* ISS i18n (#5237)

i18n
2026-03-19 10:06:37 -07:00
Timothy Carambat
b4b2203bae MCP tool manager (#5230)
* MCP tool manager

* Mcp tool manager i18 (#5231)

i18n translations for MCP manager changes
connect #5230

* fix bad i18n key
2026-03-18 15:33:49 -07:00
Timothy Carambat
f395083978 Automatic mode for workspace (Agent mode default) (#5143)
* Add automatic chat mode with native tool calling support

    Introduces a new automatic chat mode (now the default) that automatically invokes tools when the provider supports native tool calling. Conditionally shows/hides the @agent command based on whether native tooling is available.

    - Add supportsNativeToolCalling() to AI providers (OpenAI, Anthropic, Azure always support; others opt-in via ENV)
    - Update all locale translations with new mode descriptions
    - Enhance translator to preserve Trans component tags
    - Remove deprecated ability tags UI

* rebase translations

* WIP on image attachments. Supports initial image attachment + subsequent attachments

* persist images

* Image attachments and updates for providers

* desktop pre-change

* always show command on failure

* add back gemini streaming detection

* move provider native tooling flag to Provider func

* whoops - forgot to delete

* strip "@agent" from prompts to prevent weird replies

* translations for automatic-mode (#5145)

* translations for automatic-mode

* rebase

* translations

* lint

* fix dead translations

* change default for now to chat mode just for rollout

* remove pfp for workspace

* passthrough workspace for showAgentCommand detection and rendering

* Agent API automatic mode support

* ephemeral attachments passthrough

* support reading of pinned documents in agent context
2026-03-18 12:35:43 -07:00
Kesku
409ac543bd feat(agents): Add Perplexity Search API as web search provider (#5210)
* feat(agents): Add Perplexity Search API as web search provider

Adds Perplexity as a search provider for the agent web-browsing plugin,
using the Perplexity Search API (POST /search) which returns raw ranked
web results — distinct from the existing Perplexity LLM integration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: replace docs.perplexity.ai with console.perplexity.ai

* chore: replace docs.perplexity.ai with console.perplexity.ai

---------

Co-authored-by: kesku <kesku@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-03-17 14:16:20 -07:00
Timothy Carambat
7908c10379 add user id to chat feedback
update JSDOC on middleware for typedef
GHSA-2qmm-82f7-8qj5
2026-03-13 16:51:02 -07:00
Timothy Carambat
f2030343d7 Fix potential IDOR vulnerability in workspace parsed files endpoints
Add ownership validation to prevent users from deleting or embedding
parsed files that don't belong to them. Previously, the delete and
embed endpoints only validated authentication but not resource ownership,
allowing users to delete attached files for users within workspaces they are also a member of.

Changes:
- Delete endpoint now filters by userId and workspaceId
- Embed endpoint validates file belongs to user and workspace (redundant)
- delete() returns false when no matching records found (returns 403)
- Added JSDoc comments for clarity
GHSA-p5rf-8p88-979c
2026-03-13 15:22:07 -07:00
Timothy Carambat
6b2ed8ec12 Remove WelcomeMessages from app - no longer used (#5206)
* remove `WelcomeMessages` from app - no longer user

* update erronous alert message

* fix job collision ref

* fix jobs - remove dev job
2026-03-13 12:55:59 -07:00
Timothy Carambat
6a492f038d Fix potential Zip Slip path traversal in community plugin import
Validate all ZIP entries before extraction in importCommunityItemFromUrl()
to prevent path traversal attacks (CWE-22). Malicious ZIP entries with
paths like "../../" could write files outside the intended plugin folder.

Requires admin privileges and explicit opt-in to unverified hub downloads.
GHSA-rh66-4w74-cf4m
2026-03-13 10:18:20 -07:00
Timothy Carambat
a207449095 Enforce user suspension check on browser extension API key path
Previously, suspended users could continue using browser extension
endpoints if they had created an API key before suspension. The normal
JWT session path blocked suspended users, but the browser extension
middleware did not.

Changes:
- Add suspension and user existence checks to validBrowserExtensionApiKey
- Delete browser extension API keys when a user is deleted
- Add deleteAllForUser method to BrowserExtensionApiKey model
GHSA-7754-8jcc-2rg3
2026-03-13 10:05:05 -07:00
Timothy Carambat
732eac6fa8 Align Manager API access with frontend access
GHSA-wfq3-65gm-3g2p
2026-03-13 09:46:37 -07:00
Timothy Carambat
334ce052f0 Fix SQL injection in SQL Agent plugin via parameterized queries
Replace string concatenation with parameterized queries in all database
connectors to prevent SQL injection through LLM-generated table names.

Changes:
- PostgreSQL: Use $1, $2 placeholders with pg client parameterization
- MySQL: Use ? placeholders with mysql2 execute() prepared statements
- MSSQL: Use @p0 placeholders with request.input() parameterization
- Update handlers to support parameterized query objects
- Add formatQueryForDisplay() for logging parameterized queries

Security: Mitigates potential SQL injection when LLM passes unsanitized
user input as table_name parameter to getTableSchemaSql/getTablesSql.
GHSA-jwjx-mw2p-5wc7
2026-03-12 21:56:57 -07:00
Timothy Carambat
c76576a9da Report citations for Agent call stacks (#5199) 2026-03-12 14:49:44 -07:00
Timothy Carambat
15a84d5121 Support Agent stream metric reporting (#5197) 2026-03-12 12:50:02 -07:00
Timothy Carambat
6713c80f31 fix schema not persisting in DB connector 2026-03-11 11:43:38 -07:00
Timothy Carambat
21ac874cfa Implement v2 chat layout designs (#5074)
* New chat history layout with chat bubbles (#4985)

* new chat history layout, remove message alignment setting

* remove orphaned chat alignment hook and MessageDirection

* remove workspace profile picture setting and fetch

* clean up unnecessary changes

* add light mode colors to chat ui and main page backgrounds

* update chat message and action icon colors for light mode

* update thinking and agent ui, layout, sizing

* update user message uploaded images ui

* update thought, agent containers to use new colors

* add truncatable content with gradient to user chat messages

* fix citations margin

* implement new edit message UI with save and submit actions

* add translations for TruncatableContent subcomponent

* remove unused props

* fix text colors for default mode chats, agent, thoughts container

* Normalize translations for new chat history layout (#5022)

* normalize translations

* update translations with DMR

* lint

* fix mismatched home container colors

* fix: add password character validation to onboarding single-user setup (#5037)

* fix single user mode password bug

* share const

---------

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

* Native Tool calling (#5071)

* checkpoint

* test MCP and flows

* add native tool call detection back to LMStudio

* add native tool call loops for Ollama

* Add ablity detection to DMR (regex parse)

* bedrock and generic openai with ENV flag

* deepseek native tool calling

* localAI native function

* groq support

* linting, add litellm and OR native tool calling via flag

* fix: resolve Gemini agent 400 error on tool call responses (#5054)

* add gtc__ prefix to tool call names in Gemini agent message formatting

* resolve Gemini agent 400 error on tool call responses

* add comments explaining geminis thought signatures

---------

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

* fix: prevent CMD/CTRL+Arrow scroll from overriding textarea cursor movement (#5053)

prevent CMD/CTRL+Arrow scroll from overriding textarea cursor movement

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

* linting, assistant speaker spacing and order, copy/edit order

---------

Co-authored-by: Marcello Fitton <106866560+angelplusultra@users.noreply.github.com>
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>

* Implement new citations UI (#5038)

* new chat history layout, remove message alignment setting

* remove orphaned chat alignment hook and MessageDirection

* remove workspace profile picture setting and fetch

* clean up unnecessary changes

* add light mode colors to chat ui and main page backgrounds

* update chat message and action icon colors for light mode

* update thinking and agent ui, layout, sizing

* update user message uploaded images ui

* update thought, agent containers to use new colors

* add truncatable content with gradient to user chat messages

* fix citations margin

* implement new edit message UI with save and submit actions

* add translations for TruncatableContent subcomponent

* remove unused props

* fix text colors for default mode chats, agent, thoughts container

* Normalize translations for new chat history layout (#5022)

* normalize translations

* update translations with DMR

* lint

* fix mismatched home container colors

* implement new citations ui with sources sidebar

* bottom sheet for mobile citations

* convert mobile citations bottom sheet to new modal design

* add score, border separators for mobile citations modal

* push down sources sidebar in password/multiuser mode

* fix animation gap, simplify sources sidebar by splitting state to persist data on animation

* add english translations

* fix spacing from citations sidebar when user has auth

* Normalize translations for new citation UI (#5087)

* normalize translations

* update translations using DMR

* fix pluralize to use i18n native solution
change reset to immediate clear
fix spacing for TTS when showing or not to not have space

* proper pluralize

* hide metrics on mobile, fix last message padding on mobile

---------

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

* New prompt input ui/tools menu (#5070)

* wip new prompt input ui/tools menu

* fix colors for prompt input

* redesign workspace llm selector, extract text size + model picker to components

* refactor ToolsMenu component

* fix colors/refactor WorkspaceModelPicker

* fix spacing in ws model picker, change order of tools menu tabs

* fix slash commands showing /reset instead of /exit during active agent session

* refactor ToolsMenu to be much simpler

* cleanup, fix behavior of setupup provider in WorkspaceModelPicker

* simplify AgentSkillsTab toggle logic

* add english translations for new components

* remove legacy slash command/agent popups, add ToolsMenu keyboard nav

* fix spacing of workspace model picker text

* fix SourcesSidebar and TextSizeMenu positioning after merge

* fix keyboard nav in ToolsMenu when clicking on tools button to open

* typo

* only auto pop up tools menu when prompt input is empty with /

* fix z index for tools menu on citation

* fix behavior of / in prompt input

* move global window agent session state to module level variable

* fix prompt input not clearing on /reset

* missing translations

* revert translating slash command

* fix STT auto-submit not working on home page

* Normalize translations for new prompt input/tools menu UI (#5130)

* normalize translations

* update translations using DMR script

* normalize translations

* update translations using DMR script

* remove slash_exit

* fix skills.js import after merge

* fix tooltip z-index rendering behind citations

* patch translation prune script to not remove special cases

* updates to tools input

* factory translations

* use safeJsonParse in clearPromptInputDraft

* normalize translations

* disable agent skill toggles during active agent sessions + show tooltip on disabled

* normalize translations

* handle enter key behavior when tools menu is open

* fix unfocusable modal for slash command edit/new

* fix sending prompt when editing/creating slash commands

* hide/show agent skills in tools menu based on role

* container borders for dark/light mode compliance to designs

---------

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

* update how tooltip works for agent menu

* update prompt input to show agent button with CTA in agent panel for user clarify
update agent session start prompt button in input

* translations

* translations + move regex for slash commands to constants

* fix open sidebar ux

* fix tools menu to always open to slash commands, dismiss auto pop up

* fix sidebar open/close button overlapping with ws model picker

---------

Co-authored-by: Sean Hatfield <seanhatfield5@gmail.com>
Co-authored-by: Marcello Fitton <106866560+angelplusultra@users.noreply.github.com>
2026-03-10 12:50:19 -07:00
Timothy Carambat
868358597e Remove use_mlock from Ollama to solve WARN logs in ollama 0.17
resolves #5182
2026-03-10 09:08:05 -07:00
Marcello Fitton
456738bbda chore: add ESLint CI workflow (#5160)
add lint CI GitHub Action
2026-03-09 14:27:08 -07:00
Timothy Carambat
4e3bcfc616 Add custom fetch to embedder for Ollama (#5180)
Refactor ollama timeout to be shared. Add custom fetch to embedder for ollama as well
2026-03-09 11:47:00 -07:00
Timothy Carambat
dc0bdf112b linting & show descriptive error for bad addtoWorkspace request body
resolves #5172
2026-03-09 11:30:53 -07:00
Ryan
179a823ab1 Fix: Azure OpenAI model key collision (#5092)
* fix: Migrate AzureOpenAI model key from OPEN_MODEL_PREF to prevent the naming collision. No effort necessary from current users.

* test: add backwards compat tests for AzureOpenAI model key migration

* patch missing env example file

* linting

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-03-05 17:12:08 -08:00
Marcello Fitton
4a4378ed99 chore: add ESLint to /server (#5126)
* add eslint config to server

* add break statements to switch case

* add support for browser globals and turn off empty catch blocks

* disable lines with useless try/catch wrappers

* format

* fix no-undef errors

* disbale lines violating no-unsafe-finally

* ignore syncStaticLists.mjs

* use proper null check for creatorId instead of unreachable nullish coalescing

* remove unneeded typescript eslint comment

* make no-unused-private-class-members a warning

* disable line for no-empty-objects

* add new lint script

* fix no-unused-vars violations

* make no-unsued-vars an error

---------

Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-03-05 16:32:45 -08:00
Timothy Carambat
1d8c488e97 Remove Google web-search Programmable SERP (#5156) 2026-03-05 14:49:32 -08:00
Timothy Carambat
ee4b208f95 native tool calling detection for novita 2026-03-05 10:19:03 -08:00
Timothy Carambat
b3944eb50e Revert "Add automatic chat mode with native tool calling support (#5140)"
- Need to support documents in agents
- Need to support images in agent mode

This reverts commit 4c69960dca.
2026-03-04 15:29:41 -08:00
Timothy Carambat
4c69960dca Add automatic chat mode with native tool calling support (#5140)
Introduces a new automatic chat mode (now the default) that automatically invokes tools when the provider supports native tool calling. Conditionally shows/hides the @agent command based on whether native tooling is available.

    - Add supportsNativeToolCalling() to AI providers (OpenAI, Anthropic, Azure always support; others opt-in via ENV)
    - Update all locale translations with new mode descriptions
    - Enhance translator to preserve Trans component tags
    - Remove deprecated ability tags UI
2026-03-04 14:34:30 -08:00
Timothy Carambat
86431c6833 5112 or stream metrics and finish reason (#5117)
* update metric tracking for OR + fix finish_reason missing from transitive chunks

* linting + comments
closes #5113
resolves #5112
2026-03-02 18:53:29 -08:00
Timothy Carambat
e145c391e9 v1.11.1 Release tags (#5107)
bump tag
2026-03-02 09:25:06 -08:00
Timothy Carambat
1eae02e60f fix max tool call stack abort flow 2026-02-27 15:57:58 -08:00
Timothy Carambat
a6ba5a4034 Lemonade integration (#5077)
* lemonade integration

* lemonade embedder

* log

* load model

* readme updates

* update embedder privacy entry
2026-02-27 11:02:38 -08:00
Timothy Carambat
fc29461718 resolve Ollama string strict num_ctx
resolves #5081
2026-02-27 09:20:48 -08:00
Timothy Carambat
70ee112522 lint 2026-02-26 20:37:36 -08:00
Marcello Fitton
b13dd820cc fix: resolve Gemini agent 400 error on tool call responses (#5054)
* add gtc__ prefix to tool call names in Gemini agent message formatting

* resolve Gemini agent 400 error on tool call responses

* add comments explaining geminis thought signatures

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-02-26 13:42:02 -08:00
Timothy Carambat
ac0b1d401d Native Tool calling (#5071)
* checkpoint

* test MCP and flows

* add native tool call detection back to LMStudio

* add native tool call loops for Ollama

* Add ablity detection to DMR (regex parse)

* bedrock and generic openai with ENV flag

* deepseek native tool calling

* localAI native function

* groq support

* linting, add litellm and OR native tool calling via flag
2026-02-26 13:37:56 -08:00
Timothy Carambat
40853e4e43 1.11.0 release tag (#5014) 2026-02-18 08:47:47 -08:00