Skip to content

Commit 929035d

Browse files
fix: use separate prompts for agentic vs regular providers
Agentic providers get a file-read prompt with the test content file copied into the working directory (gemini-cli sandboxes to cwd). Regular providers keep the original shell/ls prompt that produces tool-call log patterns. Signed-off-by: Adrian Cole <adrian@tetrate.io>
1 parent f86fb60 commit 929035d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

scripts/test_providers.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,22 @@ run_test() {
262262

263263
local testdir=$(mktemp -d)
264264

265+
# Agentic providers use a file-read prompt with known content marker;
266+
# regular providers use the shell prompt that produces tool-call logs.
267+
local prompt
268+
if is_agentic_provider "$provider"; then
269+
cp "$TEST_FILE" "$testdir/test-content.txt"
270+
prompt="read ./test-content.txt and output its contents exactly"
271+
else
272+
echo "hello" > "$testdir/hello.txt"
273+
prompt="Immediately use the shell tool to run 'ls'. Do not ask for confirmation."
274+
fi
275+
265276
# Run the test and capture output
266277
(
267278
export GOOSE_PROVIDER="$provider"
268279
export GOOSE_MODEL="$model"
269-
cd "$testdir" && "$SCRIPT_DIR/target/debug/goose" run --text "read $TEST_FILE and output its contents exactly" --with-builtin "$BUILTINS" 2>&1
280+
cd "$testdir" && "$SCRIPT_DIR/target/debug/goose" run --text "$prompt" --with-builtin "$BUILTINS" 2>&1
270281
) > "$output_file" 2>&1
271282

272283
# Check result: agentic providers return text containing the test content

0 commit comments

Comments
 (0)