feat(images): reuse named connections and image request settings

Preserve the reviewed tree while removing obsolete stacked branch history.

Co-authored-by: chengyongru <chengyongru.ai@gmail.com>
This commit is contained in:
Xubin Renandchengyongru committed 2026-10-12 21:22:35 +08:00
1 parent 105b772203
commit 23941355a8
27 files changed
+381 -44

No files matched your search

+12
View File
@@ -52,6 +52,18 @@ The WebUI hides provider storage details from the user. The agent sees the saved
## Configuration Reference
### Named custom connections
You can select a custom connection created in **Settings → Models → Manage providers**. Image generation uses its saved connection ID, URL, key, and proxy. Renaming the connection does not change its identity. You do not need a second connection named `custom`.
Selecting a custom connection uses the **OpenAI Images API** at its URL. Check that the endpoint supports `/images/generations`; support for chat alone does not imply image support. Existing built-in image adapters and the legacy `custom` connection keep their behavior. An unknown or removed connection is not replaced with another provider.
In the image settings' **Advanced options**, use **Headers** and **Body parameters** for image-only request differences. These fields are also available as `tools.imageGeneration.extraHeaders` and `extraBody`. Empty fields inherit provider defaults. Header names match without case sensitivity; each body key replaces its complete value, including nested objects and arrays. Adapter-specific request assembly runs afterward. Use only options documented by your image provider; watermark controls do not have one universal name or location.
Changing the image provider in WebUI clears these overrides so credentials do not follow the selection to another endpoint. Saved changes use the existing live image-tool reload. Chat model settings, prompts, and the tool schema are unchanged. Provider request headers are not added to generated-image downloads.
Existing installations need no migration. Older releases ignore the new image-only fields and do not resolve named custom image connections. Before downgrading, select a provider supported by that release and check any required request settings.
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `tools.imageGeneration.enabled` | boolean | `false` | Register the `generate_image` tool |