- Add /v1 path auto-detection: when BASE_URL omits /v1 and gets 403/404,
automatically retry with /v1 prefix (generate, edit, list_models)
- Add minimal params fallback after /v1 retry for providers that reject
response_format (e.g. Agnes)
- Return image_url content block for URL results so Desktop IDE renders
images inline in the conversation
Co-authored-by: 你的姓名 <you@example.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
- MCP server tests (21 cases): initialize, tools/list, list_providers
with capabilities, generate_image validation, edit_image capability
check, SSRF protection (IPv4/IPv6/protocol), model capabilities
matching, unknown tool, ping
- Server API tests: GET/POST /api/plugins/options with schema filtering,
sensitive value masking, missing field validation
- Desktop component tests: PluginConfigModal render, fetch, save with
masked sensitive field skip, error handling, cancel flow
- Fix MCP server async message handling: track pending promises and
wait for completion before process exit
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
HIGH fixes:
- Complete SSRF protection: add IPv6 private (fc00::, fe80::),
IPv4-mapped IPv6 (::ffff:10.x), and 0.0.0.0 to blocklist
- Validate provider baseUrl against private IP ranges at load time
- Extract shared validateUrlSafety() for reuse
MEDIUM fixes:
- Skip unchanged masked sensitive fields on save (prevent '********'
from overwriting real API keys)
- Filter POST /api/plugins/options to only schema-declared keys
- Whitelist img src to http/https/data protocols only
- Improve model capabilities matching: exact → prefix → contains
- Cache providers at startup instead of per-tool-call
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Strip brackets from hostname returned by new URL() for IPv6 literals
like [::1]. Previously the check compared against '::1' (unbracketed)
but new URL() returns '[::1]' (bracketed), allowing the SSRF block
to be bypassed.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Agent can now query provider capabilities via list_providers to know:
- Supported image sizes per model
- Whether the model supports image editing
- Whether transparent background is supported
- Max number of images per request (n)
- Response format (url vs b64_json)
Built-in database covers: Agnes image, GPT-image-2, DALL-E 2/3,
Gemini image, Flux, Stable Diffusion. Unknown models get pattern-based
defaults or "unknown" with full compatibility fallback.
generate_image now validates size against capabilities and warns on
mismatch. edit_image checks if any provider supports editing before
attempting.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
HIGH fixes:
- SSRF protection: block private/link-local IPs and file:// URLs
in edit_image image_url parameter
- Mask sensitive values in GET /api/plugins/options response
MEDIUM fixes:
- Clamp n parameter to 1-10 to prevent API bill exhaustion
- Validate prompt is non-empty string before API call
- Return empty array when no providers configured (clear error)
- Add 1MB buffer limit for JSON-RPC line accumulation
- Fix PluginConfigModal useEffect re-fetch loop on parent re-render
LOW fixes:
- Remove unused requestId variable
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>