Skip to content

🔌 feat: Custom Endpoints List and Editor Drawer (Wave 2) - #165

Merged
danny-avila merged 13 commits into
mainfrom
feat/config-w2-2-endpoints
Oct 23, 2026
Merged

danny-avila merged 13 commits into
mainfrom
feat/config-w2-2-endpoints

Conversation

@danny-avila

Copy link
Copy Markdown
Contributor

Stack 2/7 of the Wave 2 Configuration-page editors. Based on the previous PR in the stack (feat/config-w2-1-providers). Merge the stack bottom-up, or all at once with the GitHub stack merge.

Summary

Custom endpoints editor (Wave 2, WS10).

Replaces the stack of 25+ identical 3,000px accordion cards on the Custom endpoints tab with a compact list and an editor drawer.

List. Each row shows:

  • a monogram, the name, the host, the model count (marked when the list is also fetched);
  • where the endpoint comes from: librechat.yaml / + overrides / Added in admin; in a profile, Inherited / Base + profile / Added in profile;
  • New or Edited, and an 'Incomplete – not served' chip when LibreChat would skip it;
  • an actions menu (Edit, Revert to librechat.yaml, Delete).

A filter matches names, hosts and model ids. Pending deletions stay listed with Undo, and are read from the page's collection edits, so they survive Discard → Undo. The TOC, Ctrl+K and the review's Go to field open the editor at the field.

Editor drawer (with section nav):

  • Connection: the name is locked for YAML or Base endpoints (D1). A redacted YAML literal key shows as 'Not shown' with Replace instead of a red required field.
  • Models: duplicate-model warning; a blank model blocks saving.
  • Request shaping: header placeholders insert at the cursor; dropParams as tags with suggestions.
  • Behaviour: endpoint and model pickers.
  • Labels & reasoning: only set fields, plus 'Add a setting'.
  • Parameters: a rebuilt parameter-definition editor. Built-in parameter overrides; Default follows Type; components filtered by Type; built-in label/description shown as such; YAML keys locked.
  • Token pricing: a per-model rates table.
  • Other settings: schema keys no section places, and unknown keys read-only (D8).

Every overridden field has a Revert action, and unsaved fields have Edited/Undo.

Validation. Inline, before saving:

  • name: required, padding (also enforced by the save pre-flight), reserved, taken;
  • key, URL and models required;
  • blank and duplicate models;
  • renaming with a stored key requires re-entering it (CE-1).

Create flow. Starts from provider templates (OpenRouter, Groq, Mistral, DeepSeek, xAI, Together AI, Perplexity, Fireworks, Ollama, Blank). Create stays disabled until the endpoint is complete, and a filled-in draft asks before it is discarded.

Profiles. Inherited endpoints are read-only until 'Override for ', and saves write only the changed keys. Creating a name Base already uses is redirected to overriding it. 'Set values only' narrows the list to the profile's own endpoints.

Shared plumbing (additive):

  • CollectionEditsContext provided by ConfigPage;
  • an opt-in EntryFieldChipsContext in InlineField;
  • InlineRow puts the required asterisk next to the label and passes the control width, so URLs are wide.

Tests. Unit and RTL tests for validation, the renderer, parameter definitions, pricing and the tag input. The live-gated Playwright journeys are updated, including a new CE-1 test. axe reports 0 violations in light and dark.

Change Type

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)

Testing

  • At this stack level: npx tsc --noEmit (clean), npx vitest run (1933 tests pass) and npx eslint src/ e2e/ (clean).
  • Built in a dedicated worktree and verified live against a real LibreChat backend and MongoDB with a production-like librechat.yaml: acceptance criteria at 1440 and 390 px, light and dark, with screenshots.
  • The full stack was integrated and passed three rounds of independent live verification (functional with DB checks, UX/visual/axe, code review) plus the schema-coverage suite. At the top of the stack: 2400 tests, bun run test:lint-rules and vite build pass.

Test Configuration:

  • Bun 1.4.0; LibreChat dev (data-provider 0.8.527) with MongoDB 8.2

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes

Purpose-built AI providers editor (WS9, AP-1…AP-10).
Custom endpoints editor (Wave 2, WS10).
@danny-avila
danny-avila added this pull request to stack #171 October 20, 2026 07:38
@danny-avila

Copy link
Copy Markdown
Contributor Author

@codex review

Pass 1. Head: b35ef73

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T16:14:44.980572Z eb3ff9a Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

The configured-only filter now treats a path holding an unsaved value as set: provider groups, generic rows, sections and table-of-contents entries stay shown, so a pending edit of an unset setting never disappears behind the filter. isPathSet moves to counts.ts as the single rule.
@danny-avila

Copy link
Copy Markdown
Contributor Author

@codex review

Pass 2. Head: 0585188

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0585188471

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/utils/validation.ts
Comment thread src/components/configuration/sections/endpoints/CustomEndpointsRenderer.tsx Outdated
Comment thread src/components/configuration/sections/endpoints/Request.tsx
Collapsed provider cards and groups summarized a pending API key as plain text. Secret fields (as the field renderer detects them) now show the masked placeholder; environment references stay visible.
Undo inserted a removed endpoint at its loaded position in the shortened pending list, so undoing B after deleting A and B from [A, B, C] gave [C, B]. It now goes back before the first surviving endpoint that was loaded after it.
…ues Only

In a profile, the first pending edit of an inherited endpoint is not yet a stored override, so the set-values-only filter hid the row as soon as its drawer closed. Edited rows now stay listed.
Override a built-in parameter appended only { key, default }. LibreChat expands librechat.yaml definitions at startup but serves an override's as stored, and its client replaces the built-in definition with it whole, so the parameter lost its type, component and label. The full built-in definition is now stored (optionType custom, as LibreChat expands it), and a definition that differs from its built-in only in its default still opens as a default override.
The headers editor remembered every focused text input, header names included, so picking a placeholder after focusing a name wrote it into the name. Key/value inputs now carry data-kv-part, only value inputs are tracked, and with no value focused the placeholder is copied instead.
@danny-avila

Copy link
Copy Markdown
Contributor Author

@codex review

Pass 3. Head: de1e539

@danny-avila

Copy link
Copy Markdown
Contributor Author

@codex review

Pass 4 of 4 (final review). Head: eb3ff9a

This is the final review: please flag only blocking issues.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: eb3ff9af26

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danny-avila
danny-avila removed this pull request from stack #171 October 23, 2026 04:44
@danny-avila
danny-avila changed the base branch from feat/config-w2-1-providers to main October 23, 2026 04:45
@danny-avila
danny-avila merged commit 37d8db5 into main Oct 23, 2026
3 checks passed
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.

1 participant