Skip to main content
OpenShell handles inference traffic through two paths: requests to external hosts like api.openai.com, and requests to inference.local, a special endpoint exposed inside every sandbox.

Two routing paths

How inference.local works

When code inside a sandbox calls https://inference.local, the privacy router intercepts the request and routes it to the backend configured for that gateway. OpenShell applies the configured model to generation requests and supplies the provider credentials itself — no sandbox code needs access to the real API key. If code calls an external inference host directly, that traffic bypasses inference.local entirely and is evaluated only by network_policies.
The client-supplied model and api_key values sent to inference.local are not forwarded upstream. The privacy router injects the real credentials from the configured provider and rewrites the model before forwarding.

Supported API patterns

The patterns accepted by inference.local depend on the provider type configured for the gateway.
Requests to inference.local that do not match the configured provider’s supported patterns are denied.

Next steps

Configure inference routing

Set up the provider and model behind inference.local.

Sandbox policies

Control which external inference endpoints sandboxes can reach.