Merge pull request #340 from chumyin/fix/agent-turn-provider-name-signature

fix(agent): align channel agent_turn signature with provider label
This commit is contained in:
Chummy 2026-02-16 21:51:17 +08:00 committed by GitHub
commit fa9cdabbcb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -372,13 +372,14 @@ struct ParsedToolCall {
/// Execute a single turn for channel runtime paths. /// Execute a single turn for channel runtime paths.
/// ///
/// Channels currently do not thread an explicit provider label into this call, /// Channel runtime now provides an explicit provider label so observer events
/// so we route through the full loop with a stable placeholder provider name. /// stay consistent with the main agent loop execution path.
pub(crate) async fn agent_turn( pub(crate) async fn agent_turn(
provider: &dyn Provider, provider: &dyn Provider,
history: &mut Vec<ChatMessage>, history: &mut Vec<ChatMessage>,
tools_registry: &[Box<dyn Tool>], tools_registry: &[Box<dyn Tool>],
observer: &dyn Observer, observer: &dyn Observer,
provider_name: &str,
model: &str, model: &str,
temperature: f64, temperature: f64,
) -> Result<String> { ) -> Result<String> {
@ -387,7 +388,7 @@ pub(crate) async fn agent_turn(
history, history,
tools_registry, tools_registry,
observer, observer,
"channel-runtime", provider_name,
model, model,
temperature, temperature,
) )