mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-01 04:42:10 +03:00
* feat(providers): add Freepik (Magnific Mystic) image generation provider (#6654) Adds an official, API-key-based Freepik image-gen provider using the Mystic endpoint (POST /v1/ai/mystic -> async task_id -> GET /v1/ai/mystic/{id} polling), modeled on the existing leonardo.ts generationId adapter pattern. - open-sse/config/providers/registry/freepik/index.ts: new registry module (kept separate to avoid pushing the frozen imageRegistry.ts over the file-size cap) with the 6 real Mystic style models (realism, fluid, zen, flexible, super_real, editorial_portraits) — not the "Flux/Imagen3" list from the original feature request, which independent research showed was stale. - open-sse/handlers/imageGeneration/providers/freepik.ts: submit+poll adapter; all error paths route through sanitizeErrorMessage() (Hard Rule #12), configurable poll interval/timeout via body.poll_interval_ms / poll_timeout_ms for fast, deterministic tests. - Registered in providers.ts (IMAGE_ONLY_PROVIDER_IDS) and apikey/specialty-media.ts (catalog metadata), with the corrected free-tier note (one-time ~€5 credit, not a recurring "100/month" allotment). Drops the "100 free credits/month" and "Flux/Imagen3 selectable models" claims from the original issue - verification showed the free tier is a one-time ~€5 API credit and Imagen 3 only underlies the `fluid` style, not a separately selectable model. Domain: api.freepik.com is still live as of this writing despite Freepik's April-2026 API-docs rebrand to Magnific (docs.freepik.com -> docs.magnific.com); noted inline for future re-verification. Closes #6654 * test: align APIKEY_PROVIDERS count to 171 after freepik + release merge (#7597)