fix(cli): lazy load model commands

This commit is contained in:
Vincent Koc
2026-04-26 03:24:10 -07:00
parent c74fb78194
commit c3a81166fc
6 changed files with 34 additions and 9 deletions

View File

@@ -13,7 +13,6 @@ import {
import { updateAuthProfileStoreWithLock } from "../agents/auth-profiles/store.js";
import { resolveMemorySearchConfig } from "../agents/memory-search.js";
import { loadModelCatalog } from "../agents/model-catalog.js";
import { modelsStatusCommand } from "../commands/models/list.js";
import { loadConfig } from "../config/config.js";
import { resolveAgentModelPrimaryValue } from "../config/model-input.js";
import type { OpenClawConfig } from "../config/types.openclaw.js";
@@ -683,6 +682,7 @@ async function buildModelProviders() {
async function runModelAuthStatus() {
const captured: string[] = [];
const { modelsStatusCommand } = await import("../commands/models/list.status-command.js");
await modelsStatusCommand(
{ json: true },
{