feat(agents): make native tool calling opt-out instead of opt-in
Flip the agent provider tool calling model from opt-in to opt-out.
Native tool calling is now enabled by default for all providers that support it.
ENV flag renamed from PROVIDER_SUPPORTS_NATIVE_TOOL_CALLING to PROVIDER_DISABLE_NATIVE_TOOL_CALLING.
Base class (`ai-provider.js`):
- `supportsNativeToolCalling()` now returns `true` by default
- `supportsNativeToolCallingViaEnv()` replaced with `optsOutOfNativeToolCallingViaEnv()`
- All providers now set `this.providerTag` for ENV-based opt-out lookup
Mostly untouched (already had tool calling, just removed redundant override + added providerTag):
- openai, azure, deepseek, minimax, anthropic
- genericOpenAi (ENV capability check updated to opt-out)
Already had dynamic capability checking (added opt-out ENV guard):
- ollama, lmstudio, cerebras, novita, dockerModelRunner, gemini, lemonade
Removed old ENV opt-in check (now inherits opt-out default from base):
- groq, openrouter, litellm, localai, bedrock
Modified to support native tool calling (added tooled stream/complete paths):
- apipie, cometapi, fireworksai, giteeai, koboldcpp, mistral,
moonshotAi, ppio, privatemode, sambanova, textgenwebui,
togetherai, xai, zai
Stayed disabled (provider genuinely cannot support tools):
- cohere (no OAI-compatible tool API yet)
- perplexity (no tool calling API support)
- nvidiaNim (deprecated)
- foundry (needs explicit testing)
- dellProAiStudio (likely deprecated, untested)
* feat(embed): opt-in deny-by-default for embeds with no allowlist
An embed created without `allowlist_domains` currently answers requests from ANY origin: EmbedConfig.parseAllowedHosts() returns null for an empty allowlist, and the embed middleware (canRespond) skips the origin check when it is null.
This adds an opt-in, back-compatible `EMBED_REQUIRE_ALLOWLIST` env flag that makes embeds with no allowlist deny all requests until an allowlist is set (default/unset preserves existing behavior), plus a creation-time console warning and an .env.example entry.
Signed-off-by: Dmitry Maranik <dmitrymaranik@gmail.com>
* chore(embed): persist EMBED_REQUIRE_ALLOWLIST in dumpENV protectedKeys
Per review on #5759: EMBED_REQUIRE_ALLOWLIST is not GUI-controlled, so add it to the dumpENV() protectedKeys array so the setting survives env writes.
Signed-off-by: Dmitry Maranik <dmitrymaranik@gmail.com>
* update to spec
---------
Signed-off-by: Dmitry Maranik <dmitrymaranik@gmail.com>
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
The document sync/watch feature hardcoded the stale-after interval to 7
days (604800000ms), which is too infrequent for operational documents
that change often. This makes it configurable via the new
DOCUMENT_SYNC_STALE_AFTER_MS environment variable.
- defaultStaleAfter now reads DOCUMENT_SYNC_STALE_AFTER_MS, falling back
to the 7-day default for unset/invalid/non-positive values and
enforcing a 1-hour minimum to avoid overloading embedders.
- watch() now persists staleAfterMs on the queue record so the
configured interval governs recurring syncs, not just the first one.
- Documented the variable in server/ and docker/ .env.example files.
Resolves#3988
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
* feat: add Cerebras as an LLM provider
Adds Cerebras (https://www.cerebras.ai) as a first-class LLM provider for
chat and agents. Cerebras exposes an OpenAI-compatible inference API, so the
integration mirrors the existing fast-inference providers (Groq/SambaNova):
- New `CerebrasLLM` provider with streaming, prompt-window limits sourced from
the shared model map, and dynamic model discovery via the customModels
helper (`GET /v1/models`).
- New `CerebrasProvider` agent provider with the standard UnTooled fallback and
optional native OpenAI-compatible tool calling, gated behind the existing
`PROVIDER_SUPPORTS_NATIVE_TOOL_CALLING` ENV (since tool-calling support
varies per Cerebras model).
- Wires the provider through getLLMProvider/getLLMProviderClass, agent
selection, ENV validation/persistence, system settings, and the agent
sub-task client builder so agent helpers (e.g. web-scraping summarization)
work for Cerebras.
- Registers `cerebras` in the context-window model map (tracked LiteLLM
provider + legacy fallback values) for accurate context limits.
- Frontend: API key + model-selection options, onboarding/settings provider
entries, agent-provider enablement, privacy-policy entry, and provider logo.
- Documents the new `CEREBRAS_API_KEY` / `CEREBRAS_MODEL_PREF` env vars in the
example env files and adds Cerebras to the supported-provider lists.
resolves#5605
* use proper model fallback
use public endpoint for model fetching
* context window reporting + better chat repsonses + show thinking
* add Cerebrase agent tool calling, capability detection, context windows, and usage reporting
* add safety caching
* stub out images
---------
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
* 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>
* 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>
* 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>
* 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
* 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>
* 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>
* 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
* Improve DMR support
- Autodetect models installed
- Grab all models from hub.docker to show available
- UI to handle render,search, install, and management of models
- Support functionality for chat, stream, and agentic calls
* forgot files
* fix loader circle being too large
fix tooltip width command
adjust location of docker installer open for web platform
* adjust imports
* test base image bump
* patch frontend compilation due to Vite QEMU exception
* migrate all runners to arm64 to avoid QEMU slowdown
* add back layer cleanup
* remove layer cache fix
* 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>
* implemented openrouter embedding model support
* ran yarn lint
* data handling entry
---------
Co-authored-by: timothycarambat <rambat1010@gmail.com>
* prompt caching for anthropic llm and agent providers
* add UI for control of ENV
simplify implementation
---------
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
* 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>
* add option to disable swagger docs via env
* update .example.env for docker and server
---------
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
* 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>
* Add ENV to configure api request delay for generic open ai embedding engine
* yarn lint formatting
* refactor
---------
Co-authored-by: timothycarambat <rambat1010@gmail.com>