Compare commits

...
Sign in to create a new pull request.

5 commits

Author SHA1 Message Date
Alexis Rolland
0d38615400
Merge branch 'master' into alexis/send-job-id 2026-07-15 16:28:26 +08:00
Alexis Rolland
7a8ad26bf4
Merge branch 'master' into alexis/send-job-id 2026-07-15 15:20:27 +08:00
Alexis Rolland
a2b451d9f7
Merge branch 'master' into alexis/send-job-id 2026-07-15 13:43:27 +08:00
Alexis Rolland
9ea052a045 Add guardrails 2026-07-14 17:14:51 +08:00
Alexis Rolland
718d3a6e2b Add Job Id to partner nodes requests 2026-07-14 13:31:46 +08:00

View file

@ -15,6 +15,7 @@ from comfy.comfy_api_env import normalize_comfy_api_base
from comfy.deploy_environment import get_deploy_environment
from comfy.model_management import processing_interrupted
from comfy_api.latest import IO
from comfy_execution.utils import get_executing_context
from comfyui_version import __version__ as comfyui_version
from .common_exceptions import ProcessingInterrupted
@ -57,12 +58,16 @@ def get_comfy_api_headers(node_cls: type[IO.ComfyNode]) -> dict[str, str]:
relative/cloud URLs resolved against ``default_base_url()``; because the result
includes auth, callers must not attach it to arbitrary absolute/presigned URLs.
"""
return {
headers = {
**get_auth_header(node_cls),
"Comfy-Env": get_deploy_environment(),
"Comfy-Usage-Source": get_usage_source(node_cls),
"Comfy-Core-Version": comfyui_version,
}
ctx = get_executing_context()
if ctx is not None:
headers["Comfy-Job-Id"] = ctx.prompt_id
return headers
def default_base_url() -> str: