HUB
Sign inSign up
claude-infgw logo

sbx/claude-infgw

Verified Publisher

By Docker, Inc

•Updated 3 days ago

Connect Claude to a remote Inference Gateway with host-resolved bearer authentication

Sandbox Kit
0

916

sbx/claude-infgw repository overview

Tag
Digestsha256:1e45607d362f…
Size2.1 kB
Schemav3
Pushed3 days ago
Specificationspec.yaml
MIXIN

Connect Claude to a remote Inference Gateway with host-resolved bearer authentication

Arguments
NameRequiredDefaultDescription
credential_serviceOptionalinfgw-claude
Host credential service that resolves a bearer token for this gateway
gateway_hostOptionaldev.docker.inference-stage.docker.com
HTTPS gateway host with an optional port; use a new sandbox when changing it
versionRequired—
Revision of the gateway configuration hook
Capabilities

Expand a row to see its full configuration. See the full spec for the complete descriptor.

ConfigurationTypeRequiredDescription
com.docker.sandbox/network-policy@1Required—
com.docker.sandbox/credential@1RequiredRequired host-resolved gateway bearer token
com.docker.sandbox/lifecycle@1Required—
Requiresclaude, python >= 3.11

Apply this mixin to a sandbox

sbx run <agent> --kit sbx/claude-infgw:latest

Make sure you have docker sbx installed

Run the following command to install sbx on your machine.

macOS
brew install docker/tap/sbx
Windows
winget install Docker.sbx
Learn more about docker sbx(opens in new tab)

⁠Claude Code through an Inference Gateway

Connect the existing claude v3 workload to a remote Inference Gateway⁠. This mixin requires claude and Python 3.11 or newer in the composition. The DHI claude workload supplies both.

⁠Bind a gateway credential on the host

Obtain gateway access and install the host auth helper⁠. Register a dynamic secret for the same gateway that the mixin uses. The stage helper profile below must select https://dev.docker.inference-stage.docker.com/.

inference-gateway-auth login --gateway stage
sbx secret set infgw-claude \
  --command 'inference-gateway-auth token --gateway stage' \
  --refresh on-demand

The runtime keeps the bearer token on the host and exposes a placeholder inside the sandbox. It substitutes the token only on requests to the selected gateway. Creation requires this credential binding. Native anthropic credentials remain separate. This mixin configures gateway inference and does not initiate device login inside the sandbox.

For unattended hosts, bind a resolver that returns a valid gateway bearer token without interactive login. Gateway service accounts support client credentials⁠. This mixin supplies no service-account resolver.

⁠Run with a gateway model

Choose a model advertised by your gateway with Anthropic Messages support. Replace <gateway-model> in this command.

sbx run sbx/claude:latest --kit sbx/claude-infgw:latest \
  --kit-arg claude.model=<gateway-model> /path/to/workspace

The API endpoint is https://<gateway_host>/anthropic. The mixin preserves the workload's launch command, permissions, hooks, model and effort settings, session support, and MCP configuration. It selects the gateway after the agent's native configuration seed.

⁠Kit arguments

Set arguments when creating the sandbox. Target this mixin with --kit-arg claude-infgw.<name>=<value>.

ArgumentDefaultDescription
gateway_hostdev.docker.inference-stage.docker.comHTTPS host with an optional port. No scheme or path.
credential_serviceinfgw-claudeHost service that resolves the token for this gateway.

A different gateway needs a matching host resolver and approved credential domain. Use a new sandbox name after changing either argument. Use one gateway mixin per sandbox; per-agent identities on a shared gateway in one sandbox are not supported by these helpers.

⁠Availability

This kit is built in DHI. The sbx/claude-infgw reference becomes available only after the DHI build is published and the name is enabled in the sandbox mirror allowlist.