fix: use dynamic model name in system prompt runtime info

This commit is contained in:
zhayujie
2026-04-02 17:01:56 +08:00
parent b5f33e5ecd
commit 9cc173cc4d
2 changed files with 13 additions and 2 deletions

View File

@@ -465,8 +465,12 @@ class AgentInitializer:
'timezone': timezone_name
}
def get_model():
"""Get current model name dynamically from config"""
return conf().get("model", "unknown")
return {
"model": conf().get("model", "unknown"),
"_get_model": get_model,
"workspace": workspace_root,
"channel": ", ".join(conf().get("channel_type")) if isinstance(conf().get("channel_type"), list) else conf().get("channel_type", "unknown"),
"_get_current_time": get_current_time # Dynamic time function