@@ -114,6 +114,8 @@ describe('OneComputerSandboxRuntimeAdapter', () => {
114114 expect ( launchCommand . indexOf ( 'claude --print' ) ) . toBeLessThan ( launchCommand . indexOf ( 'rm -f .onevibe-prompt' ) )
115115 expect ( launchCommand . indexOf ( 'rm -f .onevibe-prompt' ) ) . toBeLessThan ( launchCommand . indexOf ( 'printf %s "$onevibe_exit_code"' ) )
116116 expect ( commands . some ( ( command ) => command . includes ( "export ANTHROPIC_BASE_URL='http://sandbox-reachable-litellm:4100'" ) ) ) . toBe ( true )
117+ expect ( commands . some ( ( command ) => command . includes ( 'sandbox-reachable-litellm' ) ) ) . toBe ( true )
118+ expect ( commands . some ( ( command ) => command . includes ( 'export NO_PROXY=' ) ) ) . toBe ( false )
117119 expect ( commands . some ( ( command ) => command . includes ( "export ANTHROPIC_API_KEY='placeholder'" ) ) ) . toBe ( true )
118120 expect ( commands . some ( ( command ) => command . includes ( "export ANTHROPIC_AUTH_TOKEN='test-sandbox-bearer-token'" ) ) ) . toBe ( true )
119121 expect ( store . listEvents ( task . id ) . some ( ( event ) => event . type === 'run_started' && event . payload . claudeTransport === 'litellm' ) ) . toBe ( true )
@@ -181,6 +183,9 @@ describe('OneComputerSandboxRuntimeAdapter', () => {
181183 } )
182184
183185 it ( 'reuses the conversation-owned sandbox and Claude session for a continuation' , async ( ) => {
186+ vi . stubEnv ( 'ONEVIBE_LITELLM_URL' , 'http://host-only-litellm:4100' )
187+ vi . stubEnv ( 'ONEVIBE_SANDBOX_LITELLM_URL' , 'https://sandbox-relay.example' )
188+ vi . stubEnv ( 'ONEVIBE_LITELLM_API_KEY' , 'test-routing-key' )
184189 const root = await mkdtemp ( path . join ( tmpdir ( ) , 'onevibe-onecomputer-retained-' ) )
185190 roots . push ( root )
186191 const { TaskStore } = await import ( './store.js' )
@@ -211,6 +216,7 @@ describe('OneComputerSandboxRuntimeAdapter', () => {
211216 expect ( commands . filter ( ( command ) => command . includes ( 'claude --print' ) ) ) . toHaveLength ( 2 )
212217 expect ( commands . filter ( ( command ) => command . includes ( 'claude --print' ) ) [ 0 ] ) . not . toContain ( '--resume' )
213218 expect ( commands . filter ( ( command ) => command . includes ( 'claude --print' ) ) [ 1 ] ) . toContain ( "--resume 'session-retained'" )
219+ expect ( commands . some ( ( command ) => command . includes ( 'export NO_PROXY=' ) && command . includes ( 'sandbox-relay.example' ) ) ) . toBe ( true )
214220 expect ( store . getTask ( task . id ) . securityContext ) . toMatchObject ( { runtimeSessionId : 'session-retained' , runtimeSessionLeaseGeneration : 1 } )
215221 } )
216222} )
0 commit comments