@@ -25,7 +25,7 @@ import {
2525} from "../../agents/model-selection.js" ;
2626import { formatCliCommand } from "../../cli/command-format.js" ;
2727import { withProgressTotals } from "../../cli/progress.js" ;
28- import { CONFIG_PATH } from "../../config/config.js" ;
28+ import { createConfigIO } from "../../config/config.js" ;
2929import {
3030 resolveAgentModelFallbackValues ,
3131 resolveAgentModelPrimaryValue ,
@@ -77,6 +77,7 @@ export async function modelsStatusCommand(
7777 if ( opts . plain && opts . probe ) {
7878 throw new Error ( "--probe cannot be used with --plain output." ) ;
7979 }
80+ const configPath = createConfigIO ( ) . configPath ;
8081 const cfg = await loadModelsConfig ( { commandName : "models status" , runtime } ) ;
8182 const agentId = resolveKnownAgentId ( { cfg, rawAgentId : opts . agent } ) ;
8283 const agentDir = agentId ? resolveAgentDir ( cfg , agentId ) : resolveOpenClawAgentDir ( ) ;
@@ -326,7 +327,7 @@ export async function modelsStatusCommand(
326327 runtime . log (
327328 JSON . stringify (
328329 {
329- configPath : CONFIG_PATH ,
330+ configPath,
330331 ...( agentId ? { agentId } : { } ) ,
331332 agentDir,
332333 defaultModel : defaultLabel ,
@@ -389,7 +390,7 @@ export async function modelsStatusCommand(
389390 rawModel && rawModel !== resolvedLabel ? `${ resolvedLabel } (from ${ rawModel } )` : resolvedLabel ;
390391
391392 runtime . log (
392- `${ label ( "Config" ) } ${ colorize ( rich , theme . muted , ":" ) } ${ colorize ( rich , theme . info , shortenHomePath ( CONFIG_PATH ) ) } ` ,
393+ `${ label ( "Config" ) } ${ colorize ( rich , theme . muted , ":" ) } ${ colorize ( rich , theme . info , shortenHomePath ( configPath ) ) } ` ,
393394 ) ;
394395 runtime . log (
395396 `${ label ( "Agent dir" ) } ${ colorize ( rich , theme . muted , ":" ) } ${ colorize (
0 commit comments