[PR #4156] feat: Add AI/ML API (aimlapi) as new LLM provider #4537

Open
opened 2026-02-22 18:36:02 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/4156
Author: @D1m7asis
Created: 7/15/2025
Status: 🔄 Open

Base: masterHead: aimlapi


📝 Commits (9)

  • f11ef10 feat: Add AI/ML API (aimlapi) as new LLM provider
  • 3b78ca4 Merge branch 'master' into pr-4156-aimlapi
  • d6969ea patch model not saving
  • f009b0a update readme
  • bd390b6 update gitignore
  • c86139d Merge branch 'master' into aimlapi
  • f6f9231 fix: Refactor AI/ML API key handling for LLM and embedding
  • e08a2c2 Merge remote-tracking branch 'upstream/master' into aimlapi
  • 6a5669a Update customModels.js

📊 Changes

23 files changed (+919 additions, -3 deletions)

View changed files

📝 README.md (+1 -0)
📝 docker/.env.example (+9 -1)
frontend/src/components/EmbeddingSelection/AimlApiOptions/index.jsx (+110 -0)
frontend/src/components/LLMSelection/AimlApiOptions/index.jsx (+111 -0)
📝 frontend/src/hooks/useGetProvidersModels.js (+1 -0)
frontend/src/media/llmprovider/aimlapi.png (+0 -0)
📝 frontend/src/pages/GeneralSettings/EmbeddingPreference/index.jsx (+9 -0)
📝 frontend/src/pages/GeneralSettings/LLMPreference/index.jsx (+10 -0)
📝 frontend/src/pages/OnboardingFlow/Steps/DataHandling/index.jsx (+17 -0)
📝 frontend/src/pages/OnboardingFlow/Steps/LLMPreference/index.jsx (+9 -0)
📝 frontend/src/pages/WorkspaceSettings/AgentConfig/AgentLLMSelection/index.jsx (+1 -0)
📝 server/.env.example (+9 -1)
📝 server/models/systemSettings.js (+5 -0)
📝 server/storage/models/.gitignore (+2 -1)
server/utils/AiProviders/aimlapi/index.js (+328 -0)
server/utils/EmbeddingEngines/aimlapi/index.js (+122 -0)
📝 server/utils/agents/aibitat/index.js (+2 -0)
server/utils/agents/aibitat/providers/aimlapi.js (+90 -0)
📝 server/utils/agents/aibitat/providers/index.js (+2 -0)
📝 server/utils/agents/index.js (+6 -0)

...and 3 more files

📄 Description

Introduces support for the AI/ML API (aimlapi) as a new LLM provider across the frontend and backend. Adds configuration options, provider selection UI, privacy info, and model selection for aimlapi. Implements backend integration for chat completions, agent support, and custom model listing. Updates environment examples and helper utilities to support the new provider.

Pull Request Type

  • feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

resolves https://github.com/Mintplex-Labs/anything-llm/issues/3945

What is in this change?

  • Environment configuration:

    • Updated docker/.env.example and server/.env.example with AIML_API_KEY, AIML_MODEL_PREF, and embedding engine entries.
  • Frontend UI:

    • Added AimlApiOptions components under components/LLMSelection and components/EmbeddingSelection.
    • Registered “AI/ML API” in LLM and embedding provider lists, onboarding flow, and workspace settings.
    • Included provider logo (aimlapi.png) and privacy description.
  • Backend integration:

    • Created server/utils/AiProviders/aimlapi and server/utils/EmbeddingEngines/aimlapi modules for chat and embedding APIs.
    • Wired into systemSettings.js, customModels.js, and helpers/*.js for provider selection and model caching.
    • Enabled agent support in server/utils/agents for aimlapi.
  • Helper updates:

    • Extended getCustomModels, getLLMProvider, and getEmbeddingEngineSelection to include aimlapi.
    • Updated updateENV.js validation to accept aimlapi as a valid provider.

Additional Information

This change ensures seamless integration of AI/ML API models alongside existing providers and maintains consistent UX patterns for model selection and configuration.

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/4156 **Author:** [@D1m7asis](https://github.com/D1m7asis) **Created:** 7/15/2025 **Status:** 🔄 Open **Base:** `master` ← **Head:** `aimlapi` --- ### 📝 Commits (9) - [`f11ef10`](https://github.com/Mintplex-Labs/anything-llm/commit/f11ef10e5294e7be2a1ebf543234f7fe03574749) feat: Add AI/ML API (aimlapi) as new LLM provider - [`3b78ca4`](https://github.com/Mintplex-Labs/anything-llm/commit/3b78ca418f0ca9d76af5477fd5d83e40457ffcb6) Merge branch 'master' into pr-4156-aimlapi - [`d6969ea`](https://github.com/Mintplex-Labs/anything-llm/commit/d6969ea7bec933fca31268aff338eb87c385b605) patch model not saving - [`f009b0a`](https://github.com/Mintplex-Labs/anything-llm/commit/f009b0af721c6698d410a2e8b744e45cfdaeada0) update readme - [`bd390b6`](https://github.com/Mintplex-Labs/anything-llm/commit/bd390b6e76e48139e432a5d73b0cc07e8be4c994) update gitignore - [`c86139d`](https://github.com/Mintplex-Labs/anything-llm/commit/c86139d91e54a828976eabee25c0a0078dbc86aa) Merge branch 'master' into aimlapi - [`f6f9231`](https://github.com/Mintplex-Labs/anything-llm/commit/f6f9231bdea832bda789a6fb421add766fbd5400) fix: Refactor AI/ML API key handling for LLM and embedding - [`e08a2c2`](https://github.com/Mintplex-Labs/anything-llm/commit/e08a2c2a6fd609b04e9892640f2d947640e2c5fb) Merge remote-tracking branch 'upstream/master' into aimlapi - [`6a5669a`](https://github.com/Mintplex-Labs/anything-llm/commit/6a5669adffd565c633377b381906838611ce3f26) Update customModels.js ### 📊 Changes **23 files changed** (+919 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -0) 📝 `docker/.env.example` (+9 -1) ➕ `frontend/src/components/EmbeddingSelection/AimlApiOptions/index.jsx` (+110 -0) ➕ `frontend/src/components/LLMSelection/AimlApiOptions/index.jsx` (+111 -0) 📝 `frontend/src/hooks/useGetProvidersModels.js` (+1 -0) ➕ `frontend/src/media/llmprovider/aimlapi.png` (+0 -0) 📝 `frontend/src/pages/GeneralSettings/EmbeddingPreference/index.jsx` (+9 -0) 📝 `frontend/src/pages/GeneralSettings/LLMPreference/index.jsx` (+10 -0) 📝 `frontend/src/pages/OnboardingFlow/Steps/DataHandling/index.jsx` (+17 -0) 📝 `frontend/src/pages/OnboardingFlow/Steps/LLMPreference/index.jsx` (+9 -0) 📝 `frontend/src/pages/WorkspaceSettings/AgentConfig/AgentLLMSelection/index.jsx` (+1 -0) 📝 `server/.env.example` (+9 -1) 📝 `server/models/systemSettings.js` (+5 -0) 📝 `server/storage/models/.gitignore` (+2 -1) ➕ `server/utils/AiProviders/aimlapi/index.js` (+328 -0) ➕ `server/utils/EmbeddingEngines/aimlapi/index.js` (+122 -0) 📝 `server/utils/agents/aibitat/index.js` (+2 -0) ➕ `server/utils/agents/aibitat/providers/aimlapi.js` (+90 -0) 📝 `server/utils/agents/aibitat/providers/index.js` (+2 -0) 📝 `server/utils/agents/index.js` (+6 -0) _...and 3 more files_ </details> ### 📄 Description Introduces support for the AI/ML API (aimlapi) as a new LLM provider across the frontend and backend. Adds configuration options, provider selection UI, privacy info, and model selection for aimlapi. Implements backend integration for chat completions, agent support, and custom model listing. Updates environment examples and helper utilities to support the new provider. ### Pull Request Type <!-- For change type, change [ ] to [x]. --> * [x] ✨ feat * [ ] 🐛 fix * [ ] ♻️ refactor * [ ] 💄 style * [ ] 🔨 chore * [ ] 📝 docs ### Relevant Issues resolves https://github.com/Mintplex-Labs/anything-llm/issues/3945 ### What is in this change? * **Environment configuration**: * Updated `docker/.env.example` and `server/.env.example` with `AIML_API_KEY`, `AIML_MODEL_PREF`, and embedding engine entries. * **Frontend UI**: * Added `AimlApiOptions` components under `components/LLMSelection` and `components/EmbeddingSelection`. * Registered “AI/ML API” in LLM and embedding provider lists, onboarding flow, and workspace settings. * Included provider logo (`aimlapi.png`) and privacy description. * **Backend integration**: * Created `server/utils/AiProviders/aimlapi` and `server/utils/EmbeddingEngines/aimlapi` modules for chat and embedding APIs. * Wired into `systemSettings.js`, `customModels.js`, and `helpers/*.js` for provider selection and model caching. * Enabled agent support in `server/utils/agents` for aimlapi. * **Helper updates**: * Extended `getCustomModels`, `getLLMProvider`, and `getEmbeddingEngineSelection` to include aimlapi. * Updated `updateENV.js` validation to accept `aimlapi` as a valid provider. ### Additional Information <!-- Add any other context about the Pull Request here that was not captured above. --> This change ensures seamless integration of AI/ML API models alongside existing providers and maintains consistent UX patterns for model selection and configuration. ### Developer Validations * [x] I ran `yarn lint` from the root of the repo & committed changes * [x] Relevant documentation has been updated * [x] I have tested my code functionality * [x] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:36:02 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#4537