diff --git a/src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.GetAgents.cs b/src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.GetAgents.cs index 5d153687..91e62c93 100644 --- a/src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.GetAgents.cs +++ b/src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.GetAgents.cs @@ -44,7 +44,11 @@ public partial class AgentService if (profile.LlmConfig == null) { profile.LlmConfig = agentSetting.LlmConfig; - profile.LlmConfig.IsInherit = true; + } + else if (string.IsNullOrEmpty(profile.LlmConfig?.Provider) || string.IsNullOrEmpty(profile.LlmConfig?.Model)) + { + profile.LlmConfig.Provider = agentSetting.LlmConfig.Provider; + profile.LlmConfig.Model = agentSetting.LlmConfig.Model; } profile.Plugin = GetPlugin(profile.Id);