mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 02:11:36 +00:00
fix(agents): fall back to agents.defaults.model when agent has no model config (#24210)
Merged via /review-pr -> /prepare-pr -> /merge-pr.
Prepared head SHA: 0f272b1027
Co-authored-by: bianbiandashen <16240681+bianbiandashen@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
resolveMainSessionAlias,
|
||||
} from "../../agents/tools/sessions-helpers.js";
|
||||
import type { OpenClawConfig } from "../../config/config.js";
|
||||
import { toAgentModelListLike } from "../../config/model-input.js";
|
||||
import type { SessionEntry, SessionScope } from "../../config/sessions.js";
|
||||
import { logVerbose } from "../../globals.js";
|
||||
import {
|
||||
@@ -164,7 +165,7 @@ export async function buildStatusReply(params: {
|
||||
agent: {
|
||||
...agentDefaults,
|
||||
model: {
|
||||
...agentDefaults.model,
|
||||
...toAgentModelListLike(agentDefaults.model),
|
||||
primary: `${provider}/${model}`,
|
||||
},
|
||||
contextTokens,
|
||||
|
||||
Reference in New Issue
Block a user