openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
29 lines (28 loc) • 999 B
JavaScript
import { i as getCurrentPluginMetadataSnapshot } from "./current-plugin-metadata-snapshot-DpeEPkbV.mjs";
import { i as buildModelAliasIndex } from "./model-selection-shared-CHVNQnp1.mjs";
import { t as resolveDefaultModelForAgent } from "./model-selection-config-BC0CegJ7.mjs";
import "./model-selection-Cpoq0B2R.mjs";
//#region src/auto-reply/reply/directive-handling.defaults.ts
/** Resolve default provider/model plus alias index for directive parsing. */
function resolveDefaultModel(params) {
const manifestPlugins = getCurrentPluginMetadataSnapshot({
config: params.cfg,
allowWorkspaceScopedSnapshot: true
});
const modelContext = {
cfg: params.cfg,
agentId: params.agentId,
manifestPlugins
};
const { provider: defaultProvider, model: defaultModel } = resolveDefaultModelForAgent(modelContext);
return {
defaultProvider,
defaultModel,
aliasIndex: buildModelAliasIndex({
...modelContext,
defaultProvider
})
};
}
//#endregion
export { resolveDefaultModel as t };