Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

🩹 fix: Stub the Attached Route in the Lane Recording Specs (#16840)

Marco Beretta225aa91d0a17
diff --git a/api/server/services/__tests__/ToolService.spec.js b/api/server/services/__tests__/ToolService.spec.js
index 82f98c1dc7..b00271883a 100644
--- a/api/server/services/__tests__/ToolService.spec.js
+++ b/api/server/services/__tests__/ToolService.spec.js
@@ -3236,15 +3236,9 @@ describe('ToolService - Action Capability Gating', () => {
codeWorkspaces: [{ environmentId: 'personal-machine', workspaceId: 'project-a' }],
};
mockGetEndpointsConfig.mockResolvedValue(createEndpointsConfig(capabilities));
- mockResolveCodeExecutionContext.mockReturnValueOnce({
- baseUrl: 'http://attached-code.test/v1',
- codeSessionKey: 'execute_code:stateful:attached',
- executionProfile: 'stateful',
- statefulSessions: true,
- environmentType: 'attached',
- environmentId: 'personal-machine',
- bridgeWorkerId: 'worker-abc',
- });
+ req.config.endpoints[EModelEndpoint.agents].statefulCodeSessions = {
+ environments: [attachedEnvironment()],
+ };
mockCreateLaneGitRecorder.mockClear();
await loadToolsForExecution({
@@ -3255,6 +3249,7 @@ describe('ToolService - Action Capability Gating', () => {
tools: [Tools.execute_code],
stateful_code_sessions: true,
stateful_code_environment: 'agent-user',
+ code_environment_id: 'personal-machine',
},
conversationId: 'resolved-convo',
toolNames: [AgentConstants.BASH_TOOL],
@@ -3294,15 +3289,9 @@ describe('ToolService - Action Capability Gating', () => {
codeWorkspaces: [{ environmentId: 'personal-machine', workspaceId: 'project-a' }],
};
mockGetEndpointsConfig.mockResolvedValue(createEndpointsConfig(capabilities));
- mockResolveCodeExecutionContext.mockReturnValueOnce({
- baseUrl: 'http://attached-code.test/v1',
- codeSessionKey: 'execute_code:stateful:attached',
- executionProfile: 'stateful',
- statefulSessions: true,
- environmentType: 'attached',
- environmentId: 'personal-machine',
- bridgeWorkerId: 'worker-abc',
- });
+ req.config.endpoints[EModelEndpoint.agents].statefulCodeSessions = {
+ environments: [attachedEnvironment()],
+ };
mockCreateLaneGitRecorder.mockClear();
await loadToolsForExecution({
@@ -3313,6 +3302,7 @@ describe('ToolService - Action Capability Gating', () => {
tools: [Tools.execute_code],
stateful_code_sessions: true,
stateful_code_environment: 'agent-user',
+ code_environment_id: 'personal-machine',
},
conversationId: 'resolved-convo',
toolNames: [AgentConstants.BASH_TOOL],