[PR #5033] [CLOSED] feat: Add LLM API (llmapi.ai) as LLM provider #4868

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

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/5033
Author: @aleksieienko
Created: 2/20/2026
Status: Closed

Base: masterHead: feat/llmapi-provider


📝 Commits (1)

  • 048c102 feat: Add LLM API (llmapi.ai) as LLM provider

📊 Changes

7 files changed (+378 additions, -0 deletions)

View changed files

frontend/src/components/LLMSelection/LlmApiOptions/index.jsx (+114 -0)
frontend/src/media/llmprovider/llmapi.png (+0 -0)
📝 frontend/src/pages/GeneralSettings/LLMPreference/index.jsx (+11 -0)
server/utils/AiProviders/llmApi/index.js (+201 -0)
📝 server/utils/helpers/customModels.js (+33 -0)
📝 server/utils/helpers/index.js (+8 -0)
📝 server/utils/helpers/updateENV.js (+11 -0)

📄 Description

Summary

  • Adds LLM API as a new LLM provider for AnythingLLM
  • LLM API is a unified API gateway providing access to 120+ models across OpenAI, Anthropic, Google, xAI, Alibaba, and Moonshot through a single OpenAI-compatible interface
  • Uses the existing OpenAI SDK with a custom base URL (https://api.llmapi.ai/v1), following the same pattern as Groq, DeepSeek, and other OpenAI-compatible providers

Changes

Backend:

  • server/utils/AiProviders/llmApi/index.js — New provider class (LlmApiLLM) with full chat completion and streaming support
  • server/utils/helpers/index.js — Register in getLLMProvider, getLLMProviderClass, and getBaseLLMProviderModel
  • server/utils/helpers/customModels.js — Add model discovery via /v1/models endpoint
  • server/utils/helpers/updateENV.js — Add LLM_API_KEY and LLM_API_MODEL_PREF env var mappings and validation

Frontend:

  • frontend/src/components/LLMSelection/LlmApiOptions/index.jsx — Settings component with API key input and dynamic model selector
  • frontend/src/pages/GeneralSettings/LLMPreference/index.jsx — Register in AVAILABLE_LLM_PROVIDERS
  • frontend/src/media/llmprovider/llmapi.png — Provider logo

Environment Variables

Variable Description
LLM_API_KEY API key from llmapi.ai
LLM_API_MODEL_PREF Preferred model (e.g., gpt-4o, claude-3-5-sonnet, gemini-2.5-pro)

Test plan

  • Set LLM_API_KEY env var with a valid API key
  • Select "LLM API" as LLM provider in settings
  • Verify model list loads from the API
  • Send a chat message and verify response
  • Verify streaming works correctly
  • Test with different models (OpenAI, Anthropic, etc.)

🤖 Generated with Claude Code


🔄 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/5033 **Author:** [@aleksieienko](https://github.com/aleksieienko) **Created:** 2/20/2026 **Status:** ❌ Closed **Base:** `master` ← **Head:** `feat/llmapi-provider` --- ### 📝 Commits (1) - [`048c102`](https://github.com/Mintplex-Labs/anything-llm/commit/048c102fb5790e3a0e1671564b7a6db957674bb1) feat: Add LLM API (llmapi.ai) as LLM provider ### 📊 Changes **7 files changed** (+378 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `frontend/src/components/LLMSelection/LlmApiOptions/index.jsx` (+114 -0) ➕ `frontend/src/media/llmprovider/llmapi.png` (+0 -0) 📝 `frontend/src/pages/GeneralSettings/LLMPreference/index.jsx` (+11 -0) ➕ `server/utils/AiProviders/llmApi/index.js` (+201 -0) 📝 `server/utils/helpers/customModels.js` (+33 -0) 📝 `server/utils/helpers/index.js` (+8 -0) 📝 `server/utils/helpers/updateENV.js` (+11 -0) </details> ### 📄 Description ## Summary - Adds [LLM API](https://llmapi.ai) as a new LLM provider for AnythingLLM - LLM API is a unified API gateway providing access to **120+ models** across OpenAI, Anthropic, Google, xAI, Alibaba, and Moonshot through a single OpenAI-compatible interface - Uses the existing OpenAI SDK with a custom base URL (`https://api.llmapi.ai/v1`), following the same pattern as Groq, DeepSeek, and other OpenAI-compatible providers ## Changes **Backend:** - `server/utils/AiProviders/llmApi/index.js` — New provider class (`LlmApiLLM`) with full chat completion and streaming support - `server/utils/helpers/index.js` — Register in `getLLMProvider`, `getLLMProviderClass`, and `getBaseLLMProviderModel` - `server/utils/helpers/customModels.js` — Add model discovery via `/v1/models` endpoint - `server/utils/helpers/updateENV.js` — Add `LLM_API_KEY` and `LLM_API_MODEL_PREF` env var mappings and validation **Frontend:** - `frontend/src/components/LLMSelection/LlmApiOptions/index.jsx` — Settings component with API key input and dynamic model selector - `frontend/src/pages/GeneralSettings/LLMPreference/index.jsx` — Register in `AVAILABLE_LLM_PROVIDERS` - `frontend/src/media/llmprovider/llmapi.png` — Provider logo ## Environment Variables | Variable | Description | |----------|-------------| | `LLM_API_KEY` | API key from [llmapi.ai](https://llmapi.ai) | | `LLM_API_MODEL_PREF` | Preferred model (e.g., `gpt-4o`, `claude-3-5-sonnet`, `gemini-2.5-pro`) | ## Test plan - [ ] Set `LLM_API_KEY` env var with a valid API key - [ ] Select "LLM API" as LLM provider in settings - [ ] Verify model list loads from the API - [ ] Send a chat message and verify response - [ ] Verify streaming works correctly - [ ] Test with different models (OpenAI, Anthropic, etc.) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <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:42 -05:00
yindo changed title from [PR #5033] feat: Add LLM API (llmapi.ai) as LLM provider to [PR #5033] [CLOSED] feat: Add LLM API (llmapi.ai) as LLM provider 2026-06-05 15:20:47 -04:00
yindo closed this issue 2026-06-05 15:20:48 -04: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#4868