Skip to content

feat: Batch Import Models — bulk add models via JSON/CSV/plain text#3700

Open
suer781 wants to merge 2 commits into
chatboxai:mainfrom
suer781:feat/batch-import-models
Open

feat: Batch Import Models — bulk add models via JSON/CSV/plain text#3700
suer781 wants to merge 2 commits into
chatboxai:mainfrom
suer781:feat/batch-import-models

Conversation

@suer781
Copy link
Copy Markdown

@suer781 suer781 commented May 5, 2026

Summary

Adds a Batch Import feature to the model management UI, allowing users to add multiple models at once instead of one by one.

What's New

  • BatchImportModelsModal — New component that accepts model lists in three formats:
    • JSON array: [{"modelId":"gpt-4o","name":"GPT-4o","type":"chat"}]
    • CSV: modelId,name,type,contextWindow
    • Plain text: One model per line or comma-separated names
  • Batch Import button in ModelManagement — Added next to existing Reset/Fetch buttons
  • Preview & validation — Shows parsed models before import with:
    • Duplicate detection (existing models highlighted)
    • Per-model removal from preview
    • Model type and context window display
    • Clipboard paste support

Files Changed

File Change
src/renderer/components/BatchImportModelsModal.tsx New component
src/renderer/routes/settings/provider/chatbox-ai/-components/ModelManagement.tsx Added import + button

Why This Is Useful

Currently, users who want to add many custom models (e.g., from a self-hosted API with dozens of models) must add them one at a time through the UI. This PR allows bulk import from a simple list, saving significant time.

Screenshots

The modal shows a textarea for input, a "Parse & Preview" button, and a preview table with model details and duplicate indicators.

suer781 added 2 commits May 5, 2026 20:47
Supports JSON, CSV, and plain text input.
Includes preview, duplicate detection, and per-model removal.
Adds 'Batch Import' button next to Reset/Fetch.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 5, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f3db4d3d-f104-4acf-ac13-a26068598bf7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

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