diff --git a/comfy_cli/command/generate/client.py b/comfy_cli/command/generate/client.py index 4daa48ddd..c9b8e54e8 100644 --- a/comfy_cli/command/generate/client.py +++ b/comfy_cli/command/generate/client.py @@ -49,7 +49,7 @@ def resolve_api_key(explicit: str | None = None) -> str: 401, "", "Not signed in. Run `comfy cloud login`, or pass --api-key / set " - "COMFY_API_KEY (get one at https://platform.comfy.org/api-keys).", + "COMFY_API_KEY (get one at https://platform.comfy.org/profile/api-keys?onboarding=router).", ) diff --git a/tests/comfy_cli/command/generate/test_client.py b/tests/comfy_cli/command/generate/test_client.py index 3f38c9d8b..430cff42a 100644 --- a/tests/comfy_cli/command/generate/test_client.py +++ b/tests/comfy_cli/command/generate/test_client.py @@ -20,8 +20,11 @@ def test_resolve_api_key_missing(monkeypatch): monkeypatch.delenv("COMFY_API_KEY", raising=False) # No OAuth session in the isolated test config and no env key -> "no credential" # path. OAuth-over-env precedence is intentional; assert the current message. - with pytest.raises(client.ApiError, match="Not signed in"): + with pytest.raises(client.ApiError, match="Not signed in") as exc: client.resolve_api_key() + # The hint links the platform's real key page (``/profile/api-keys``), with the + # onboarding query that opens the create-key dialog. + assert "https://platform.comfy.org/profile/api-keys?onboarding=router" in str(exc.value) def test_split_payload_json_pass_through():