Repository navigation
fix: register a real Firefly auth probe for the firefly/adobe-firefly alias pair (#10522) - #10743
Merged
diegosouzapw merged 1 commit intoAug 19, 2026
Merged
Conversation
HouMinXi
pushed a commit
to HouMinXi/OmniRoute
that referenced
this pull request
Aug 20, 2026
… alias pair (diegosouzapw#10522) (diegosouzapw#10743) Co-authored-by: Markus Hartung <mail@hartmark.se>
giauphan
pushed a commit
to giauphan/OmniRoute
that referenced
this pull request
Aug 20, 2026
… alias pair (diegosouzapw#10522) (diegosouzapw#10743) Co-authored-by: Markus Hartung <mail@hartmark.se>
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
… alias pair (diegosouzapw#10522) (diegosouzapw#10743) Co-authored-by: Markus Hartung <mail@hartmark.se>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #10522
Root cause
validateProviderApiKey()insrc/lib/providers/validation.tsnever reached a real auth check for Adobe Firefly connections.WEB_COOKIE_PROVIDERSis keyed by the canonical id"adobe-firefly", butconnection.provideris commonly stored as the short alias"firefly"(same prefix as thefirefly/<model>routing ids). The web-cookie fallback did a rawWEB_COOKIE_PROVIDERS[provider]lookup with no alias normalization, so it missed the table for alias-keyed connections — the exact pattern already handled correctly elsewhere (src/sse/services/auth.ts:412:resolveProviderId(provider) in WEB_COOKIE_PROVIDERS). Even with that fixed, Firefly has no entry in the chatproviderRegistry(it's image/video-only, registered only inimageRegistry.ts/videoRegistry.ts), so the generic web-cookie probe'sgetRegistryEntry(provider)always returnednulland every Firefly "Test Connection" fell into the{ valid: false, error: "Provider validation not supported", unsupported: true }fallback — regardless of whether the pasted cookie/JWT was valid.Note: the other claim in #10522 (routing a Firefly image model to
/v1/chat/completionsreturns an error telling the caller to use/v1/images/generations) is intentional, correct behavior — OmniRoute's image-model guard — and is not touched by this PR.Fix
src/lib/providers/validation/adobeFirefly.ts—validateAdobeFireflyProvider()reuses the already-working credits/balance probe (getAdobeFireflyUsage(), used today by the Limits/quota page) as a real auth signal: a fetched balance means the token is valid, a{ message }result means it was rejected, and thrown transport errors route throughtoValidationErrorResult()."adobe-firefly"and"firefly"inSPECIALTY_VALIDATORS(that map is looked up by the raw, unresolved provider string).WEB_COOKIE_PROVIDERS[provider]fallback lookup withresolveProviderId(), mirroring the existing pattern insrc/sse/services/auth.ts.Regression test
tests/unit/firefly-cookie-validation-10522.test.ts(new, 5 tests):resolveProviderId('firefly')stays'adobe-firefly'(guards the dual-key registration).fireflyalias andadobe-fireflycanonical id both dispatch to the real validator, not the genericunsupportedfallback.valid:falsewith a real error message.valid:true.Fail → pass evidence (repro probe from the plan-file,
_tasks/pipeline/bugs/2-implementing/10522-firefly-cookie-validation-alias-miss.plan.md):AssertionError: expected a real Firefly auth probe, but got the generic "unsupported" fallback: {"valid":false,"error":"Provider validation not supported","unsupported":true}Gates run
node --import tsx/esm --test tests/unit/firefly-cookie-validation-10522.test.ts— 5/5 passaihorde-key-validation,bytez-validation-5422,bailian-coding-plan-provider,azureAiMultiModelTest,alibaba-provider-regions,devin-cloud-agent-validator-6142,repro-6142-devin-cloud-agent-unwired) — 74/74 pass, no regressions from theresolveProviderIdnormalizationnode scripts/check/check-file-size.mjs— OKnode scripts/check/check-changelog-integrity.mjs— OKnpm run typecheck:core— clean, exit 0npx eslint --suppressions-location config/quality/eslint-suppressions.json <changed files>— clean, no outputcheck-complexity.mjs/check-cognitive-complexity.mjswere attempted locally but did not finish in a reasonable time on this devbox due to heavy parallel-session contention (~60 concurrent worktrees); the diff is a single small leaf function plus one object-literal entry and aresolveProviderId()wrap, so complexity/cognitive-complexity ratchet risk is negligible — CI will gate this independently.