Skip to content

feat(admin): paste allowed model lists - #3702

Merged
steebchen merged 1 commit into
mainfrom
add-allowed-models-dialog
Aug 19, 2026
Merged

steebchen merged 1 commit into
mainfrom
add-allowed-models-dialog

Conversation

@steebchen

@steebchen steebchen commented Aug 19, 2026 •

Copy link
Copy Markdown
Member

Summary

  • add an explicit paste-list dialog alongside manual allowed-model selection
  • accept newline, comma, space, semicolon, JSON-style, and provider-prefixed model IDs
  • preserve existing selections, remove duplicates, and block unknown model IDs with actionable feedback
  • cover list parsing with focused unit tests

Verification

  • pnpm format
  • pnpm build
  • pnpm exec vitest run ee/admin/src/lib/provider-model-list.spec.ts --no-file-parallelism
  • Playwright flow covering list paste, duplicate removal, manual selection, unknown IDs, and light/dark themes

Screenshots

Light

Before After
Allowed models before, light Allowed models after, light

Dark

Before After
Allowed models before, dark Allowed models after, dark

Paste states

Valid list Unknown ID feedback
Valid pasted model list Unknown model ID feedback

Summary by CodeRabbit

  • New Features

    • Added a dialog for administrators to paste multiple allowed model IDs at once.
    • Supports newline-, comma-, space-, and semicolon-separated lists, including JSON-style arrays.
    • Automatically removes duplicates and recognizes provider-prefixed model IDs.
    • Displays unknown model IDs and prevents submission until they are corrected.
    • Repositioned self-test and model-verification controls below the model selector.
  • Tests

    • Added coverage for parsing, duplicate removal, provider prefixes, and unknown models.

Copilot AI lite review requested due to automatic review settings August 19, 2026 22:20

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 68373c34-18be-465d-80f3-c84a3dd65ac6

📥 Commits

Reviewing files that changed from the base of the PR and between 270f492 and ea34ec5.

📒 Files selected for processing (3)
  • ee/admin/src/components/provider-credentials-manager.tsx
  • ee/admin/src/lib/provider-model-list.spec.ts
  • ee/admin/src/lib/provider-model-list.ts

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.


Walkthrough

Adds parsing and validation for pasted provider model IDs. Integrates a dialog into the allowed-models form. The dialog handles delimiters, duplicates, provider prefixes, unknown IDs, and existing selections.

Changes

Allowed model pasting

Layer / File(s) Summary
Model list parsing and validation
ee/admin/src/lib/provider-model-list.ts, ee/admin/src/lib/provider-model-list.spec.ts
Adds parseProviderModelList and ParsedProviderModelList. The parser handles mixed delimiters, JSON-style arrays, provider prefixes, duplicates, and unknown model IDs. Tests cover these cases.
Allowed-models dialog integration
ee/admin/src/components/provider-credentials-manager.tsx
Adds PasteAllowedModelsDialog, connects it to the provider catalogue and current selections, and moves the self-test and model-verification controls below the selector.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to ea34e

This PR adds a localized paste-list workflow for allowed models with duplicate removal and unknown-ID feedback; no actionable merge-blocking risk remains after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant Administrator
  participant PasteAllowedModelsDialog
  participant parseProviderModelList
  participant ProviderCatalogue
  Administrator->>PasteAllowedModelsDialog: Paste model IDs
  PasteAllowedModelsDialog->>parseProviderModelList: Parse input
  parseProviderModelList->>ProviderCatalogue: Validate model IDs
  ProviderCatalogue-->>parseProviderModelList: Known and unknown IDs
  parseProviderModelList-->>PasteAllowedModelsDialog: Return parsed IDs
  PasteAllowedModelsDialog-->>Administrator: Show validation result
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding support for pasting allowed model lists in the admin interface.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-allowed-models-dialog

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@steebchen
steebchen merged commit 346bef3 into main Aug 19, 2026
15 of 16 checks passed
@steebchen
steebchen deleted the add-allowed-models-dialog branch August 19, 2026 22:28
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.

2 participants