From d7a4d7d1c34f1021e0d2152b8dd8f574a15e8bbe Mon Sep 17 00:00:00 2001 From: Mukil Loganathan <144731603+langchain-infra@users.noreply.github.com> Date: Wed, 24 Jun 2026 23:44:40 +0000 Subject: [PATCH 1/2] fix: update sandbox private registry docs Co-authored-by: open-swe[bot] --- src/langsmith/sandbox-snapshots.mdx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/langsmith/sandbox-snapshots.mdx b/src/langsmith/sandbox-snapshots.mdx index 2a777274c1..525aae48d5 100644 --- a/src/langsmith/sandbox-snapshots.mdx +++ b/src/langsmith/sandbox-snapshots.mdx @@ -48,20 +48,16 @@ console.log(snapshot.id); ### Private registries -Pass registry credentials (or a pre-registered `registry_id` / `registryId`) to pull from a private registry. +Register the private registry first, then pass its `registry_id` / `registryId` to pull from it. ```python Python -import os - snapshot = client.create_snapshot( "internal-python", docker_image="registry.example.com/internal/python:3.12", fs_capacity_bytes=2 * 1024**3, - registry_url="https://registry.example.com", - registry_username="me", - registry_password=os.environ["REGISTRY_PASSWORD"], + registry_id="550e8400-e29b-41d4-a716-446655440000", timeout=600, ) ``` @@ -72,9 +68,7 @@ const snapshot = await client.createSnapshot( "registry.example.com/internal/python:3.12", 2_147_483_648, { - registryUrl: "https://registry.example.com", - registryUsername: "me", - registryPassword: process.env.REGISTRY_PASSWORD, + registryId: "550e8400-e29b-41d4-a716-446655440000", timeout: 600, }, ); From 6d06bc449f26c3173464a94c7d8621d5134638cd Mon Sep 17 00:00:00 2001 From: Mukil Loganathan <144731603+langchain-infra@users.noreply.github.com> Date: Thu, 25 Jun 2026 00:00:04 +0000 Subject: [PATCH 2/2] feat: document sandbox registry creation Co-authored-by: open-swe[bot] --- src/langsmith/sandbox-snapshots.mdx | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/langsmith/sandbox-snapshots.mdx b/src/langsmith/sandbox-snapshots.mdx index 525aae48d5..735b0fa93b 100644 --- a/src/langsmith/sandbox-snapshots.mdx +++ b/src/langsmith/sandbox-snapshots.mdx @@ -53,22 +53,43 @@ Register the private registry first, then pass its `registry_id` / `registryId` ```python Python +import os + +registry = client.create_registry( + "internal-registry", + url="https://registry.example.com", + username="me", + password=os.environ["REGISTRY_PASSWORD"], +) + snapshot = client.create_snapshot( "internal-python", docker_image="registry.example.com/internal/python:3.12", fs_capacity_bytes=2 * 1024**3, - registry_id="550e8400-e29b-41d4-a716-446655440000", + registry_id=registry.id, timeout=600, ) ``` ```ts TypeScript +const registryPassword = process.env.REGISTRY_PASSWORD; +if (!registryPassword) { + throw new Error("REGISTRY_PASSWORD is required"); +} + +const registry = await client.createRegistry( + "internal-registry", + "https://registry.example.com", + "me", + registryPassword, +); + const snapshot = await client.createSnapshot( "internal-python", "registry.example.com/internal/python:3.12", 2_147_483_648, { - registryId: "550e8400-e29b-41d4-a716-446655440000", + registryId: registry.id, timeout: 600, }, );