Repository navigation
fix(kie): correct 12 more mismatched KIE Market model ids (#11296) - #11667
Merged
Merged
Conversation
PR #11326 claimed every KIE Market catalog id except google-imagen already matched its real KIE-documented upstream id. That claim was false: GPT Image 2 T2I/I2I, GPT Image 1.5 T2I/I2I, Seedream 5.0 Lite T2I/I2I, all 4 Flux 2 variants, and Wan 2.7 Image/Image Pro were all sent to KIE's createTask unchanged despite diverging from the id KIE actually documents, reproducing the reporter's post-fix failures. Each new mapping was verified individually against the literal example request JSON on docs.kie.ai (never inferred by pattern, since that is exactly how the prior "everything else matches" claim went wrong). z-image/4.0-*, z-image/4.5-* and flux/kontext remain unresolved and are documented as open follow-ups in the map's comment: the only documented Z-Image page shows a single fixed model id with no version-specific variant, and flux/kontext has no Market createTask documentation at all (it lives under a separate /flux-kontext-api/* endpoint), so neither can be safely auto-fixed without further investigation.
This was referenced Aug 26, 2026
Collaborator
Author
|
Validated in local merge-train (train tip a3a96af7308584900f0fab3ab4afd8499391230a, boarded #11663 #11664 #11665 #11667 #11668 #11669 #11670 #11678 on .113 /srv/omniroute-train) — typecheck:core, file-size, complexity, cognitive-complexity, changelog-integrity all GREEN. npm run test:unit showed 21 failures across 15 test files, none touching this PR's diff; reproduced identically (same test names, same asserts) on origin/release/v3.8.51 alone with zero PRs boarded (targeted re-run, 21/94 fail, same failure set) — confirmed base-red/environment-load drift per merge-gates.md §3, not introduced by any of the 8 boarded PRs. |
This was referenced Aug 26, 2026
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
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.
Refs #11296
release/v3.8.51, unrelated to this diff)Root cause
PR #11326 (merged for #11225) fixed the 4
google-imagen/*KIE Market ids and asserted every other Market namespace "already matches its real upstream id byte-for-byte." That claim was never actually checked against docs.kie.ai for anything beyondgoogle-imagen, and it was wrong:open-sse/handlers/imageGeneration.ts'sKIE_MARKET_UPSTREAM_MODEL_IDSmap sent several more catalog ids toPOST https://api.kie.ai/api/v1/jobs/createTaskunchanged even though they diverge from KIE's documentedmodelvalue — exactly reproducing the reporter's post-fix complaint ("GPT Image 2, Flux, Seedream... The model name you specified is not supported").TDD
A repro test (
tests/unit/kie-market-upstream-id-11296-probe.test.ts, reused verbatim from the triage plan-file) proved 5/5 assertions RED against unfixedrelease/v3.8.51code:What this PR fixes (verified individually against the literal example request JSON on docs.kie.ai — not inferred by pattern)
gpt/gpt-image-2-text-to-imagegpt/gpt-image-2-text-to-imagegpt-image-2-text-to-imagegpt/gpt-image-2-image-to-imagegpt/gpt-image-2-image-to-imagegpt-image-2-image-to-imagegpt/gpt-image-1.5-text-to-imagegpt/gpt-image-1.5-text-to-imagegpt-image/1.5-text-to-imagegpt/gpt-image-1.5-image-to-imagegpt/gpt-image-1.5-image-to-imagegpt-image/1.5-image-to-imageseedream/5.0-lite-text-to-imageseedream/5.0-lite-text-to-imageseedream/5-lite-text-to-imageseedream/5.0-lite-image-to-imageseedream/5.0-lite-image-to-imageseedream/5-lite-image-to-imageflux/2-pro-text-to-imageflux/2-pro-text-to-imageflux-2/pro-text-to-imageflux/2-pro-image-to-imageflux/2-pro-image-to-imageflux-2/pro-image-to-imageflux/2-text-to-imageflux/2-text-to-imageflux-2/flex-text-to-imageflux/2-image-to-imageflux/2-image-to-imageflux-2/flex-image-to-imagewan/2.7-imagewan/2.7-imagewan/2-7-imagewan/2.7-image-prowan/2.7-image-prowan/2-7-image-proThe last 2 (Wan) were not in the original issue report — found during the mandatory full catalog sweep requested by the triage plan-file.
What I re-verified as already correct (no change)
Seedream 4.5 (T2I + edit), google-imagen (all 4, from #11326), grok-imagine, ideogram (
v3-text-to-image,v3-edit,v3-remix— each individually confirmed;v3-reframehas no dedicated docs.kie.ai page as of this sweep, assumed correct by sibling pattern only), qwen, qwen2.What remains open (not fixed here — documented in the map's comment,
RefsnotCloses)z-image/4.0-text-to-image,z-image/4.5-text-to-image— the only documented Z-Image Market page (docs.kie.ai/market/z-image/z-image) shows a single fixedmodelenum value"z-image"with no version-specific id orversioninput parameter found in 3 separate lookup attempts. Unclear whether both catalog ids should collapse to the same upstream call, or whether the catalog itself needs correcting — needs a human/vendor-support decision, not a guess.flux/kontext— nodocs.kie.ai/market/flux2/kontext(or similar) Market page exists. Flux Kontext is documented under the separate/flux-kontext-api/*docs tree with its own endpoint (POST /api/v1/flux/kontext/generate, modelsflux-kontext-pro/flux-kontext-max), not the MarketcreateTaskflow this map feeds. This entry may be miscatalogued asisMarket: trueinopen-sse/config/providers/registry/kie/imageModels.tsand need a dedicated reroute (new endpoint wiring) rather than an id rewrite — out of scope for a data-correctness fix; confirmed there is no existing KIE-specific direct-routing hook for it inimageGeneration.tstoday.Gates run
node scripts/check/check-file-size.mjs— OKnode scripts/check/check-complexity.mjs— OK (2684 violations vs baseline 2774)node scripts/check/check-cognitive-complexity.mjs— OK (1208 violations vs baseline 1223)node scripts/check/check-changelog-integrity.mjs— OKnpm run typecheck:core— clean, exit 0npx eslint --suppressions-location config/quality/eslint-suppressions.json <changed files>— clean, exit 0node --import tsx/esm --test tests/unit/kie-market-upstream-model-id-11225.test.ts tests/unit/kie-market-upstream-id-11296-probe.test.ts— 27/27 passnode --import tsx/esm --test tests/unit/kie-executor-routing.test.ts tests/unit/nanobanana-image-handler.test.ts tests/unit/image-generation-handler.test.ts— 48/48 pass (sibling KIE/image coverage, confirms no regression)