Skip to content

feat: add container_registry_auth_id to create_pod#506

Open
janwinkler1 wants to merge 2 commits into
runpod:mainfrom
janwinkler1:feat/container-registry-auth-id-for-create-pod
Open

feat: add container_registry_auth_id to create_pod#506
janwinkler1 wants to merge 2 commits into
runpod:mainfrom
janwinkler1:feat/container-registry-auth-id-for-create-pod

Conversation

@janwinkler1

@janwinkler1 janwinkler1 commented May 12, 2026

Copy link
Copy Markdown
  • Adds container_registry_auth_id as an optional parameter to create_pod.
  • When provided, it is passed as containerRegistryAuthId in the podFindAndDeployOnDemand GraphQL mutation, enabling pods to pull images from private container registries.
  • Only applies to GPU pods.
  • Previously the only workaround was to call run_graphql_query directly.
  • Tested locally with UV_PYTHON=3.12 make setup && UV_PYTHON=3.12 make test

@promptless

promptless Bot commented May 12, 2026

Copy link
Copy Markdown

Promptless prepared a documentation update related to this change.

Triggered by runpod/runpod-python PR #506

Added a new "Use a private container registry" section documenting the containerRegistryAuthId parameter for pulling images from private registries when creating GPU Pods via the SDK.

Review: Document container_registry_auth_id for create_pod

@deanq deanq requested a review from Copilot June 22, 2026 18:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for deploying GPU pods that can pull private container images by exposing a container_registry_auth_id option on the public create_pod API and threading it through to the podFindAndDeployOnDemand GraphQL mutation as containerRegistryAuthId.

Changes:

  • Add container_registry_auth_id optional parameter to runpod.create_pod(...).
  • Extend generate_pod_deployment_mutation(...) to include containerRegistryAuthId for GPU pods when provided.
  • Add a unit test case asserting the new mutation field is present when requested and absent otherwise.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
tests/test_api/test_mutations_pods.py Adds coverage for the new containerRegistryAuthId mutation field.
runpod/api/mutations/pods.py Threads container_registry_auth_id into the GPU pod deployment mutation input.
runpod/api/ctl_commands.py Exposes container_registry_auth_id on the public create_pod API and passes it into the mutation generator.
Comments suppressed due to low confidence (1)

tests/test_api/test_mutations_pods.py:50

  • Same issue as above for the CPU mutation test: cloud_type="cloud" is not a supported value per the public API validation/documentation, and the mutation generator emits it as a GraphQL enum (unquoted). Update the test to use a valid enum value.
        # Test CPU pod deployment
        cpu_result = pods.generate_pod_deployment_mutation(
            name="test-cpu",
            image_name="test_image",
            cloud_type="cloud",

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +18 to 20
image_name="test_image",
gpu_type_id="1",
cloud_type="cloud",
Comment on lines +97 to +99
if container_registry_auth_id is not None:
input_fields.append(f'containerRegistryAuthId: "{container_registry_auth_id}"')

min_download,
min_upload,
instance_id,
container_registry_auth_id,
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.

3 participants