Connect Claude to a remote Inference Gateway with host-resolved bearer authentication
916
Connect Claude to a remote Inference Gateway with host-resolved bearer authentication
| Name | Required | Default | Description |
|---|---|---|---|
credential_service | Optional | infgw-claude | Host credential service that resolves a bearer token for this gateway |
gateway_host | Optional | dev.docker.inference-stage.docker.com | HTTPS gateway host with an optional port; use a new sandbox when changing it |
version | Required | — | Revision of the gateway configuration hook |
Expand a row to see its full configuration. See the full spec for the complete descriptor.
| Configuration | Type | Required | Description |
|---|---|---|---|
com.docker.sandbox/network-policy@1 | Required | — | |
com.docker.sandbox/credential@1 | Required | Required host-resolved gateway bearer token | |
com.docker.sandbox/lifecycle@1 | Required | — |
claude, python >= 3.11sbx run <agent> --kit sbx/claude-infgw:latestRun the following command to install sbx on your machine.
brew install docker/tap/sbxwinget install Docker.sbxConnect 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.
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.
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.
Set arguments when creating the sandbox. Target this mixin with --kit-arg claude-infgw.<name>=<value>.
| Argument | Default | Description |
|---|---|---|
gateway_host | dev.docker.inference-stage.docker.com | HTTPS host with an optional port. No scheme or path. |
credential_service | infgw-claude | Host 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.
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.