[PR #20] [MERGED] feat: point Comfy Cloud at cloud.comfy.org and default base_url to it #28

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

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/comfy-python-sdk/pull/20
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 (3)

  • 9459a7d docs: point Comfy Cloud at cloud.comfy.org
  • 6f0b2aa feat: default base_url to Comfy Cloud, and split the doc examples
  • f68b52c test: close the clients in the default base_url tests

📊 Changes

7 files changed (+51 additions, -12 deletions)

View changed files

📝 README.md (+6 -5)
📝 spec/openapi.yaml (+1 -1)
📝 src/comfy_sdk/__init__.py (+3 -2)
📝 src/comfy_sdk/client.py (+6 -2)
➕ tests/test_default_base_url.py (+33 -0)
📝 tests/test_follow_up_links.py (+1 -1)
📝 tests/test_user_agent.py (+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:, README, the module docstring, and test fixtures.

2. Default base_url 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:

Comfy(api_key="comfyui-...")                      # Comfy Cloud
Comfy("http://127.0.0.1:8189", "comfyui-...")     # self-hosted, unchanged

Applies to both Comfy and AsyncComfy. 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 base_url still wins.

Verification

pytest — 102 passing, 3 skipped (5 new, covering both clients and both forms, asserting resolved request URLs rather than private attributes). ruff and mypy clean.

🤖 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-python-sdk/pull/20 **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 (3) - [`9459a7d`](https://github.com/Comfy-Org/comfy-python-sdk/commit/9459a7d43f21b68ec1afd3fa3e02c8e659f96afc) docs: point Comfy Cloud at cloud.comfy.org - [`6f0b2aa`](https://github.com/Comfy-Org/comfy-python-sdk/commit/6f0b2aa8b6599118e644fc1087701b06961dfcba) feat: default base_url to Comfy Cloud, and split the doc examples - [`f68b52c`](https://github.com/Comfy-Org/comfy-python-sdk/commit/f68b52c119f3833e2e7c6cdcee3932cc8d0f6d99) test: close the clients in the default base_url tests ### 📊 Changes **7 files changed** (+51 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+6 -5) 📝 `spec/openapi.yaml` (+1 -1) 📝 `src/comfy_sdk/__init__.py` (+3 -2) 📝 `src/comfy_sdk/client.py` (+6 -2) ➕ `tests/test_default_base_url.py` (+33 -0) 📝 `tests/test_follow_up_links.py` (+1 -1) 📝 `tests/test_user_agent.py` (+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:`, README, the module docstring, and test fixtures. **2. Default `base_url` 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: ```python Comfy(api_key="comfyui-...") # Comfy Cloud Comfy("http://127.0.0.1:8189", "comfyui-...") # self-hosted, unchanged ``` Applies to both `Comfy` and `AsyncComfy`. `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 `base_url` still wins. ## Verification `pytest` — 102 passing, 3 skipped (5 new, covering both clients and both forms, asserting resolved request URLs rather than private attributes). `ruff` and `mypy` clean. 🤖 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:00:52 +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-python-sdk#28
No description provided.