fix: validate configure probe for streaming providers (#7564)

Signed-off-by: rabi <ramishra@redhat.com>
This commit is contained in:
Rabi Mishra
2026-02-28 06:22:20 +05:30
committed by GitHub
parent a0ae173309
commit fa1cad3faa
+9 -2
View File
@@ -1,5 +1,6 @@
use crate::{conversation::message::Message, model::ModelConfig, providers::create};
use anyhow::Result;
use futures::StreamExt;
use rmcp::model::ToolAnnotations;
use rmcp::{model::Tool, object};
@@ -27,8 +28,8 @@ pub async fn test_provider_configuration(
};
let provider_model_config = provider.get_model_config();
let _result = provider
.complete(
let mut stream = provider
.stream(
&provider_model_config,
"test-session-id",
"You are an AI agent called goose. You use tools of connected extensions to solve problems.",
@@ -37,6 +38,12 @@ pub async fn test_provider_configuration(
)
.await?;
let first_chunk = stream
.next()
.await
.ok_or_else(|| anyhow::anyhow!("Provider test stream returned no events"))?;
first_chunk?;
Ok(())
}