mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-02 05:12:11 +03:00
Pollinations image requests with no configured apiKey/accessToken (the common free case) were sent with no Authorization header AND no fingerprint headers, so Pollinations' own upstream legitimately rejected them with a real 401 even for a valid OmniRoute key. The chat path already has an anonymous fingerprint-pool fallback (PollinationsExecutor.execute()'s isAnonymous branch); the image path never reused it. Adds open-sse/handlers/imageGeneration/pollinationsAnonAuth.ts, mirroring the chat executor's anonymous session-pool fallback for handleOpenAIImageGeneration, and fixes the pre-existing bug where Authorization was set to the literal string "Bearer undefined" when no token was configured (now correctly gated by if (token)). Regression test: tests/unit/pollinations-image-anon-fallback-8085.test.ts