[PR #5076] [CLOSED] feat: add Avian as an LLM provider #5292

Closed
opened 2026-06-05 15:20:52 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/5076
Author: @avianion
Created: 2/26/2026
Status: Closed

Base: masterHead: feat/add-avian-llm-provider


📝 Commits (1)

  • f53f865 feat: add Avian as an LLM provider

📊 Changes

10 files changed (+370 additions, -0 deletions)

View changed files

frontend/src/components/LLMSelection/AvianOptions/index.jsx (+98 -0)
📝 frontend/src/components/ProviderPrivacy/constants.js (+6 -0)
frontend/src/media/llmprovider/avian.png (+0 -0)
📝 frontend/src/pages/GeneralSettings/LLMPreference/index.jsx (+11 -0)
📝 frontend/src/pages/OnboardingFlow/Steps/LLMPreference/index.jsx (+10 -0)
📝 frontend/src/pages/WorkspaceSettings/AgentConfig/AgentLLMSelection/index.jsx (+1 -0)
server/utils/AiProviders/avian/index.js (+171 -0)
📝 server/utils/helpers/customModels.js (+54 -0)
📝 server/utils/helpers/index.js (+8 -0)
📝 server/utils/helpers/updateENV.js (+11 -0)

📄 Description

Summary

Adds Avian as a new LLM provider in AnythingLLM. Avian provides an OpenAI-compatible API with access to cost-effective frontier LLMs.

  • API Base URL: https://api.avian.io/v1
  • Auth: Bearer token via AVIAN_API_KEY
  • Protocol: Fully OpenAI-compatible (chat completions, streaming, function calling)
  • Available Models:
    • deepseek/deepseek-v3.2 — 164K context, $0.26/$0.38 per 1M tokens
    • moonshotai/kimi-k2.5 — 131K context, $0.45/$2.20 per 1M tokens
    • z-ai/glm-5 — 131K context, $0.30/$2.55 per 1M tokens
    • minimax/minimax-m2.5 — 1M context, $0.30/$1.10 per 1M tokens

Changes

Server (server/utils/)

  • AiProviders/avian/index.js — New AvianLLM class using the OpenAI SDK with Avian's base URL. Supports chat completions, streaming, and performance monitoring.
  • helpers/index.js — Register Avian in getLLMProvider(), getLLMProviderClass(), and getBaseLLMProviderModel()
  • helpers/customModels.js — Add getAvianModels() function for dynamic model fetching with fallback list
  • helpers/updateENV.js — Add AVIAN_API_KEY and AVIAN_MODEL_PREF env vars; add "avian" to supportedLLM() validation

Frontend (frontend/src/)

  • components/LLMSelection/AvianOptions/index.jsx — New component with API key input and model selection dropdown
  • pages/GeneralSettings/LLMPreference/index.jsx — Add Avian to AVAILABLE_LLM_PROVIDERS
  • pages/OnboardingFlow/Steps/LLMPreference/index.jsx — Add Avian to onboarding LLM list
  • pages/WorkspaceSettings/AgentConfig/AgentLLMSelection/index.jsx — Add "avian" to ENABLED_PROVIDERS for agent support
  • components/ProviderPrivacy/constants.js — Add Avian privacy policy entry
  • media/llmprovider/avian.png — Provider logo

Implementation Notes

The implementation follows the same pattern as existing OpenAI-compatible providers (DeepSeek, Groq, xAI, etc.):

  • Uses the openai npm package with a custom baseURL
  • Supports dynamic model listing via the /v1/models endpoint
  • Falls back to a hardcoded model list if the API is unreachable
  • Includes streaming support via handleDefaultStreamResponseV2

Test plan

  • Verify provider appears in LLM selection dropdown (Settings > LLM)
  • Verify provider appears in onboarding LLM selection
  • Enter Avian API key and verify models load in dropdown
  • Send a chat message and verify response
  • Verify streaming works correctly
  • Verify agent mode works with Avian selected
  • Verify privacy policy link renders in ProviderPrivacy component

cc @timothycarambat


🔄 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/5076 **Author:** [@avianion](https://github.com/avianion) **Created:** 2/26/2026 **Status:** ❌ Closed **Base:** `master` ← **Head:** `feat/add-avian-llm-provider` --- ### 📝 Commits (1) - [`f53f865`](https://github.com/Mintplex-Labs/anything-llm/commit/f53f865b90bb998604b04a60a3cfb0d29f95a712) feat: add Avian as an LLM provider ### 📊 Changes **10 files changed** (+370 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `frontend/src/components/LLMSelection/AvianOptions/index.jsx` (+98 -0) 📝 `frontend/src/components/ProviderPrivacy/constants.js` (+6 -0) ➕ `frontend/src/media/llmprovider/avian.png` (+0 -0) 📝 `frontend/src/pages/GeneralSettings/LLMPreference/index.jsx` (+11 -0) 📝 `frontend/src/pages/OnboardingFlow/Steps/LLMPreference/index.jsx` (+10 -0) 📝 `frontend/src/pages/WorkspaceSettings/AgentConfig/AgentLLMSelection/index.jsx` (+1 -0) ➕ `server/utils/AiProviders/avian/index.js` (+171 -0) 📝 `server/utils/helpers/customModels.js` (+54 -0) 📝 `server/utils/helpers/index.js` (+8 -0) 📝 `server/utils/helpers/updateENV.js` (+11 -0) </details> ### 📄 Description ## Summary Adds [Avian](https://avian.io) as a new LLM provider in AnythingLLM. Avian provides an OpenAI-compatible API with access to cost-effective frontier LLMs. - **API Base URL**: `https://api.avian.io/v1` - **Auth**: Bearer token via `AVIAN_API_KEY` - **Protocol**: Fully OpenAI-compatible (chat completions, streaming, function calling) - **Available Models**: - `deepseek/deepseek-v3.2` — 164K context, $0.26/$0.38 per 1M tokens - `moonshotai/kimi-k2.5` — 131K context, $0.45/$2.20 per 1M tokens - `z-ai/glm-5` — 131K context, $0.30/$2.55 per 1M tokens - `minimax/minimax-m2.5` — 1M context, $0.30/$1.10 per 1M tokens ## Changes **Server (`server/utils/`)** - `AiProviders/avian/index.js` — New `AvianLLM` class using the OpenAI SDK with Avian's base URL. Supports chat completions, streaming, and performance monitoring. - `helpers/index.js` — Register Avian in `getLLMProvider()`, `getLLMProviderClass()`, and `getBaseLLMProviderModel()` - `helpers/customModels.js` — Add `getAvianModels()` function for dynamic model fetching with fallback list - `helpers/updateENV.js` — Add `AVIAN_API_KEY` and `AVIAN_MODEL_PREF` env vars; add `"avian"` to `supportedLLM()` validation **Frontend (`frontend/src/`)** - `components/LLMSelection/AvianOptions/index.jsx` — New component with API key input and model selection dropdown - `pages/GeneralSettings/LLMPreference/index.jsx` — Add Avian to `AVAILABLE_LLM_PROVIDERS` - `pages/OnboardingFlow/Steps/LLMPreference/index.jsx` — Add Avian to onboarding LLM list - `pages/WorkspaceSettings/AgentConfig/AgentLLMSelection/index.jsx` — Add `"avian"` to `ENABLED_PROVIDERS` for agent support - `components/ProviderPrivacy/constants.js` — Add Avian privacy policy entry - `media/llmprovider/avian.png` — Provider logo ## Implementation Notes The implementation follows the same pattern as existing OpenAI-compatible providers (DeepSeek, Groq, xAI, etc.): - Uses the `openai` npm package with a custom `baseURL` - Supports dynamic model listing via the `/v1/models` endpoint - Falls back to a hardcoded model list if the API is unreachable - Includes streaming support via `handleDefaultStreamResponseV2` ## Test plan - [ ] Verify provider appears in LLM selection dropdown (Settings > LLM) - [ ] Verify provider appears in onboarding LLM selection - [ ] Enter Avian API key and verify models load in dropdown - [ ] Send a chat message and verify response - [ ] Verify streaming works correctly - [ ] Verify agent mode works with Avian selected - [ ] Verify privacy policy link renders in ProviderPrivacy component cc @timothycarambat --- <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-06-05 15:20:52 -04:00
yindo closed this issue 2026-06-05 15:20:52 -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#5292