Repository navigation
feat: add Microsoft Designer as image provider (#6672) - #7609
Merged
diegosouzapw merged 3 commits intoJul 17, 2026
Merged
Conversation
Adds `microsoft-designer-web` — an unofficial, reverse-engineered Bearer-token web-session image provider, modeled on the existing `chatgpt-web`/`copilot-m365-web` "-web" provider category. - Registers the provider in WEB_COOKIE_PROVIDERS (src/shared/constants/ providers/web-cookie.ts) and IMAGE_PROVIDERS (open-sse/config/ imageRegistry.ts, new "designer-web" format). - New handler open-sse/handlers/imageGeneration/providers/designerWeb.ts implements the submit-then-poll DallE.ashx flow (Bearer access_token + ClientId/SessionId/UserId headers -> form POST -> poll for image_urls_thumbnail), wired into handleImageGeneration()'s dispatch. - The upstream ClientId header is a fixed, publicly-shared value (not a secret) — routed through resolvePublicCred() per Hard Rule #11, never as a string literal. - Registers the token-based credential requirement in webSessionCredentials.ts so the provider-connect UI asks for the right field; connection validation falls back to the existing generic web-cookie session-ping validator (no dedicated validator needed). - Extracted the KIE image-model catalog into a co-located open-sse/config/providers/registry/kie/models.ts module (mirrors the existing lmarena/directModels.ts pattern) to keep imageRegistry.ts under the file-size cap while adding the new provider entry. - Regenerated docs/reference/PROVIDER_REFERENCE.md (250 -> 251 providers) and updated the plain-text counts in README.md, AGENTS.md, CLAUDE.md. Tests (tests/unit/microsoft-designer-web-6672.test.ts, 16 cases): registry-entry shape assertions, the resolvePublicCred() shape assertion (Hard Rule #11), and the pure header/form-body/response- parsing helpers plus the handler's submit/poll/error/timeout paths against a mocked fetch — no live Designer session required. Reverse-engineered from the g4f MicrosoftDesigner.py provider reference (researched during #6672 triage); the exact upstream response shape has not been validated against a live Designer session, so the poll-loop implementation follows the documented g4f contract as closely as possible without a live capture.
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
…ner-web env vars (#6672)
…microsoftdesigner-image-provider # Conflicts: # AGENTS.md # CLAUDE.md # README.md # docs/reference/PROVIDER_REFERENCE.md # open-sse/config/imageRegistry.ts # open-sse/handlers/imageGeneration.ts # open-sse/utils/publicCreds.ts
HouMinXi
pushed a commit
to HouMinXi/OmniRoute
that referenced
this pull request
Aug 2, 2026
… (cheaper-inference#7609) * feat(sse): add Microsoft Designer as image provider (cheaper-inference#6672) Adds `microsoft-designer-web` — an unofficial, reverse-engineered Bearer-token web-session image provider, modeled on the existing `chatgpt-web`/`copilot-m365-web` "-web" provider category. - Registers the provider in WEB_COOKIE_PROVIDERS (src/shared/constants/ providers/web-cookie.ts) and IMAGE_PROVIDERS (open-sse/config/ imageRegistry.ts, new "designer-web" format). - New handler open-sse/handlers/imageGeneration/providers/designerWeb.ts implements the submit-then-poll DallE.ashx flow (Bearer access_token + ClientId/SessionId/UserId headers -> form POST -> poll for image_urls_thumbnail), wired into handleImageGeneration()'s dispatch. - The upstream ClientId header is a fixed, publicly-shared value (not a secret) — routed through resolvePublicCred() per Hard Rule cheaper-inference#11, never as a string literal. - Registers the token-based credential requirement in webSessionCredentials.ts so the provider-connect UI asks for the right field; connection validation falls back to the existing generic web-cookie session-ping validator (no dedicated validator needed). - Extracted the KIE image-model catalog into a co-located open-sse/config/providers/registry/kie/models.ts module (mirrors the existing lmarena/directModels.ts pattern) to keep imageRegistry.ts under the file-size cap while adding the new provider entry. - Regenerated docs/reference/PROVIDER_REFERENCE.md (250 -> 251 providers) and updated the plain-text counts in README.md, AGENTS.md, CLAUDE.md. Tests (tests/unit/microsoft-designer-web-6672.test.ts, 16 cases): registry-entry shape assertions, the resolvePublicCred() shape assertion (Hard Rule cheaper-inference#11), and the pure header/form-body/response- parsing helpers plus the handler's submit/poll/error/timeout paths against a mocked fetch — no live Designer session required. Reverse-engineered from the g4f MicrosoftDesigner.py provider reference (researched during cheaper-inference#6672 triage); the exact upstream response shape has not been validated against a live Designer session, so the poll-loop implementation follows the documented g4f contract as closely as possible without a live capture. * fix(providers): satisfy web-cookie executor contract + document designer-web env vars (cheaper-inference#6672)
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
… (cheaper-inference#7609) * feat(sse): add Microsoft Designer as image provider (cheaper-inference#6672) Adds `microsoft-designer-web` — an unofficial, reverse-engineered Bearer-token web-session image provider, modeled on the existing `chatgpt-web`/`copilot-m365-web` "-web" provider category. - Registers the provider in WEB_COOKIE_PROVIDERS (src/shared/constants/ providers/web-cookie.ts) and IMAGE_PROVIDERS (open-sse/config/ imageRegistry.ts, new "designer-web" format). - New handler open-sse/handlers/imageGeneration/providers/designerWeb.ts implements the submit-then-poll DallE.ashx flow (Bearer access_token + ClientId/SessionId/UserId headers -> form POST -> poll for image_urls_thumbnail), wired into handleImageGeneration()'s dispatch. - The upstream ClientId header is a fixed, publicly-shared value (not a secret) — routed through resolvePublicCred() per Hard Rule cheaper-inference#11, never as a string literal. - Registers the token-based credential requirement in webSessionCredentials.ts so the provider-connect UI asks for the right field; connection validation falls back to the existing generic web-cookie session-ping validator (no dedicated validator needed). - Extracted the KIE image-model catalog into a co-located open-sse/config/providers/registry/kie/models.ts module (mirrors the existing lmarena/directModels.ts pattern) to keep imageRegistry.ts under the file-size cap while adding the new provider entry. - Regenerated docs/reference/PROVIDER_REFERENCE.md (250 -> 251 providers) and updated the plain-text counts in README.md, AGENTS.md, CLAUDE.md. Tests (tests/unit/microsoft-designer-web-6672.test.ts, 16 cases): registry-entry shape assertions, the resolvePublicCred() shape assertion (Hard Rule cheaper-inference#11), and the pure header/form-body/response- parsing helpers plus the handler's submit/poll/error/timeout paths against a mocked fetch — no live Designer session required. Reverse-engineered from the g4f MicrosoftDesigner.py provider reference (researched during cheaper-inference#6672 triage); the exact upstream response shape has not been validated against a live Designer session, so the poll-loop implementation follows the documented g4f contract as closely as possible without a live capture. * fix(providers): satisfy web-cookie executor contract + document designer-web env vars (cheaper-inference#6672)
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 #6672
What was built
Adds
microsoft-designer-web— an unofficial, reverse-engineered Bearer-token web-session image provider (matches the existingchatgpt-web/copilot-web/copilot-m365-web"-web" provider category), reverse-engineered from the g4fMicrosoftDesigner.pyprovider reference (fetched and verified during #6672 triage).microsoft-designer-webentry inWEB_COOKIE_PROVIDERS(src/shared/constants/providers/web-cookie.ts) andIMAGE_PROVIDERS(open-sse/config/imageRegistry.ts, new"designer-web"format), modeled oncopilot-m365-web's access-token auth UX.open-sse/handlers/imageGeneration/providers/designerWeb.ts): implements the submit-then-pollDallE.ashx?action=GetDallEImagesCogSciflow — Beareraccess_token+ClientId/SessionId/UserIdheaders, form-encoded POST, poll untilimage_urls_thumbnail[].ImageUrlis populated (bounded by a timeout), wired intohandleImageGeneration()'s format dispatch.ClientIdheader is a fixed, publicly-shared value every Designer browser session sends (not a secret) — routed throughresolvePublicCred("microsoft_designer_client_id")per Hard Rule chore(ui): rebrand to OmniRoute #11, never as a string literal.webSessionCredentials.tsso the provider-connect UI asks for the right field; connection validation falls back to the existing generic web-cookie session-ping validator (validateWebCookieProvider) — no dedicated validator needed.open-sse/config/providers/registry/kie/models.tsmodule (mirrors the existinglmarena/directModels.tspattern) to keepimageRegistry.tsunder the 800-line cap while adding the new provider entry (789 → 753 → 767 lines).docs/reference/PROVIDER_REFERENCE.md(250 → 251 providers) and updated the plain-text provider counts inREADME.md,AGENTS.md,CLAUDE.md(anchors/badges/historical changelog mentions of "250" left untouched per the docs-counts gate's guidance).changelog.d/features/6672-microsoftdesigner-image-provider.md.Validation gate (Hard Rule #18 — TDD)
tests/unit/microsoft-designer-web-6672.test.ts— 16 cases, all pass undernode --import tsx/esm --test:WEB_COOKIE_PROVIDERS/IMAGE_PROVIDERS)resolvePublicCred()shape assertion required for any embedded public credential (Hard Rule chore(ui): rebrand to OmniRoute #11) — asserts the raw ClientId literal never appears indesignerWeb.tsmapDesignerWebImageSize,buildDesignerWebHeaders,buildDesignerWebFormBody,parseDesignerWebResponsefetch(fetchImplinjection point) — no live Microsoft Designer session requiredCaveat: the exact upstream response shape (submit vs. poll,
polling_response.polling_meta_datafields) has not been validated against a live Designer session — it follows the g4f reference as closely as possible without a live HAR capture. Flagging this explicitly per the plan-file's own risk note ("reference-implementation drift... needs a smoke test against a live Designer session before merge").Gates run (all green)
npm run typecheck:core— cleannpm run typecheck:noimplicit:core— clean (pre-existing errors incombo.ts/usageTracking.ts/cliRuntime.tsunrelated to this change, confirmed againstorigin/release/v3.8.49)npx eslint --suppressions-location config/quality/eslint-suppressions.json <changed files>— 0 errorsnode scripts/check/check-file-size.mjs— OK (143 frozen files, cap 800 for new files)npm run check:complexity-ratchets— OK, both cyclomatic (2055 ≤ 2056 baseline) and cognitive (889 ≤ 890 baseline) — net improvement from the KIE-model extractionnpm run check:cycles— no cyclesnode scripts/check/check-test-discovery.mjs— OK, new test file discovered by thetest:unitcollectornpm run check:any-budget:t11— OK, no newanyusagenode scripts/check/check-docs-counts-sync.mjs— STRICT provider-count check green (251)node scripts/check/check-docs-sync.mjs— PASSawaitadded in anysrc//open-sse/moduleNot run:
npm run test:coverage(shared-box constraint per instructions) — ran the new test file plus targeted adjacent suites (nanobanana-image-generation,chatgpt-web,trae-publiccred,publicCreds) instead, all green (102/102).