[PR #24] [MERGED] feat: point Comfy Cloud at cloud.comfy.org and default baseUrl to it #35

Closed
opened 2026-10-31 22:04:00 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/comfy-typescript-sdk/pull/24
Author: @wei-hai
Created: 7/28/2026
Status: ✅ Merged
Merged: 7/28/2026
Merged by: @wei-hai

Base: main ← Head: wei/cloud-comfy-org-base-url


📝 Commits (2)

  • e0f3823 docs: point Comfy Cloud at cloud.comfy.org
  • 4a61652 feat: default baseUrl to Comfy Cloud

📊 Changes

8 files changed (+42 additions, -9 deletions)

View changed files

📝 README.md (+1 -1)
📝 spec/openapi.yaml (+1 -1)
📝 src/index.ts (+1 -1)
📝 src/low/followUpLinks.test.ts (+2 -2)
📝 src/low/generated/types.gen.ts (+1 -1)
📝 src/sdk/client.ts (+13 -2)
➕ src/sdk/defaultBaseUrl.test.ts (+22 -0)
📝 src/sdk/index.ts (+1 -1)

📄 Description

Comfy Cloud serves /api/v2 on cloud.comfy.org. api.comfy.org keeps serving the node registry, so this is a new hostname for the cloud API rather than a domain rename.

Two changes

1. Point at the new host — spec/openapi.yaml servers:, the baseUrl union regenerated from it via pnpm generate (one line; no generator drift), docs and test fixtures.

2. Default baseUrl to it. It was a required argument, so every caller hardcoded a host — which is why a server-side move otherwise forces every caller to edit their own code. Now:

new Comfy({ apiKey: "..." })                              // Comfy Cloud
new Comfy("http://127.0.0.1:8189", { apiKey: "..." })     // self-hosted, unchanged

Added as an overload rather than an optional first parameter, so the options-only form doesn't read new Comfy(undefined, { apiKey }). COMFY_CLOUD_BASE_URL is exported for callers who want the value.

Backward compatible — the positional form every existing caller uses is untouched, and an explicit URL still wins.

Verification

pnpm test 138 passing across 16 files (4 new, covering all constructor forms), pnpm typecheck and pnpm lint clean.

Note: npm ci fails here — the repo is pnpm (packageManager: pnpm@11.13.0) with no package-lock.json. Use pnpm install --frozen-lockfile.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/comfy-typescript-sdk/pull/24 **Author:** [@wei-hai](https://github.com/wei-hai) **Created:** 7/28/2026 **Status:** ✅ Merged **Merged:** 7/28/2026 **Merged by:** [@wei-hai](https://github.com/wei-hai) **Base:** `main` ← **Head:** `wei/cloud-comfy-org-base-url` --- ### 📝 Commits (2) - [`e0f3823`](https://github.com/Comfy-Org/comfy-typescript-sdk/commit/e0f382345ba27a82a9505a5ba88d4f6ecccb46e4) docs: point Comfy Cloud at cloud.comfy.org - [`4a61652`](https://github.com/Comfy-Org/comfy-typescript-sdk/commit/4a61652164fcb648a03a363c4a9d23e867e36ec8) feat: default baseUrl to Comfy Cloud ### 📊 Changes **8 files changed** (+42 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -1) 📝 `spec/openapi.yaml` (+1 -1) 📝 `src/index.ts` (+1 -1) 📝 `src/low/followUpLinks.test.ts` (+2 -2) 📝 `src/low/generated/types.gen.ts` (+1 -1) 📝 `src/sdk/client.ts` (+13 -2) ➕ `src/sdk/defaultBaseUrl.test.ts` (+22 -0) 📝 `src/sdk/index.ts` (+1 -1) </details> ### 📄 Description Comfy Cloud serves `/api/v2` on `cloud.comfy.org`. `api.comfy.org` keeps serving the node registry, so this is a new hostname for the cloud API rather than a domain rename. ## Two changes **1. Point at the new host** — `spec/openapi.yaml` `servers:`, the `baseUrl` union regenerated from it via `pnpm generate` (one line; no generator drift), docs and test fixtures. **2. Default `baseUrl` to it.** It was a required argument, so every caller hardcoded a host — which is why a server-side move otherwise forces every caller to edit their own code. Now: ```ts new Comfy({ apiKey: "..." }) // Comfy Cloud new Comfy("http://127.0.0.1:8189", { apiKey: "..." }) // self-hosted, unchanged ``` Added as an **overload** rather than an optional first parameter, so the options-only form doesn't read `new Comfy(undefined, { apiKey })`. `COMFY_CLOUD_BASE_URL` is exported for callers who want the value. Backward compatible — the positional form every existing caller uses is untouched, and an explicit URL still wins. ## Verification `pnpm test` 138 passing across 16 files (4 new, covering all constructor forms), `pnpm typecheck` and `pnpm lint` clean. Note: `npm ci` fails here — the repo is pnpm (`packageManager: pnpm@11.13.0`) with no `package-lock.json`. Use `pnpm install --frozen-lockfile`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 22:04:00 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/comfy-typescript-sdk#35
No description provided.