Skip to content

feat(generic-openai): saved endpoint connections dropdown - #6065

Open
Souravrajvi0 wants to merge 1 commit into
Mintplex-Labs:masterfrom
Souravrajvi0:feat/generic-openai-saved-endpoints-fe87
Open

feat(generic-openai): saved endpoint connections dropdown#6065
Souravrajvi0 wants to merge 1 commit into
Mintplex-Labs:masterfrom
Souravrajvi0:feat/generic-openai-saved-endpoints-fe87

Conversation

@Souravrajvi0

@Souravrajvi0 Souravrajvi0 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Pull Request Type

  • ✨ feat (New feature)
  • 🐛 fix (Bug fix)
  • ♻️ refactor (Code refactoring without changing behavior)
  • 💄 style (UI style changes)
  • 🔨 chore (Build, CI, maintenance)
  • 📝 docs (Documentation updates)

Relevant Issues

resolves #3871

Description

Adds saved Generic OpenAI endpoint profiles so users can store multiple base URLs / API keys / models (e.g. RunPod workers, LAN servers, LiteLLM routes) and switch between them from a dropdown in LLM Preference — without retyping settings each time.

Backend

  • Persists profiles in storage/config/generic-openai-connections.json (gitignored; example file included)
  • Admin API: list, save, activate, delete
  • Selecting or saving a profile applies settings via existing updateENV path
  • API keys are stored server-side only; list/summary endpoints never return secrets

Frontend

  • Saved connection dropdown + Save / Delete actions on Generic OpenAI settings
  • Applying a saved profile reloads the form with the active ENV values

This is a scoped first step toward the broader “stored connections” direction noted on #3871 / #2002 / #1567 (Generic OpenAI only for now).

Visuals (if applicable)

N/A — dropdown + buttons above existing Generic OpenAI fields in LLM Preference.

Additional Information

Local testing

yarn lint:ci
yarn test server/__tests__/utils/llm/genericOpenAiConnections.test.js
cd frontend && yarn build
cd docker && export UID=0 GID=0 && docker compose up -d --build

Results:

  • yarn lint:ci — pass
  • Connection manager unit tests — 4/4 pass (create/list summaries hide secrets, update preserves API key when omitted, activate via updateENV, delete)
  • yarn build (frontend) — pass

Live API smoke test (yarn dev server + curl):

  • List / save / activate / update / delete saved connections — pass
  • setup-complete reflects applied Generic OpenAI fields after save/activate
  • List API returns hasApiKey only (no raw apiKey field)
  • Validation errors: missing name, unknown id, invalid URL — expected failures

Docker build & runtime (from docker/ per HOW_TO_USE_DOCKER.md):

  • docker compose up -d --buildsuccess (anythingllm-anything-llm:latest, ~4.67GB)
  • Container anythingllmhealthy, http://localhost:3001/api/ping{"online":true}
  • Saved-connections API exercised inside running container — save + setup-complete pass

Developer Validations

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

Resolves Mintplex-Labs#3871 by persisting named Generic OpenAI profiles (base URL,
API key, model, token limits) in storage/config/generic-openai-connections.json.

- Admin API to list, save, activate, and delete saved connections
- LLM Preference UI dropdown to switch profiles without retyping settings
- API keys stay server-side; summaries never return secret values
- Unit tests for connection manager lifecycle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT]: A drop down for keeping endpoints info saved under Generic OpenAI LLM service.

1 participant