fix(agents): harden model-skip and tool-policy imports

This commit is contained in:
Peter Steinberger
2026-02-21 11:48:02 +01:00
parent 55aaeb5085
commit 5cc631cc9c
2 changed files with 21 additions and 2 deletions

View File

@@ -50,6 +50,9 @@ function isGoogleModelNotFoundError(err: unknown): boolean {
if (!/not found/i.test(msg)) {
return false;
}
if (/\b404\b/.test(msg)) {
return true;
}
if (/models\/.+ is not found for api version/i.test(msg)) {
return true;
}
@@ -445,7 +448,10 @@ describeLive("live models (profile keys)", () => {
logProgress(`${progressLabel}: skip (anthropic billing)`);
break;
}
if (model.provider === "google" && isGoogleModelNotFoundError(err)) {
if (
(model.provider === "google" || model.provider === "google-gemini-cli") &&
isGoogleModelNotFoundError(err)
) {
skipped.push({ model: id, reason: message });
logProgress(`${progressLabel}: skip (google model not found)`);
break;