Commit Graph

938 Commits

Author SHA1 Message Date
Marcello Fitton
c4f19cec0e
Refactor LLMPerformanceMonitor.measureStream() to Use Options Object Pattern (#4786)
* Refactor LLMPerformanceMonitor to use options object for measureStream parameters

* Refactor invocations of `measureStream` to use options arguments

* Change invocation of `measureStream` in anthropic provider to use options argument

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-12-16 13:10:09 -08:00
Timothy Carambat
664f466e3f
4601 log model on response (#4781)
* add model tag to chatCompletion

* add modelTag `model` to async streaming
keeps default arguments for prompt token calculation where applied via explict arg

* fix HF default arg

* render all performance metrics as available for backward compatibility
add `timestamp` to both sync/async chat methods

* extract metrics string to function
2025-12-14 14:46:55 -08:00
Marcello Fitton
856925451e
Upgrade MCP SDK to Latest (1.24.3) (#4773)
* upgrade mcp sdk to  latest (1.24.3)

* Upgrade MCP version floor in package.json to 1.24.3
2025-12-12 16:26:37 -08:00
Colin Perry
a8bdc00aba
Feat/cohere agent implementation (#4703)
* implement cohere agent support

* run yarn lint

* moderize Cohere
add supported langchain method
redo streaming since it was not working
looping of agent calls was not functioning

* change default model to real model tag
add case statement for model tag

* remove debug

* update default

* only whitelist known labels

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-12-12 16:25:58 -08:00
Marcello Fitton
c7b16c9aa8
Upgrade to Multer 2.0.0 (#4768)
* upgrade to multer 2.0.0

* bump dev

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-12-12 14:32:42 -08:00
Marcello Fitton
7faee90ecc
Add Auth Token to Ollama Embedding Client (#4766)
* Enhance OllamaEmbedder to support authentication by adding an authorization token in headers for client initialization.

* Add optional Auth Token input for Ollama embedding options

* move info elements

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-12-12 14:30:22 -08:00
Marcello Fitton
8aa78c2b75
Fix Stale User Session with Proper fetch Error Handling (#4770)
* add refresh user functionality

* prettier

* add eslint disable comment for exhaustive-deps warning in AuthContext to stop nagging about navigate func

* remove unused imports and fix typo

* handle unsafe parse of undefined for in-session user deleted

* Refactor refreshUser function to handle errors and return structured response. Update AuthProvider to manage user data based on success status.

* Remove console error logging from promise catch in System model for cleaner error handling.

* change status from 404 to 400 and valid to success

* Refactor error handling in AuthProvider's refreshUser logic to remove redundant catch block and streamline user session management on failure.

* prettier

* reorder clauses - return errors

* refactor
account for all user modes
dev build

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-12-12 11:43:20 -08:00
Marcello Fitton
dbb79b6748
Migrate to bcryptjs (#4767)
* Replace bcrypt with bcryptjs across multiple files

* dev build

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-12-11 15:19:04 -08:00
Timothy Carambat
25a72f7175 Revert commit 8e0186f9ac - broken auth 2025-12-11 14:22:16 -08:00
Timothy Carambat
018e0cffbd
Lazy load Lancedb (#4764) 2025-12-11 09:50:52 -08:00
Timothy Carambat
baab837b58
Bump form-data version (#4761)
* Bump  packages

* dev tag

* dev tag rename
2025-12-10 19:29:46 -08:00
Marcello Fitton
a7da757c84
Migrate Azure OpenAI Integration To v1 API | Enable Streaming for Reasoning Models in Azure OpenAI Basic Inference Provider (#4744)
* Refactor Azure OpenAI integration to use OpenAI SDK and the v1 API | Enable streaming for Azure Open AI basic inference provider

* Add info tooltip to inform user about 'Model Type' form field

* Add 'model_type_tooltip' key to multiple language translations

* Validate AZURE_OPENAI_ENDPOINT in provider construction

* remove unused import, update error handler, rescope URL utils

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-12-10 18:56:55 -08:00
Timothy Carambat
692fa755ee
Bump expressJS from 4.18.2 -> 4.21.2 (#4760)
Bump expressJS from 4.18.2 -> 4.21.2 to patch body-parser CVE-2024-45590 as general maintence task'
2025-12-10 18:54:18 -08:00
Marcello Fitton
8e0186f9ac
Fix stale user permissions in UI by refreshing user data on app load (#4751)
* add refresh user functionality

* prettier

* add eslint disable comment for exhaustive-deps warning in AuthContext to stop nagging about navigate func

* remove unused imports and fix typo

* handle unsafe parse of undefined for in-session user deleted

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-12-10 12:40:34 -08:00
Timothy Carambat
b620ca40ce Revert jws/cheerio dependency changes
Reverts:
- 815580ef (patch for cheerio dep)
- 50248163 (unpin resolution for jws due to node eng version)
- 17717d39 (jws bump)
2025-12-09 20:55:56 -08:00
Timothy Carambat
815580ef53 patch for cheerio dep 2025-12-09 20:39:25 -08:00
Timothy Carambat
50248163c4 unpin resolution for jws due to node eng version 2025-12-09 19:50:28 -08:00
Timothy Carambat
17717d39ac
jws bump (#4748) 2025-12-09 15:44:09 -08:00
Timothy Carambat
cc7c876efc
bump body-parser patch version (#4746) 2025-12-09 15:21:22 -08:00
Timothy Carambat
cd263337f8 fix: bump version tag 2025-12-09 13:18:51 -08:00
Timothy Carambat
b96988aae9
Dell model capability patch (#4719) 2025-12-05 13:31:15 -08:00
Sean Hatfield
f910609825
Fix similarity score not showing in citation UI for Astra, Qdrant, Weaviate (#4718)
* fix astra not showing similarity score in citations ui

* fix qdrant not showing similarity score in citations ui

* fix weaviate not showing similarity score in citations ui
2025-12-05 13:05:43 -08:00
Sean Hatfield
1e96acab9d
Fix broken citations in Zilliz Cloud (#4716)
fix broken citations in zilliz cloud vector db
2025-12-05 12:12:29 -08:00
Timothy Carambat
92752a2a15
Improve MCP functionality (#4709)
* Improve MCP functionality

* apply ANSI strip path

* attempt ARM build

* improve dockerfile IO build time and migrate to ARM build

* fix comment

* add ability to disable MCP cooldown feature

* update devbuild name

* move chromium arm build patch to CDN
2025-12-05 11:01:20 -08:00
Timothy Carambat
b54ac2de58
Modify ChromaCloud provider to check base limitations of chroma cloud before upsert to prevent 422 (#4705)
* Modify ChromaCloud provider to check base limitations of chroma cloud before upsert to prevent 422

* update comments
2025-12-03 10:41:44 -08:00
Timothy Carambat
155900eae7
dev build with new epub2 build target and remove patch work (#4694) 2025-11-26 17:36:34 -08:00
方程
90e474abcb
Support Gitee AI(LLM Provider) (#3361)
* Support Gitee AI(LLM Provider)

* refactor(server): 重构 GiteeAI 模型窗口限制功能,暂时将窗口限制硬编码,计划使用外部 API 数据和缓存

* updates for Gitee AI

* use legacy lookup since gitee does not enable getting token context windows

* add more missing records

* reorder imports

---------

Co-authored-by: 方程 <fangcheng@oschina.cn>
Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-11-25 14:19:32 -08:00
Sean Hatfield
66e44f65b4
Add batch embedding support for Ollama embedding provider (#4553)
* add batch embedding support for ollama embedding provider

* lint

* simplify ollama embedder input
2025-11-25 13:03:47 -08:00
Colin Perry
157e3e4b38
Feat/add openrouter embedding models (#4682)
* implemented openrouter embedding model support

* ran yarn lint

* data handling entry

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-11-25 11:16:16 -08:00
Neha Prasad
340709504c
feat: add base64 document attachment support to API chat endpoints (#4672)
* feat: add base64 document attachment support to API chat endpoints

* remove parsed documents from api chat process
linting for simplicity
fix logic issues with flow of data through the pipeline
documentiation

* change var scope

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-11-24 15:48:44 -08:00
Marcello Fitton
5716ac5ed5
Custom Default System Prompt (#4487)
* Add Default System Prompt Management

- Introduced a new route for fetching and updating the default system prompt in the backend.
- Added a new Admin page for managing the default system prompt, including a form for editing and saving changes.
- Updated the SettingsSidebar to include a link to the new Default System Prompt page.
- Implemented fetching of available system prompt variables for use in the prompt editor.
- Enhanced the ChatSettings and ChatPromptSettings components to support the new default system prompt functionality.

This commit lays the groundwork for improved management of system prompts across workspaces.

* Remove validation for system prompt in ChatSettings component

* Add comment for system prompt in workspaces model

* linting, simplify logic for default assumption

* dev build

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-11-24 13:24:10 -08:00
timothycarambat
de11a06622 Fix directOutput returning nothing for streaming provider agentic calls 2025-11-24 12:15:33 -08:00
Sean Hatfield
1f45a9ee34
Fix undefined result in llm-instruction agent flow executor (#4676)
fix typo in llm-instruction agent flow executor
2025-11-24 09:31:00 -08:00
timothycarambat
3b4f07cdbd add longer HTTP ttl on forward extension requests
resolves #4605
2025-11-20 23:00:18 -08:00
timothycarambat
4ec85418c4 Solve theoretical bug in forwardRequestSigner
resolves #4611
2025-11-20 18:36:10 -08:00
Sean Hatfield
c913a2d68c
Prompt caching for Anthropic LLM and Agent providers (#4488)
* prompt caching for anthropic llm and agent providers

* add UI for control of ENV
simplify implementation

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-11-20 17:17:03 -08:00
Timothy Carambat
f0b3dab4c1
Simplify cache condition for LMStudio and Ollama to prevent race condition (#4669)
closes #4597
resolves #4572
closes #4600
resolves #4599
2025-11-20 16:32:02 -08:00
Sean Hatfield
49c29fb968
Z.ai LLM & agent provider (#4573)
* wip zai llm provider

* cleanup + add zai agent provider

* lint

* change how caching works for failed models

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-11-20 15:57:03 -08:00
Marcello Fitton
7a7ec969d7
Update Ollama AI Provider to Support Parsing "Thinking" Content From New Message Schema (#4587)
* add className prop to OllamaAILLM

* Enhance `OllamaAILLM.handleStream` to support parsing thinking content from the `message.thinking` property.

* refactor thinking property handler
patched ollama `@agent` flow calls

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-11-20 15:39:17 -08:00
Chetan Sarva
c169193fc4
feature: Support for AWS Bedrock API Keys (#4651)
* feat: add AWS Bedrock API Key option to settings panel

* feat: Bedrock API key auth method

* fix: hide IAM note when using bedrock api key

* move to camcelCase identifier for bedrock api key use
linting

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-11-20 15:38:45 -08:00
Alex Barron
2eb5384e27
Add SerpApi web search (#4623)
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-11-20 15:12:15 -08:00
jonathanortega2023
7a0c149d2e
fix: Use eval_duration for output TPS calculations in Ollama LLM provider (#4568)
* fix: Use eval_duration for output TPS calculations and add as a metric field

* refactor usage of eval_duration from ollama metrics

* move eval_duration to usage

* overwrite duration in ollama provider wip measureAsyncFunction optional param

* allow for overloaded duration in measureAsyncFunction

* simplify flow for duration tracking

---------

Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-11-20 13:02:47 -08:00
Timothy Carambat
cf76bad452
Implement full chat and @agent chat user indentificiation for OpenRouter (#4668)
Implmenet chat and agentic chat user-id for OpenRouter
resolves #4553
closes #4482
2025-11-20 12:38:43 -08:00
Sean Hatfield
05df4ac72b
Paperless ngx data connector (#4121)
* paperless ngx data connector

* wip resync paperless ngx

* fix generateChunkSource for resyncing paperless ngx

* lint

* Refactor Paperless-NGX connector
Fix issue with date rendering in tooltip + extended width
Move tooltip details to be column for more space

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-11-20 11:27:38 -08:00
Sean Hatfield
2e1c1ff891
Disable swagger docs endpoint with environment variable (#4665)
* add option to disable swagger docs via env

* update .example.env for docker and server

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-11-19 19:32:10 -08:00
Timothy Carambat
6b1b8bbc94
4595 refactor PWA (#4664)
* feat: add web app manifest and mobile PWA meta tags

* feat: serve dynamic manifest.json with custom branding for pwa

* feat: add ios status bar theming for pwa

* fix: prevent overscroll behavior for mobile

* fix: prevent ios safari auto-zoom on chat input

* fix: remove theme-color meta tags conflicting with ios status bar

* fix: add missing apple-mobile-web-app-capable meta tag for ios pwa

* fix: move catch-all route after manifest endpoint to prevent interception

* feat: add pwa detection helper and conditional styling for standalone mode

* PWA refactor

* undo changes to native CSS

* class fix

* proper response obj

* fix patch for import

* fix manifest errors

---------

Co-authored-by: Christian De Santis <christian.constantino98@gmail.com>
2025-11-19 16:08:09 -08:00
Neha Prasad
ea336de3c3
feat: Allow email addresses as usernames (#4619)
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-11-19 13:43:28 -08:00
Neha Prasad
b86aca765b
fix: unhelpful error message for invite link user creation (#4621)
* remove the hardcoded generic message instead of the actual validation error

* lint

---------

Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-11-19 13:37:37 -08:00
Timothy Carambat
22c619586b
Failover invalid vector db identifier to lanceDB (#4661)
resolves #4640
closes #4626
2025-11-19 13:36:19 -08:00
Sean Hatfield
f5f8fb1edb
Agent workspace system prompt with variable expansion (#4526)
* agent workspace system prompt with variable expansion

* cleanup

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-10-15 13:32:50 -07:00
Zacharia Maina
985527c3eb
fix(server): correct Qdrant batching logic for large uploads (#4545)
* fix(server): correct Qdrant batching logic for large uploads

Closes #4544

* modify O(3N) process to O(N)

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-10-15 12:28:39 -07:00
Sean Hatfield
6270a0a189
Fix KoboldCPP agent provider max tokens (#4519)
add max tokens to koboldcpp agent provider
2025-10-09 15:28:50 -07:00
timothycarambat
71cd46ce1b 1.9.0 tag 2025-10-09 15:11:59 -07:00
jaynedoezy-web
89a01492b5
Update .gitignore (#4507) 2025-10-07 16:32:32 -07:00
Timothy Carambat
0ee0a96506
Migrate gemini agents away from Untooled (#4505)
* Migrate gemini agents away from `Untooled`

* disable agents for gemma models as they are not supported for tool calling

* Dev build
resolve #4452 via function name prefix and then stripping within provider
2025-10-07 11:40:00 -07:00
Timothy Carambat
cf3fbcbf0f
Improve URL handler for collector processes (#4504)
* Improve URL handler for collector processes

* dev build
2025-10-07 11:03:27 -07:00
timothycarambat
0a1a5a216a patch ollama context window error when unreachable 2025-10-06 16:25:06 -07:00
Timothy Carambat
c2e7ccc00f
Reimplement Cohere models for basic chat (#4489)
* Reimplement Cohere models
- Redo LLM implementation to grab models from endpoint and pre-filter
- Migrate embedding models to also grab from remote
- Add records for easy context window lookup'

* fix comment
2025-10-03 18:28:20 -07:00
Timothy Carambat
8cdadd8cb3
Sync models from remote for FireworksAI (#4475)
resolves #4474
2025-10-02 12:34:05 -07:00
Sean Hatfield
0b18ac6577
Model context limit auto-detection for LM Studio and Ollama LLM Providers (#4468)
* auto model context limit detection for ollama llm provider

* auto model context limit detection for lmstudio llm provider

* Patch Ollama to function and sync context windows like Foundry

* normalize how model context windows are cached from endpoint service
todo: move this into global utility class with MODEL_MAP
eager load models on boot to pre-cache them
add performance model improvements into ollama agent as well as apply n_ctx

* remove debug log

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-10-02 11:54:19 -07:00
Sean Hatfield
599a3fd8b8
Microsoft Foundry Local LLM provider & agent provider (#4435)
* add microsoft foundry local llm and agent providers

* minor change to fix early stop token + overloading of context window
always use user defined window _unless_ it is larger than the models real contenxt window
cache the context windows when we can from the API (0.7.*)+
Unload model forcefully on model change to prevent resource hogging

* add back token preference since some models have very large windows and can crash a machine
normalize cases

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-10-01 20:04:13 -07:00
Timothy Carambat
8f0f9df4fc
Migrate OpenAI Agent to use ResponsesAPI (#4467)
resolves #4465'
2025-10-01 16:07:30 -07:00
Marcello Fitton
004327264a
Add stream options to Gemini LLM for usage tracking (#4466)
* Add stream options to Gemini LLM for usage tracking

* Update Gemini LLM to disable prompt token calculation

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-10-01 14:00:26 -07:00
Timothy Carambat
d6f0d305ab
Enable real-time agent tool call streaming for all providers (#4279)
* WIP agentic tool call streaming
- OpenAI
- Anthropic
- Azure OpenAI

* WIP rest of providers EXCLUDES Bedrock and GenericOpenAI

* patch untooled complete/streaming to use chatCallback provider from provider class and not assume OpenAI client struct
example: Ollama

* modify ollama to function with its own overrides
normalize completion/stream outputs across providers/untooled

* dev build

* fix message sanization for anthropic agent streaming

* wip fix anthropic agentic streaming sanitization

* patch gemini, webgenui, generic aibitat providers + disable providers unable to test

* refactor anthropic aibitat provider for empty message and tool call formatting

* Add frontend missing prop check
update Azure for streaming support
update Gemini to streamting support on gemini-* models
generic OpenAI disable streaming
verify localAI support
verify NVIDIA Nim support

* DPAIS, remove temp from call, support streaming'

* remove 0 temp to remove possibility of bad temp error/500s/400s

* Patch condition where model is non-streamable and no tools are present or called resulting in the provider `handleFunctionCallChat` being called - which returns a string.

This would then fail in Untooled.complete since response would be a string and not the expected `response.choices?.[0]?.message`

Modified this line to handle both conditions for stream/non-streaming and tool presence or lack thereof

* Allow generic Openai to be streamable since using untooled it should work fine
honor disabled streaming for provider where that concern may apply for regular chats

* rename function and more gemini-specific function to gemini provider

* add comments for readability
.complete on azure should be non-streaming as this is the sync response

* migrate CometAPI, but disable as we cannot test

---------

Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
2025-10-01 10:17:18 -07:00
Timothy Carambat
cd34063111
Patch OpenAI metrics (#4458)
resolves #4457
2025-09-30 15:19:34 -07:00
timothycarambat
d800f8a073 Merge branch 'master' of github.com:Mintplex-Labs/anything-llm 2025-09-30 14:35:41 -07:00
timothycarambat
d1e39e1753 Fix issue where filenames with spaces could be marked as orphaned and pruned from threads they are attached to - resulting in the model not seeing a file during chat after the backend boots 2025-09-30 14:35:14 -07:00
Marcello Fitton
96bf127696
New Default System Prompt Variables (User ID, Workspace ID, & Workspace Name) (#4414)
* Fix system prompt variable color logic by removing unused variable type from switch statement and adding new types.

* Add workspace id, name and user id as default system prompt variables

* Combine user and workspace  variable evaluations into a single if statment, reducing redundant code.

* minor refactor

* add systemPromptVariable expandSystemPromptVariables test cases

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-09-29 14:32:56 -07:00
Marcello Fitton
7ca2753c24
Sanitize Metadata Before PG Vector Database Insertion (#4434)
* Fix JSDOC for updateOrCreateCollection

* Add sanitizeForJsonb method to PGVector for safe JSONB handling

This new method recursively sanitizes values intended for JSONB storage, removing disallowed control characters and ensuring safe insertion into PostgreSQL. The method is integrated into the vector insertion process to sanitize metadata before database operations.

* Add unit tests for PGVector.sanitizeForJsonb method

This commit introduces a comprehensive test suite for the PGVector.sanitizeForJsonb method, ensuring it correctly handles various input types, including null, undefined, strings with disallowed control characters, objects, arrays, and Date objects. The tests verify that the method sanitizes inputs without mutating the original data structures.

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-09-29 13:49:45 -07:00
Marcello Fitton
eb77876127
Add HTTP request/response logging middleware for development mode (#4425)
* Add HTTP request logging middleware for development mode

- Introduced httpLogger middleware to log HTTP requests and responses.
- Enabled logging only in development mode to assist with debugging.

* Update httpLogger middleware to disable time logging by default

* Add httpLogger middleware for development mode in collector service

* Refactor httpLogger middleware to rename timeLogs parameter to enableTimestamps for clarity

* Make HTTP Logger only mount in development and environment flag is enabled.

* Update .env.example to clarify HTTP Logger configuration comments

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-09-29 13:33:15 -07:00
Timothy Carambat
c8f13d5f27
Enable custom HTTP response timeout for ollama (#4448) 2025-09-29 12:32:55 -07:00
Marcello Fitton
ac444c8fa5
Change incorrect notation of Weaviate to PG Vector in env.example (#4439)
Change incorrect notation of Weaviate to PG Vector
2025-09-29 10:01:01 -07:00
Marcello Fitton
6855bbf695
Refactor Class Name Logging (#4426)
* Add className property to various LLM and embedder classes to fix logging bug after minification

* Fix bug with this.log method by applying the missing private field symbol
2025-09-25 15:34:19 -10:00
Marcello Fitton
2226f29a96
Add PostgreSQL vector extension in createTableIfNotExists function (#4430)
* Add PostgreSQL vector extension in createTableIfNotExists function

* move extension sql to function

---------

Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-09-25 15:16:03 -10:00
Timothy Carambat
9466f67162
Update the timeout value on all stream-timeout providers: (#4412)
- OpenRouter
- Novita
- CometAPI
updated to 3,000ms default with 500ms min
2025-09-19 08:52:20 -07:00
Sean Hatfield
1209606d9a
Migrate OpenAI LLM provider to use Responses API (#4404)
* migrate openai llm provider to use responses api

* add back image support

* dont recalc tokens from OpenAI since we get metrics back

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-09-18 21:15:19 -07:00
Chaser Huang
226802d35a
API request delay for Generic OpenAI embedding engine (#4317)
* Add ENV to configure api request delay for generic open ai embedding engine

* yarn lint formatting

* refactor

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-09-17 20:53:41 -07:00
Timothy Carambat
95557ee16f
Allow user to specify args for chromium process so they dont need SYS_ADMIN on container. (#4397)
* allow user to specify args for chromium process so they dont need SYS_ADMIN perms

* use arg flag content

* update console outputs
2025-09-17 16:31:08 -07:00
Timothy Carambat
7864e1a970
Report sources in API responses on finalized chunk (#4396) 2025-09-17 15:16:35 -07:00
Marcello Fitton
50d4a198a4
Add User-Agent header on the requests sent by Generic OpenAI providers. (#4393)
* Add User-Agent header on the requests sent by Generic OpenAI providers.

* Moved getAnythingLLMUserAgent helper fn to server/endpoints/utils.js and changed fallback version string to "unknown"

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-09-17 13:08:18 -07:00
Timothy Carambat
e81bd471dd
patch folder name GET request response (#4395)
* patch folder name GET request response

* fix response cb
2025-09-17 13:05:11 -07:00
Timothy Carambat
cd063af4d1
Add support for SIMPLE_SSO_NO_LOGIN_REDIRECT config setting (#4394)
* Add support for `SIMPLE_SSO_NO_LOGIN_REDIRECT` config setting

* reset changes on simple page

* redirect at root

* remove paths change
2025-09-17 12:51:00 -07:00
Jonas Stawski
b8d4cc3454
Added metadata parameter to document/upload, document/upload/{folderName}, and document/upload-link (#4342)
* Added the ability to pass in metadata to the /document/upload/{folderName} endpoint

* Added the ability to pass in metadata to the /document/upload-link endpoint

* feat: added metadata to document/upload api endpoint

* simplify optional metadata in document dev api endpoints

* lint

* patch handling of metadata in dev api

* Linting, small comments

---------

Co-authored-by: jstawskigmi <jstawski@getmyinterns.org>
Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-09-17 11:17:29 -07:00
TensorNull
5922349bb7
feat: Implement CometAPI integration for chat completions and model m… (#4379)
* feat: Implement CometAPI integration for chat completions and model management

- Added CometApiLLM class for handling chat completions using CometAPI.
- Implemented model synchronization and caching mechanisms.
- Introduced streaming support for chat responses with timeout handling.
- Created CometApiProvider class for agent interactions with CometAPI.
- Enhanced error handling and logging throughout the integration.
- Established a structure for managing function calls and completions.

* linting

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-09-16 14:38:49 -07:00
Sean Hatfield
e31465a639
Export image support for JSON and JSONL (#4359)
* export image support for json and jsonl

* add tests and cleanup functionality

* add test for convertTo prepare function

* comment

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-09-03 10:30:57 -07:00
timothycarambat
6358d087c2 Fix /openai/models compat endpoint to return correct response schema
resolves #4295
2025-08-15 14:46:51 -07:00
timothycarambat
a4a84f9bdd forgot 1.8.5 tag :) 2025-08-14 17:43:55 -07:00
timothycarambat
e6a33ec091 patch paths 2025-08-14 13:40:57 -07:00
Sean Hatfield
c6e1b9c3e2
Chroma Cloud vector db provider (#4273)
* add chroma cloud as new vector db provider

* update docker example env

* extend chroma class to chroma cloud

* update readme

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-08-12 16:21:14 -07:00
Neha Prasad
a230a44f5c
feat: Add Exa as a Search Provider (#4258)
* Added exa-search case to the search provider switch in web-browsing.js

* Added ExaSearchOptions component for API key input

* update

* Patch missing image crashing UI
Fix issue where ENV key did not exist or was saved on click
Update copy for provider
Add Docs for ENV keys for manual placements
update systemssettings for returning key saved to UI

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-08-11 09:46:50 -07:00
Timothy Carambat
0fb33736da
Workspace Chat with documents overhaul (#4261)
* Create parse endpoint in collector (#4212)

* create parse endpoint in collector

* revert cleanup temp util call

* lint

* remove unused cleanupTempDocuments function

* revert slug change
minor change for destinations

---------

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

* Add parsed files table and parse server endpoints (#4222)

* add workspace_parsed_files table + parse endpoints/models

* remove dev api parse endpoint

* remove unneeded imports

* iterate over all files + remove unneeded update function + update telemetry debounce

* Upload UI/UX context window check + frontend alert (#4230)

* prompt user to embed if exceeds prompt window + handle embed + handle cancel

* add tokenCountEstimate to workspace_parsed_files + optimizations

* use util for path locations + use safeJsonParse

* add modal for user decision on overflow of context window

* lint

* dynamic fetching of provider/model combo + inject parsed documents

* remove unneeded comments

* popup ui for attaching/removing files + warning to embed + wip fetching states on update

* remove prop drilling, fetch files/limits directly in attach files popup

* rework ux of FE + BE optimizations

* fix ux of FE + BE optimizations

* Implement bidirectional sync for parsed file states
linting
small changes and comments

* move parse support to another endpoint file
simplify calls and loading of records

* button borders

* enable default users to upload parsed files but NOT embed

* delete cascade on user/workspace/thread deletion to remove parsedFileRecord

* enable bgworker with "always" jobs and optional document sync jobs
orphan document job: Will find any broken reference files to prevent overpollution of the storage folder. This will run 10s after boot and every 12hr after

* change run timeout for orphan job to 1m to allow settling before spawning a worker

* linting and cleanup pr

---------

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

* dev build

* fix tooltip hiding during embedding overflow files

* prevent crash log from ERRNO on parse files

* unused import

* update docs link

* Migrate parsed-files to GET endpoint
patch logic for grabbing models names from utils
better handling for undetermined context windows (null instead of Pos_INIFI)
UI placeholder for null context windows

* patch URL

---------

Co-authored-by: Sean Hatfield <seanhatfield5@gmail.com>
2025-08-11 09:26:19 -07:00
start-life
20468d7053
Update common.js Hebrew language update (#4241)
* Update common.js

Hebrew language update

* linting

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-08-05 09:55:08 -07:00
Timothy Carambat
a9d9f9cdfd
Add custom JWT TTL (#4234)
resolves #4224
2025-08-01 10:39:38 -07:00
Timothy Carambat
c218a0dfe3
Mobile sync support (#4173)
* WIP on mobile connections
todo: register devices
todo: data sync or connection

* improve connection flow and registration
add streaming from service
TODO: user scoping

* dev build mobile support

* fix path

* handle relative URLs

* handle localhost access in product

* add device de-register

* sync styles

* move UI to be out of the normal path since beta only

* Add user scoping to mobile connection requests
Remigrate DB for user associations
Implement temp token registration to prevent unauthorized device registration requests
cleanup middlewares
2025-07-31 12:28:03 -07:00
timothycarambat
4b7932f9e1 Fix agent iam_role implied agentic tool calling
resolves #4193
contrib: @bechir2000
2025-07-31 09:56:08 -07:00
Neha Prasad
ea5f66978b
fix: API export-chats endpoint function import error (#4220)
fix: resolve prepareWorkspaceChatsForExport function not found error in API export-chats endpoint
2025-07-30 12:19:27 -07:00
Timothy Carambat
a0af24624d
Update check for validFuncCall to only check required args and for undefined options (#4214)
* Update check for `validFuncCall` to only check required args and for undefined options

* update

* remove unused helper class func
2025-07-30 11:59:23 -07:00
Sean Hatfield
8c7923a283
Fix app version metrics endpoint (#4209)
fix app version metrics endpoint
2025-07-28 15:37:06 -07:00
Roman Wu
78cbb06c57
Modify the PostgreSQL SQL connector to support querying tables from schemas other than the default public schema. (#4202)
* Add PostgreSQL schema support to SQL connector

- Add schema configuration option to PostgreSQL connector
- Update SQL queries to filter by specified schema
- Add schema input field to frontend connection modal (PostgreSQL only)
- Default to 'public' schema when no custom schema specified
- Add getQualifiedTableName() method for schema.table format

* Fix code formatting after linting

* Update Postgresql.js

* add back removal of ending curly brace

* Update Postgresql.js

* add back removal of ending curly brace (again?)

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-07-28 08:43:15 -07:00
Timothy Carambat
2c19dd09ed
Native Embedder model selection (incl: Multilingual support) (#3835)
* WIP on embedder selection
TODO: apply splitting and query prefixes (if applicable)

* wip on upsert

* Support base model
support nomic-text-embed-v1
support multilingual-e5-small
Add prefixing for both embedding and query for RAG tasks
Add chunking prefix to all vector dbs to apply prefix when possible
Show dropdown and auto-pull on new selection

* norm translations

* move supported models to constants
handle null seelction or invalid selection on dropdown
update comments

* dev

* patch text splitter maximums for now

* normalize translations

* add tests for splitter functionality

* normalize

---------

Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
2025-07-22 10:07:20 -07:00
Sean Hatfield
31a8ead823
Fix multimodal chats via openai compat api (#4135)
* fix multimodal chats via openai compat api

* lint

* add tests for multi-modal content in openai compat endpoint

* refactor to normalize how openai attachments are handled

* uncheck file

* rewrite tests, autodetect mime from dataurl, and spread attachments from prompt

* lint

* revert and fix tests

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-07-22 09:57:32 -07:00
Sean Hatfield
6d6bd14622
Moonshot AI LLM & agent provider (#4178)
* add moonshot ai LLM & agent provider

* fix moonshot agent calling

* handle attachments/fix moonshot llm provider

* update docs/example env

* add moonshot to onboarding privacy

* add moonshot to onboarding llm preference

* update privacy for moonshot ai

* update logo higher res

* remove caching and use modelmap
2025-07-22 09:56:51 -07:00
Sean Hatfield
ea8ba2f7f2
Clear cached docs on text splitter changes (#4163)
* clear cached docs on text splitter changes

* update warning message and title

* remove unsused translation keys

* wrap trycatch

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-07-17 11:03:18 -07:00
Timothy Carambat
043cb1d085
Add model field parameter for generic OpenAI TTS (#4171)
resolves #4165
2025-07-17 10:28:51 -07:00
timothycarambat
c535c69345 1.8.4 tag update 2025-07-16 10:40:39 -07:00
Sean Hatfield
49ea545d7f
SQL preflight connection validation (#4150)
* wip sql connection string validation

* handle failed sql connections in frontend

* sql preflight connection validation on modal save

* revert unneeded be/fe changes

* linting, form updates

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-07-16 09:02:39 -07:00
Sean Hatfield
fe1dfb1fde
Add option to enable encryption on MSSQL Server db (#4134)
* add option to enable encryption on mssql server dbs

* add tests for ConnectionStringParser
2025-07-15 15:26:38 -07:00
Sean Hatfield
1cd0cc32b8
Fix chunking/snippet logs for clarity (#4129)
update chunking/snippet logs for clarity
2025-07-11 10:54:54 -07:00
Timothy Carambat
ea956f4d77
Add ability to search workspace and threads (#4120)
* Add ability to search workspace and threads

* fix height

* styling

* update placeholder

* Translations PR (#4122)
2025-07-10 16:42:10 -07:00
timothycarambat
ae2fa8805c resolves #4040 2025-07-10 13:20:39 -07:00
Sean Hatfield
49293e7dd7
Configurable message limit for embed chat widget (#4114)
* configurable message limit for embed widget

* remove console log

* make field optional + add fallback

* rework validation logic

* lint

* remove field specific guard, it cannot be lte 0 like all other fields

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-07-10 12:45:53 -07:00
Sean Hatfield
5d60047dc7
Handle BigInt in message response (#4110)
* wip handle bigints in message response

* extend bigint protoype to handle bigint stringification + add test

* unset unrelated file

* update tests, simplify implementation;

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-07-10 12:33:34 -07:00
Timothy Carambat
8001d9ddeb
update 1.8.3 tags for release (#4109)
* update 1.8.3 tags for release

* whoops, botched news
2025-07-09 12:17:56 -07:00
timothycarambat
8ea3c71b5e Merge branch 'master' of github.com:Mintplex-Labs/anything-llm 2025-07-08 14:29:54 -07:00
timothycarambat
db2466e179 persistence of the GENERIC_OPENAI_STREAMING_DISABLED setting 2025-07-08 14:29:47 -07:00
Sean Hatfield
4c16e7f7ab
Fix score reporting for Milvus, Zilliz, and Pinecone vector databases (#4106)
* normalize milvus score reporting

* normalize pinecone score reporting

* normalize score reporting for zilliz
2025-07-08 13:47:11 -07:00
Sean Hatfield
15b842f6ba
Patch tokenizer race condition bug (#4091)
patch tokenizer race condition bug

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-07-07 13:25:30 -07:00
Fabio Nonato
0d7a7551b8
fix to support: feat2864 - using local credentials file with Amazon Bedrock (#3986)
* fix: feat2864

* patch default case

---------

Co-authored-by: nonatofabio <fnp@amazon.com>
Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-07-02 09:15:23 -07:00
Sean Hatfield
f3839b355c
Allow static defined prompt variables to be accessed by any authorized user (#4086)
* allow static defined prompt variables to be accessed by any authd user

* improve filtering logic and comments

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-07-02 08:09:42 -07:00
Sean Hatfield
fc55baf69a
LMStudio 0 value embeddings patch (#4084)
patch lmstudio encoding_format to fix all embeddings as 0 value
2025-07-01 18:05:58 -07:00
Sean Hatfield
07129e81f8
Add option to disable streaming via env for generic openai provider (#4079)
* add option to disable streaming via env for generic openai provider

* move env check to streamingEnabled
2025-07-01 12:47:46 -07:00
timothycarambat
d1d68af0f8 patch skipCache logic among all vector db providers
resolves #3958
2025-06-30 13:16:46 -07:00
Sean Hatfield
91e498229c
Publish slash commands to hub (#4019)
* implement ui for publish system prompt to hub

* rework ui + add backend to upload to hub

* add success modal view + publish menu item + translations

* normalize translations

* refactor PublishEntityModal + add hook
for hub auth

* normalize translations

* fix ui for success screen

* refactor, auth checks, UI/UX, and naming conventions to be more clear

* move components to CommunityHub folder + small ui tweak

* wip publish agent flows to community hub

* rework translations/implement uploading agent flows

* normalize/restructure translations

* rename component/add jsdoc for consistency

* fix en translation

* remove comments/duplicate function from merge conf

* update styles of publish button in flow builder

* resolve ssr icon issue

* implement uploading slash commands to hub

* normalize translations

* show command, non editable

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-06-24 16:19:50 -07:00
Sean Hatfield
2d210aa90a
Publish agent flows to hub (#4001)
* implement ui for publish system prompt to hub

* rework ui + add backend to upload to hub

* add success modal view + publish menu item + translations

* normalize translations

* refactor PublishEntityModal + add hook
for hub auth

* normalize translations

* fix ui for success screen

* refactor, auth checks, UI/UX, and naming conventions to be more clear

* move components to CommunityHub folder + small ui tweak

* wip publish agent flows to community hub

* rework translations/implement uploading agent flows

* normalize/restructure translations

* rename component/add jsdoc for consistency

* fix en translation

* remove comments/duplicate function from merge conf

* update styles of publish button in flow builder

* resolve ssr icon issue

* UI linting

* language diff

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-06-24 15:58:49 -07:00
Sean Hatfield
62d3803bf0
Fix prompt, model, and temperature overrides in embed chat widget (#4036)
fix data-prompt attribute in embed chat widget

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-06-24 14:23:02 -07:00
Timothy Carambat
64d9fbc8f0
Show app version in system settings sidebar (#4044)
* Add version tagging
resolves #4038
closes #4034
closes #4028

* add hook

* add build

* patch
2025-06-24 13:56:12 -07:00
leopardracer
1e1694fcd0
Fix Typos in Comments and Documentation (#4015)
* Update communityHub.js

* Update memory.js
2025-06-24 09:06:59 -07:00
Sean Hatfield
96b532a0f4
Publish system prompts to hub (#3976)
* implement ui for publish system prompt to hub

* rework ui + add backend to upload to hub

* add success modal view + publish menu item + translations

* normalize translations

* refactor PublishEntityModal + add hook
for hub auth

* normalize translations

* fix ui for success screen

* refactor, auth checks, UI/UX, and naming conventions to be more clear

* move components to CommunityHub folder + small ui tweak

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-06-16 09:59:38 -07:00
Maxim Evtush
7cef25822c
Fix typos in blog post example and save-file-browser plugin (#4009)
* Update blog-post-coding.js

* Update save-file-browser.js

* Update blog-post-coding.js

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-06-16 09:19:44 -07:00
FT
e37f20f547
Fix Typo in Milvus Provider and Update Comment in Prisma Schema (#4003)
* Update schema.prisma

* Update index.js
2025-06-15 12:58:56 -07:00
fuder.eth
3c89ea987f
Fix Typos in MetaGenerator.js Documentation Comments (#3993)
Update MetaGenerator.js

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-06-13 08:56:40 -07:00
kilavvy
1752bc261e
Fix Typos in Comments and Documentation (#3987)
* Update markdown-katex.js

* Update PRISMA.md
2025-06-12 13:59:38 -07:00
Timothy Carambat
2055c8accd
Flag to disable login UI and endpoints for credentialed auth (#3984)
* Flag to disable login UI and endpoints for credentialed auth

* dev build

* fix translation key
2025-06-11 12:46:40 -07:00
leopardracer
e779dcfeff
Fix Typo in Documentation and Metadata Field Name (#3979)
* Update index.js

* Update index.js
2025-06-10 09:27:44 -07:00
Timothy Carambat
c0d66e6c19
Enable UI/UX for model swapping in chat window (#3969)
* Enable UI/UX for model swapping in chat window

* forgot component

* patch useGetProviders hook to set loading on change of provider

* dev build

* normalize translations

* patch how model default is provided

---------

Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
2025-06-09 09:59:17 -07:00
Timothy Carambat
4eb951d40e
Fix model map staleness behavior or fallback (#3971)
* Fix model map staleness behavior or fallback

* patch url

* fix log

* dev build
2025-06-06 17:39:48 -07:00
Sean Hatfield
ef0928993e
Implement importing of agent flows from community hub (#3867)
* implement importing of agent flows from community hub

* auto enable flow on import

* remove unused blocks for docker
prevent importing or saving of agent flows that have unsupported blocks for version or platform

* dev build

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-06-05 15:08:58 -07:00
Sean Hatfield
77f6262290
Direct output for agent flows (#3873)
* wip: create direct output switch on last block and send response to ui

* lint

* Return flow on direct output enabled
prevent new blocks below direct output block
Update executor/aibitat to handle skipping of handler outputs

* dev build

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-06-05 14:46:44 -07:00
Timothy Carambat
271a682824
remove LLM Instruction inputVariable requirement (#3954) 2025-06-05 07:43:25 -07:00
Sean Hatfield
2938aafae7
JSON Parser from agent flow blocks (#3863)
* implement json parser for agent flow to allow dot notation and array access

* lint

* patch parser for pathing on objects
add tests for cases

* Move webscraping deps to closure
update tests to not modify env since no longer needed
do not modify paths with spaces - could be text key with spaces

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-06-05 07:18:00 -07:00
Sean Hatfield
0c9817ad59
Patch apiChatHandler to include agent chats (#3905)
patch apiChatHandler to include agent chats
2025-06-03 14:39:55 -07:00
Paolo Calvi
9470fcce09
Fix/mcp environment inheritance (#3909)
* Fix: MCP server environment inheritance across platforms

- Fix GUI applications not inheriting proper PATH/NODE_PATH
- Correct Docker NODE_PATH to point to modules directory
- Ensure base environment is always provided
- Preserve user environment variable overrides
- Resolves -32000 Connection closed errors on macOS/Linux GUI

* Fix: MCP server environment inheritance across platforms after linting

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2025-06-03 11:41:42 -07:00
Timothy Carambat
a0134de979
fix issue with files loading with watching enabled (#3930) 2025-06-01 14:53:48 -05:00
Timothy Carambat
a57536b715
Handle invalid response bodies for ContextWindowFinder (#3896)
Handle invalid response bodies for contextwindowfinder
2025-05-27 15:40:06 -07:00
Timothy Carambat
753e1e9574
Filter malformed post-processed docs from file picker (#3853)
Filter malformed post-processed files from UI
2025-05-19 13:07:24 -07:00
timothycarambat
7e5e0952c3 remove comment in file util 2025-05-19 12:46:45 -07:00
timothycarambat
cabcc16e49 fix folders accumulating many files 2025-05-16 11:51:03 -07:00
Timothy Carambat
0e1de19408
Respect Max Chunk Len set - Generic OpenAI Embedder connection (#3838)
Respect Max Chunk Len set
resolves #3834
2025-05-16 11:18:24 -07:00
timothycarambat
6c36443657 patch Cached tag in UI not showing from #3833 2025-05-15 21:49:01 -07:00
Timothy Carambat
3bbceb82aa
3416 file picker load times (#3833)
* wip

* implment conditional streaming

* no bench
2025-05-15 13:54:14 -07:00