openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
18 lines (17 loc) • 809 B
JavaScript
import { a as resolveAgentModelPrimaryValue } from "./model-input-BuGMCNOz.js";
import { r as logConfigUpdated } from "./logging-Idqd9ylL.js";
import { l as updateDefaultModelPrimaryConfig } from "./shared-CZFRGTsE.js";
//#region src/commands/models/set-image.ts
/** Command for setting the default image model. */
/** Sets agents.defaults.imageModel.primary after resolving aliases/catalog provider aliases. */
async function modelsSetImageCommand(modelRaw, runtime) {
const { updated, warning } = await updateDefaultModelPrimaryConfig({
modelRaw,
field: "imageModel"
});
if (warning) runtime.error?.(warning);
logConfigUpdated(runtime);
runtime.log(`Image model: ${resolveAgentModelPrimaryValue(updated.agents?.defaults?.imageModel) ?? modelRaw}`);
}
//#endregion
export { modelsSetImageCommand };