[PR #110] [MERGED] fix(models): follow Comfy Router's move to /v2/models #113

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

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/comfy-typescript-sdk/pull/110
Author: @mattmillerai
Created: 8/31/2026
Status: ✅ Merged
Merged: 8/31/2026
Merged by: @mattmillerai

Base: main ← Head: matt/router-v2-path


📝 Commits (2)

  • 6f449ba chore: sync vendored Comfy Router spec from cloud@b7481bb
  • 597a287 fix(models): follow Comfy Router's move to /v2/models (route drift left every models.run a 404)

📊 Changes

8 files changed (+90 additions, -30 deletions)

View changed files

📝 CHANGELOG.md (+9 -0)
📝 README.md (+1 -1)
📝 spec/router-openapi.yaml (+74 -23)
📝 src/sdk/credentials.ts (+1 -1)
📝 src/sdk/models.test.ts (+1 -1)
📝 src/sdk/models.ts (+1 -1)
📝 src/sdk/router-spec-contract.test.ts (+2 -2)
📝 test/support/router-stub-server.ts (+1 -1)

📄 Description

What

The Comfy Router service moved its model routes from /v1/models/{provider}/{model} to /v2/models/…. The SDK's hand-written path template still said /v1, so every models.run against the live service answered a bare 404 — caught by the first-ever live run of the two-SDK Router smoke suite, and reproduced with a raw curl (/v2 → 200 with a real generation, the SDK's path → 404).

This PR includes the open vendored-spec sync PR (which was sitting red precisely because the synced spec moved to /v2 while the code said /v1) and flips the path template, docs, and tests to match, so the spec↔code contract check passes again.

Verified

  • Full test suite green locally (python: 694 passed / ts: 389 passed; the 17 credentials.test.ts failures on the TS side pre-exist on the sync base unchanged — local Node environment, not this change)
  • Hygiene + drift/contract checks pass locally
  • Live: raw POST to /v2/models/recraft/recraftv2 on staging returns 200 with a generation; the /v1 path 404s

🤖 Generated with Claude Code

Supersedes #109 (merging this closes it). Sibling: Comfy-Org/comfy-python-sdk#117.

Summary by CodeRabbit

  • API Updates
    • Model catalog, lookup, execution, and schema endpoints now use the /v2 API routes.
    • Model schema responses now include both input and output schemas.
    • API-key authentication is now supported alongside bearer authentication.
    • Added clearer retry, error, and idempotency behavior, including replay and conflict handling.
  • Documentation
    • Updated SDK, API reference, and changelog documentation to reflect the new routes and capabilities.
  • Bug Fixes
    • Corrected model execution requests to target the current router endpoint.

🔄 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/110 **Author:** [@mattmillerai](https://github.com/mattmillerai) **Created:** 8/31/2026 **Status:** ✅ Merged **Merged:** 8/31/2026 **Merged by:** [@mattmillerai](https://github.com/mattmillerai) **Base:** `main` ← **Head:** `matt/router-v2-path` --- ### 📝 Commits (2) - [`6f449ba`](https://github.com/Comfy-Org/comfy-typescript-sdk/commit/6f449ba940ac27be6b39852973241f728fb5b71b) chore: sync vendored Comfy Router spec from cloud@b7481bb - [`597a287`](https://github.com/Comfy-Org/comfy-typescript-sdk/commit/597a287dbb7c88f24d96f2aa3ae5d7175c9cae04) fix(models): follow Comfy Router's move to /v2/models (route drift left every models.run a 404) ### 📊 Changes **8 files changed** (+90 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+9 -0) 📝 `README.md` (+1 -1) 📝 `spec/router-openapi.yaml` (+74 -23) 📝 `src/sdk/credentials.ts` (+1 -1) 📝 `src/sdk/models.test.ts` (+1 -1) 📝 `src/sdk/models.ts` (+1 -1) 📝 `src/sdk/router-spec-contract.test.ts` (+2 -2) 📝 `test/support/router-stub-server.ts` (+1 -1) </details> ### 📄 Description ## What The Comfy Router service moved its model routes from `/v1/models/{provider}/{model}` to `/v2/models/…`. The SDK's hand-written path template still said `/v1`, so every `models.run` against the live service answered a bare 404 — caught by the first-ever live run of the two-SDK Router smoke suite, and reproduced with a raw curl (`/v2` → 200 with a real generation, the SDK's path → 404). This PR **includes the open vendored-spec sync PR** (which was sitting red precisely because the synced spec moved to /v2 while the code said /v1) and flips the path template, docs, and tests to match, so the spec↔code contract check passes again. ## Verified - Full test suite green locally (python: 694 passed / ts: 389 passed; the 17 `credentials.test.ts` failures on the TS side pre-exist on the sync base unchanged — local Node environment, not this change) - Hygiene + drift/contract checks pass locally - Live: raw POST to `/v2/models/recraft/recraftv2` on staging returns 200 with a generation; the `/v1` path 404s 🤖 Generated with [Claude Code](https://claude.com/claude-code) Supersedes #109 (merging this closes it). Sibling: Comfy-Org/comfy-python-sdk#117. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **API Updates** - Model catalog, lookup, execution, and schema endpoints now use the `/v2` API routes. - Model schema responses now include both input and output schemas. - API-key authentication is now supported alongside bearer authentication. - Added clearer retry, error, and idempotency behavior, including replay and conflict handling. - **Documentation** - Updated SDK, API reference, and changelog documentation to reflect the new routes and capabilities. - **Bug Fixes** - Corrected model execution requests to target the current router endpoint. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <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:40 +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#113
No description provided.