mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 21:28:26 +00:00
refactor(commands): dedupe auth-choice model notes
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
normalizeApiKeyInput,
|
||||
validateApiKeyInput,
|
||||
} from "./auth-choice.api-key.js";
|
||||
import { createAuthChoiceAgentModelNoter } from "./auth-choice.apply-helpers.js";
|
||||
import { applyAuthChoiceHuggingface } from "./auth-choice.apply.huggingface.js";
|
||||
import type { ApplyAuthChoiceParams, ApplyAuthChoiceResult } from "./auth-choice.apply.js";
|
||||
import { applyAuthChoiceOpenRouter } from "./auth-choice.apply.openrouter.js";
|
||||
@@ -74,15 +75,7 @@ export async function applyAuthChoiceApiProviders(
|
||||
): Promise<ApplyAuthChoiceResult | null> {
|
||||
let nextConfig = params.config;
|
||||
let agentModelOverride: string | undefined;
|
||||
const noteAgentModel = async (model: string) => {
|
||||
if (!params.agentId) {
|
||||
return;
|
||||
}
|
||||
await params.prompter.note(
|
||||
`Default model set to ${model} for agent "${params.agentId}".`,
|
||||
"Model configured",
|
||||
);
|
||||
};
|
||||
const noteAgentModel = createAuthChoiceAgentModelNoter(params);
|
||||
|
||||
let authChoice = params.authChoice;
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user