Merge branch 'feat/model-plugins-implementing' into deploy/dev

# Conflicts:
#	web/app/components/base/chat/chat/hooks.ts
#	web/app/components/header/account-setting/model-provider-page/model-parameter-modal/trigger.tsx
#	web/package.json
#	web/pnpm-lock.yaml
This commit is contained in:
yyh
2026-03-10 19:03:29 +08:00
72 changed files with 2442 additions and 1500 deletions

View File

@ -88,10 +88,15 @@ const AddExternalAPIModal: FC<AddExternalAPIModalProps> = ({ data, onSave, onCan
try {
setLoading(true)
if (isEditMode && onEdit) {
// Only send [__HIDDEN__] when the user has not changed the key, otherwise
// send the actual api_key so updated tokens are persisted.
const apiKeyToSend = formData.settings.api_key === '[__HIDDEN__]'
? '[__HIDDEN__]'
: formData.settings.api_key
await onEdit(
{
...formData,
settings: { ...formData.settings, api_key: formData.settings.api_key ? '[__HIDDEN__]' : formData.settings.api_key },
settings: { ...formData.settings, api_key: apiKeyToSend },
},
)
notify({ type: 'success', message: 'External API updated successfully' })