fix: enable sandbox inference routing on Kind#6
Merged
Conversation
Two fixes for the OpenShell sandbox to work with inference routing on Kind clusters: 1. ssh.rs: Pass through infrastructure env vars (ANTHROPIC_BASE_URL, OPENAI_BASE_URL, CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS) from the supervisor process to SSH sessions. The SSH session handler calls env_clear() which drops all inherited env — these vars are set by the compute driver and point to inference.local (the sandbox proxy), not user secrets. 2. auth/oidc.rs: Add ConnectSupervisor and RelayStream to UNAUTHENTICATED_METHODS. These RPCs are used by the sandbox SSH relay and authenticate via the sandbox shared secret (x-sandbox-secret header) rather than OIDC Bearer tokens. Signed-off-by: Paolo Dettori <paolo@dettori.dev> Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ANTHROPIC_BASE_URL,OPENAI_BASE_URL,CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS) from supervisor process to SSH sessions —env_clear()drops all inherited env, but these are set by the compute driver and point toinference.localConnectSupervisorandRelayStreamto unauthenticated gRPC methods — these use sandbox shared secret auth, not OIDC tokensContext
The SSH session handler clears all environment variables for security (preventing secret leakage). However, infrastructure env vars set by the compute driver that point to the sandbox proxy endpoint (
inference.local) must reach child processes for inference routing to work.Without this fix:
ANTHROPIC_BASE_URLTest plan
scripts/openshell/deploy-shared.sh+deploy-tenant.shopenshell gateway loginsucceedsopenshell provider create --type anthropic --credential ANTHROPIC_API_KEY --config ANTHROPIC_BASE_URL=...openshell inference set --provider claude --model claude-sonnet-4-6 --no-verifyopenshell sandbox create --provider claude --no-auto-providers -- claude --print "hello"returns a response🤖 Generated with Claude Code