Skip to content

feat: api_key on submit/run for partner (API) node auth#9

Merged
wei-hai merged 1 commit into
mainfrom
feat/extra-data-api-key
Jul 21, 2026
Merged

feat: api_key on submit/run for partner (API) node auth#9
wei-hai merged 1 commit into
mainfrom
feat/extra-data-api-key

Conversation

@wei-hai

@wei-hai wei-hai commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

What

Workflows that use partner/API nodes (Gemini, etc.) authenticate with a single Comfy API key carried in the POST /api/v2/jobs body as extra_data.api_key_comfy_org. This adds an optional api_key= parameter to submit()/run() (both sync Comfy and async AsyncComfy) that packs the key into a typed, closed extra_data object sent alongside the workflow.

job = client.run(wf, api_key="comfyui-...")
  • Omit api_key and no extra_data is sent (never an empty object).
  • The key never participates in idempotency and is never logged or persisted by the SDK — it flows only into the httpx request body.
  • A shared sans-IO helper keeps sync/async parity.
  • README documents the field and disambiguates it from the client-constructor api_key (which authenticates you to the server); the two are often the same key but conceptually distinct.

Tests

New sync + async tests prove extra_data.api_key_comfy_org appears as a sibling of workflow when a key is given, is absent when not, and that run() forwards it through. pytest — 34 passed; ruff check, ruff format --check, mypy clean.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@wei-hai, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 33 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: cdb07372-5e4a-4853-b03f-9d0c8458301c

📥 Commits

Reviewing files that changed from the base of the PR and between d369d68 and c258bd8.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (10)
  • .github/CODEOWNERS
  • README.md
  • scripts/check_public_repo_hygiene.py
  • spec/openapi.yaml
  • src/comfy_low/transport.py
  • src/comfy_sdk/_core.py
  • src/comfy_sdk/client.py
  • tests/conftest.py
  • tests/test_async.py
  • tests/test_jobs.py

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Too big: expected string to have <=250 characters at "tone_instructions"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/extra-data-api-key
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch feat/extra-data-api-key

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@wei-hai
wei-hai force-pushed the feat/extra-data-api-key branch from 8ff13b8 to 57f5183 Compare July 21, 2026 22:55
Workflows that use partner/API nodes (Gemini, etc.) authenticate with a
single Comfy API key carried in the POST /api/v2/jobs body as
extra_data.api_key_comfy_org. submit()/run() (sync and async) gain an
optional api_key= parameter that packs it into a typed, closed extra_data
object sent alongside the workflow; omit it (or pass "") and no extra_data
is sent.

- The key never participates in idempotency and is never logged or
  persisted by the SDK (flows only into the httpx request body).
- Shared sans-IO helper keeps sync/async parity; spec + README document
  the field and disambiguate it from the client-credential api_key.
- Adds a CODEOWNERS default owners rule (comfy-cloud-team +
  core-engine-team), matching the sibling repos.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@wei-hai
wei-hai force-pushed the feat/extra-data-api-key branch from 57f5183 to c258bd8 Compare July 21, 2026 22:59
@wei-hai

wei-hai commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@wei-hai
wei-hai merged commit 39dcce0 into main Jul 21, 2026
10 checks passed
@wei-hai
wei-hai deleted the feat/extra-data-api-key branch July 21, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant