test: drop unavailable and preview Gemini smoke models (#10355)

This commit is contained in:
Michael Neale
2026-07-13 23:45:17 +10:00
committed by GitHub
parent 012f25210f
commit bc29c48eeb
2 changed files with 21 additions and 14 deletions
@@ -42,7 +42,12 @@ testNonAgentic('reads files via shell tool', async (tc) => {
testdir,
'Use the shell tool to cat ./part-a.txt and ./part-b.txt, then reply with ONLY the contents of both files, one per line, nothing else.',
BUILTINS,
{ GOOSE_PROVIDER: tc.provider, GOOSE_MODEL: tc.model }
{ GOOSE_PROVIDER: tc.provider, GOOSE_MODEL: tc.model },
55_000,
(output) => {
const shellToolPattern = /(shell \| developer)|(▸.*shell)/;
return shellToolPattern.test(output) && output.includes(tokenA) && output.includes(tokenB);
}
);
const shellToolPattern = /(shell \| developer)|(▸.*shell)/;
@@ -84,12 +84,7 @@ function getProviders(): ProviderConfig[] {
},
{
provider: 'google',
models: [
'gemini-2.5-pro',
{ name: 'gemini-2.5-flash', flaky: true },
{ name: 'gemini-3-pro-preview', flaky: true },
'gemini-3-flash-preview',
],
models: [{ name: 'gemini-2.5-flash', flaky: true }, 'gemini-3.5-flash'],
available: () => hasEnv('GOOGLE_API_KEY'),
},
{
@@ -369,7 +364,8 @@ export function runGoose(
prompt: string,
builtins: string,
env: Record<string, string>,
timeoutMs: number = 55_000
timeoutMs: number = 55_000,
success?: (output: string) => boolean
): Promise<string> {
return new Promise((resolve, reject) => {
const child: ChildProcess = spawn(
@@ -393,12 +389,18 @@ export function runGoose(
}
}, timeoutMs);
child.stdout?.on('data', (d) => {
output += String(d);
});
child.stderr?.on('data', (d) => {
output += String(d);
});
const captureOutput = (data: unknown) => {
output += String(data);
if (!settled && success?.(output)) {
settled = true;
clearTimeout(timer);
child.kill('SIGKILL');
resolve(output);
}
};
child.stdout?.on('data', captureOutput);
child.stderr?.on('data', captureOutput);
child.on('close', () => {
if (!settled) {