• Unify the Select option structure as `{ key, label, value }`; add missing `key` to prevent duplicated rendering by Semi-UI.
• Trim and deduplicate the `models` array via `Set` inside `handleInputChange`, ensuring state always contains unique values.
• In the options-merging `useEffect`, use a `Map` keyed by `value` (after `trim`) to guarantee a unique `optionList` when combining backend data with currently selected models.
• Apply the same structure and de-duplication when:
– Fetching models from `/api/channel/models`
– Adding custom models (`addCustomModels`)
– Fetching upstream model lists (`fetchUpstreamModelList`)
• Replace obsolete `text` field with `label` in custom option objects for consistency.
No backend changes are required; the fix is entirely front-end.
Closes #1292
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| About | Loading commit data... | |
| Channel | Loading commit data... | |
| Chat | Loading commit data... | |
| Chat2Link | Loading commit data... | |
| Detail | Loading commit data... | |
| Home | Loading commit data... | |
| Log | Loading commit data... | |
| Midjourney | Loading commit data... | |
| NotFound | Loading commit data... | |
| Playground | Loading commit data... | |
| Pricing | Loading commit data... | |
| Redemption | Loading commit data... | |
| Setting | Loading commit data... | |
| Setup | Loading commit data... | |
| Task | Loading commit data... | |
| Token | Loading commit data... | |
| TopUp | Loading commit data... | |
| User | Loading commit data... |