fix(hooks): replace console logging with proper subsystem logging in loader (openclaw#11029) thanks @shadril238

Verified:
- pnpm build
- pnpm check
- pnpm test

Co-authored-by: shadril238 <63901551+shadril238@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
Shadril Hassan Shifat
2026-02-14 06:21:11 +06:00
committed by GitHub
parent 05524bb5ef
commit 1c928e493d
4 changed files with 22 additions and 31 deletions

View File

@@ -5,6 +5,7 @@ import type { ModelRow } from "./list.types.js";
import { ensureAuthProfileStore } from "../../agents/auth-profiles.js";
import { resolveForwardCompatModel } from "../../agents/model-forward-compat.js";
import { parseModelRef } from "../../agents/model-selection.js";
import { resolveModel } from "../../agents/pi-embedded-runner/model.js";
import { loadConfig } from "../../config/config.js";
import { resolveConfiguredEntries } from "./list.configured.js";
import { formatErrorWithStack } from "./list.errors.js";
@@ -109,6 +110,9 @@ export async function modelsListCommand(
modelByKey.set(entry.key, forwardCompat);
}
}
if (!model) {
model = resolveModel(entry.ref.provider, entry.ref.model, undefined, cfg).model;
}
if (opts.local && model && !isLocalBaseUrl(model.baseUrl)) {
continue;
}