mirror of
https://github.com/Comfy-Org/comfy-typescript-sdk.git
synced 2026-11-04 23:47:27 +00:00
[PR #43] [MERGED] feat!: configure the base URL via COMFY_BASE_URL instead of a constructor argument #51
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#51
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/43
Author: @wei-hai
Created: 8/11/2026
Status: ✅ Merged
Merged: 8/11/2026
Merged by: @wei-hai
Base:
main← Head:wei/be-6958-sdk-base-url-env-var📝 Commits (3)
555b833feat!: configure the base URL via COMFY_BASE_URL, not a constructor argument328f7bdfix: address review — test the request target, isolate ambient env977a116fix: reject a base URL carrying a query or fragment📊 Changes
8 files changed (+190 additions, -66 deletions)
View changed files
📝
README.md(+33 -14)📝
src/index.test.ts(+9 -3)📝
src/index.ts(+4 -4)➕
src/sdk/baseUrlEnv.test.ts(+81 -0)📝
src/sdk/client.test.ts(+7 -3)📝
src/sdk/client.ts(+55 -19)➖
src/sdk/defaultBaseUrl.test.ts(+0 -22)📝
src/sdk/index.ts(+1 -1)📄 Description
new Comfy()targets Comfy Cloud; another deployment is selected with theCOMFY_BASE_URLenvironment variable. The base-URL constructor overload is removed, so an arbitrary endpoint is no longer part of the call surface.Breaking:
new Comfy(baseUrl, opts)→new Comfy(opts)+COMFY_BASE_URL. TypeScript callers get a compile error; untyped JS callers get aTypeErrorrather than a silently ignored argument.The variable is read per construction (not at module load), must be an
http(s)URL, and unset-or-blank means Comfy Cloud.Scope: the public
Comfyclient only.ComfyLow(@comfyorg/sdk/low, the documented escape hatch) still takes a base URL — it is what the client builds on.Verified:
pnpm lint,format:check,typecheck,test(148 pass),test:coverage,check-spec-drift,check-public-repo-hygiene,build.Matching change in
comfy-python-sdkkeeps the two SDKs in lockstep.Summary by CodeRabbit
New Features
COMFY_BASE_URL.Documentation
Bug Fixes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.