Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions ui/desktop/tests/integration/test_providers_code_exec.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ beforeAll(() => {

const { testAll } = providerTest(discoverTestCases({ skipAgentic: true }));

// Matches: "execute_typescript | code_execution", "get_function_details | code_execution",
// "tool call | execute", "tool calls | execute" (old format)
// "▸ execute N tool call" (new format with tool_graph)
// "▸ execute_typescript" (plain tool name in output)
const codeExecPattern =
/(execute_typescript \| code_execution)|(get_function_details \| code_execution)|(tool calls? \| execute)|(▸.*execute.*tool call)|(▸ execute_typescript)/;

testAll('invokes code_execution tool', async (tc, { expect }) => {
const testdir = fs.mkdtempSync(path.join(os.tmpdir(), 'goose-codeexec-'));
try {
Expand All @@ -30,16 +37,11 @@ testAll('invokes code_execution tool', async (tc, { expect }) => {
testdir,
"Store a memory with category 'test' and data 'hello world', then retrieve all memories from category 'test'.",
BUILTINS,
{ GOOSE_PROVIDER: tc.provider, GOOSE_MODEL: tc.model }
{ GOOSE_PROVIDER: tc.provider, GOOSE_MODEL: tc.model },
55_000,
(output) => codeExecPattern.test(output)
);

// Matches: "execute_typescript | code_execution", "get_function_details | code_execution",
// "tool call | execute", "tool calls | execute" (old format)
// "▸ execute N tool call" (new format with tool_graph)
// "▸ execute_typescript" (plain tool name in output)
const codeExecPattern =
/(execute_typescript \| code_execution)|(get_function_details \| code_execution)|(tool calls? \| execute)|(▸.*execute.*tool call)|(▸ execute_typescript)/;

expect(
codeExecPattern.test(output),
`Expected code_execution tool to be called\n\nFull output:\n${output}`
Expand Down
Loading