agent2: Remove model param from Thread::send method (#35936)

It instead uses the currently selected model

Release Notes:

- N/A
This commit is contained in:
Ben Brandt 2025-08-09 23:40:44 +02:00 committed by GitHub
parent ce39644cbd
commit 5901aec40a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 16 additions and 22 deletions

View file

@ -200,11 +200,11 @@ impl Thread {
/// The returned channel will report all the occurrences in which the model stops before erroring or ending its turn.
pub fn send(
&mut self,
model: Arc<dyn LanguageModel>,
content: impl Into<MessageContent>,
cx: &mut Context<Self>,
) -> mpsc::UnboundedReceiver<Result<AgentResponseEvent, LanguageModelCompletionError>> {
let content = content.into();
let model = self.selected_model.clone();
log::info!("Thread::send called with model: {:?}", model.name());
log::debug!("Thread::send content: {:?}", content);