mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 10:21:24 +00:00
fix: set gemini default model for api-key auth (#489) - thanks @jonasjancarik
This commit is contained in:
@@ -25,6 +25,10 @@ import {
|
||||
isRemoteEnvironment,
|
||||
loginAntigravityVpsAware,
|
||||
} from "./antigravity-oauth.js";
|
||||
import {
|
||||
applyGoogleGeminiModelDefault,
|
||||
GOOGLE_GEMINI_DEFAULT_MODEL,
|
||||
} from "./google-gemini-model-default.js";
|
||||
import {
|
||||
applyAuthProfileConfig,
|
||||
applyMinimaxConfig,
|
||||
@@ -427,6 +431,19 @@ export async function applyAuthChoice(params: {
|
||||
provider: "google",
|
||||
mode: "api_key",
|
||||
});
|
||||
if (params.setDefaultModel) {
|
||||
const applied = applyGoogleGeminiModelDefault(nextConfig);
|
||||
nextConfig = applied.next;
|
||||
if (applied.changed) {
|
||||
await params.prompter.note(
|
||||
`Default model set to ${GOOGLE_GEMINI_DEFAULT_MODEL}`,
|
||||
"Model configured",
|
||||
);
|
||||
}
|
||||
} else {
|
||||
agentModelOverride = GOOGLE_GEMINI_DEFAULT_MODEL;
|
||||
await noteAgentModel(GOOGLE_GEMINI_DEFAULT_MODEL);
|
||||
}
|
||||
} else if (params.authChoice === "apiKey") {
|
||||
const key = await params.prompter.text({
|
||||
message: "Enter Anthropic API key",
|
||||
|
||||
Reference in New Issue
Block a user