mirror of
https://github.com/Comfy-Org/comfy-typescript-sdk.git
synced 2026-11-04 23:47:27 +00:00
[PR #119] [MERGED] docs: replace the non-existent fal-ai/flux-pro example with bfl/flux-2-pro #121
Labels
No labels
audit:ai-readiness
audit:community
audit:github
audit:health-scoring
audit:policy
audit:release
audit:supply-chain
bug
cursor-review-pin
effort:medium
effort:small
effort:trivial
priority:nice-to-have
priority:recommended
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/comfy-typescript-sdk#121
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/comfy-typescript-sdk/pull/119
Author: @mattmillerai
Created: 9/3/2026
Status: ✅ Merged
Merged: 9/4/2026
Merged by: @mattmillerai
Base:
main← Head:matt/be-11088-bfl-flux-2-pro-example📝 Commits (2)
0b53b76docs: replace the non-existent fal-ai/flux-pro example with bfl/flux-2-pro8b08bd4docs: leave the vendored Router spec examples to the upstream sync📊 Changes
4 files changed (+15 additions, -15 deletions)
View changed files
📝
README.md(+7 -7)📝
src/sdk/models.test.ts(+5 -5)📝
src/sdk/models.ts(+1 -1)📝
src/sdk/router-spec-contract.test.ts(+2 -2)📄 Description
ELI-5
Every "your first call" example in this SDK told you to run a model called
fal-ai/flux-pro. There is no such model — so the very first thing a new reader copy-pastes could not work. This swaps it forbfl/flux-2-pro, which is real, enrolled, and the fastest path on the Router. Nothing about how the SDK behaves changes; only the example ID does.What was wrong
The example was wrong twice over.
flux-prois not an enrolled Comfy Router model under any provider, andfal-aiis not a Comfy provider slug either — the fal provider's slug isfal, andfal-aiis an upstream path segment inside it. Flux is served direct from Black Forest Labs underbfl/*.The string originates as an
example:on theRouterModelIdschema in the canonical Comfy API contract, so it propagated into the vendored Router spec here and, copied by hand, into the README prose and thecomfy.modelsJSDoc.What changed
README.md— all 7 occurrences (the quickstart call, the ID-format explanation, the typed-output example, the options example, the two retry examples, the abort-signal example).src/sdk/models.ts— the JSDoc@example, which also renders in IDE hover and in generated typedoc, not only on GitHub.src/sdk/models.test.ts(the sharedMODELconstant, the asserted wire path, and the did-you-mean 404 pair, migrated as a matched set) andsrc/sdk/router-spec-contract.test.ts(the live-request fixture and its expected path, both sides moved together).spec/router-openapi.yamlis deliberately NOT touched. An earlier revision of this branch patched its threeexample:values; that edit has been reverted. See Judgment calls.Judgment calls
The vendored Router spec is left alone, and the fix belongs upstream.
spec/router-openapi.yamlis a one-way vendored copy that AGENTS.md andspec/README.mdboth declare off-limits to hand edits — "in every case this file is the side that is right". An earlier revision of this branch patched the threeexample:values anyway, on the reasoning that nothing is generated from that file so the edit reddens nothing. That reasoning is what the rule exists to catch: because no check readsexample:, the edit lands green and is silently undone by the next sync. Concretely, the pending sync branchchore/sync-router-spec-abdcb94already carriesfal-ai/flux-pro/flux-pro/fal-aiat those same three keys, so merging this branch and then that sync would put the vendored spec back out of step with the README and tests here — inside a routine sync diff, where the revert would not read as a regression to anyone reviewing it. The spec hunk is reverted; the upstream contract is the place to fix the string.Nothing in this repo is generated from or compared against that file's
example:values (scripts/check-spec-drift.mjsregenerates only againstspec/openapi.yaml, and checks the Router route/host constants by comparison), so the two sides carrying different example strings reddens no check and misleads no reader — the reader-facing surfaces are the README and the JSDoc, and both are correct.Two fixture corpora are deliberately left on
fal-ai/..., because a real ID would defeat exactly what they test. The malformed-ID rejection list inmodels.test.ts("flux-pro","","fal-ai/","/flux-pro","fal-ai/flux/pro","./flux-pro","fal-ai/..") exists to prove the parser refuses bad input without opening a socket. The percent-encoding fixture"fal ai/flux#pro"inrouter-spec-contract.test.tsexists to prove a space and a#are encoded rather than allowed to add a path segment. Both are hostile-input tests, not examples.bfl/flux-2-pro/v1.1in the "extra segment is a variant" test was migrated rather than left, since its point is the third segment, not the base ID — and a real base ID now makes the case read more clearly.Verification of the replacement ID
bfl/flux-2-prowas not taken on trust from the report. Confirmed on the default branch of the server's own (private) source of truth, read read-only: it appears in the Router model enrolment table alongside the otherbflFlux routes, it has an authored per-model schema file, and the Router quickstart there already uses it as its canonical ID withprovider: bfl/model: flux-2-pro. The same read confirms the negative: the fal section enrolls no Flux route at all.bfl/flux-2-proalso passes this SDK's ownparseModelIdon the real code path —src/sdk/models.test.tsasserts the wire path is/v2/models/bfl/flux-2-profrom an actual call against the stub server, which is what proves the digit-bearingflux-2-prosegment is accepted rather than merely plausible.Residual
spec/router-openapi.yamlin this repo keepsfal-ai/flux-pro— a stale example in a file the repo's own rules point readers away from, rather than a hand-patch that a routine sync would quietly revert.GET https://api.comfy.org/v2/models/bfl/flux-2-pro/openapi.jsonreturns401 No Authorization header foundunauthenticated, and the auth gate sits in front of model resolution — the identical 401 comes back forfal-ai/flux-pro— so the public endpoint cannot distinguish a real ID from a fictional one without a credential, and none was used here. The enrolment evidence above is source-of-truth rather than live-catalog.fal/patina; the enrolment table on the default branch today also carriesminimax/h3-maxroutes under fal. Still no fal Flux route, so the replacement stands.flux/fal, 15 were reader-facing or fixture uses and are fixed, 3 are the vendored spec'sexample:values now left to the upstream sync, 7 are the two hostile-input corpora named above and are intentionally left, and 2 are an unrelatedFluxOutputtype name in prose.Provenance
pnpm test: 406 passed, 0 failed (23 files);node scripts/check-spec-drift.mjs: both checks OK (generated code in sync, Router route matches);pnpm typecheck,pnpm lint,pnpm format:check: clean;node scripts/check-public-repo-hygiene.mjs: OK, no internal-only references;node scripts/sync-python-surface.mjs: parity OK. Re-run in full after the spec-hunk revert.spec/router-openapi.yaml— was raised in review and has been reverted, so this PR now touches only hand-written, reader-facing files.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.