diff --git a/src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.GetAgents.cs b/src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.GetAgents.cs index 5d153687f..15ce6eca8 100644 --- a/src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.GetAgents.cs +++ b/src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.GetAgents.cs @@ -46,6 +46,11 @@ public async Task GetAgent(string id) 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);