fix: set gemini default model for api-key auth (#489) - thanks @jonasjancarik

This commit is contained in:
Peter Steinberger
2026-01-09 02:49:42 +01:00
parent 302d51fd40
commit e1789ba9e5
6 changed files with 108 additions and 0 deletions

View File

@@ -50,6 +50,10 @@ import {
GATEWAY_DAEMON_RUNTIME_OPTIONS,
type GatewayDaemonRuntime,
} from "./daemon-runtime.js";
import {
applyGoogleGeminiModelDefault,
GOOGLE_GEMINI_DEFAULT_MODEL,
} from "./google-gemini-model-default.js";
import { healthCommand } from "./health.js";
import {
applyAuthProfileConfig,
@@ -529,6 +533,14 @@ async function promptAuthConfig(
provider: "google",
mode: "api_key",
});
const applied = applyGoogleGeminiModelDefault(next);
next = applied.next;
if (applied.changed) {
note(
`Default model set to ${GOOGLE_GEMINI_DEFAULT_MODEL}`,
"Model configured",
);
}
} else if (authChoice === "apiKey") {
const key = guardCancel(
await text({