fix(external-providers): admin guard, validation, locale keys (#9171)
* fix(external-providers): admin guard, validation, locale keys
- Require AdminUserOrDefault on POST/DELETE /external_providers/config/{id}
so non-admins in multiuser mode can no longer set/reset shared credentials
- Reject Seedream batch requests where references + init + outputs > 15
before posting, surfacing ExternalProviderCapabilityError instead of a
provider-side 400
- Surface Seedream batch item errors via provider_metadata.partial_failures
and raise when every item failed, instead of silently dropping filtered
results
- Set max_reference_images=3 on Qwen Image Edit Max so the central validator
enforces the documented limit before hitting DashScope
- Add missing parameters.* locale keys (quality, background, inputFidelity,
temperature, thinkingLevel, watermark, optimizePrompt) so the OpenAI,
Gemini, and Seedream option panels render their labels without fallbacks
* i18n(external): localise OpenAI/Gemini select option labels
Wrap the visible <option> text in OpenAIProviderOptions and
GeminiProviderOptions with t(...) so non-English locales translate
the values alongside their <FormLabel> (previously the labels
translated but Auto/High/Medium/Low/Transparent/Opaque/Default/
Minimal stayed English). Adds the matching
parameters.{quality,background,inputFidelity,thinkingLevel}Options
keys to en.json and a colocated vitest guard that fails if any
<FormLabel> or <option> in External/*ProviderOptions.tsx contains
a raw literal instead of a {t(...)} expression.
* fix(canvas): gate drop tiles by current model's supported entity types
The Canvas drop area registered every <DndDropTarget> as long as the
canvas wasn't busy, so dragging an image onto the "Regional Reference
Image" tile created a regional_guidance layer even when the active
model didn't support it (e.g. OpenAI/Gemini/Seedream). The
layer-creation menu already disables those entries via
useIsEntityTypeEnabled, but the drop tiles bypassed that check.
Pull useIsEntityTypeEnabled into CanvasDropArea and OR each tile's
isDisabled with !isEnabled for its entity type. Same fix closes the
symmetric gaps for SD3 / CogView4 / Flux Kontext on the control-layer
and inpaint-mask tiles, mirroring the menu in one place.
* Chore Ruff Format
* chore: openapi
---------
Co-authored-by: Jonathan <34005131+JPPhoto@users.noreply.github.com>
Co-authored-by: JPPhoto <jpollack@jpollackphoto.com> A
Alexander Eichhorn committed
028c976ea42991a864ac817269ce40b87d28de72
Parent: 61d1eaa
Committed by GitHub <noreply@github.com>
on 5/18/2026, 7:11:29 PM