From 14234e07cdd1f305ec63da5d2462f4a003bc4b26 Mon Sep 17 00:00:00 2001 From: coder3 Date: Mon, 16 Feb 2026 22:39:37 +1300 Subject: [PATCH] fix: relax test_basic_response assertion for providers returning reasoning_content xAI (and other providers like DeepSeek) can return reasoning_content alongside text content, producing 2+ content items. The test now accepts >= 1 items and verifies at least one is Text, instead of requiring exactly 1 item. Co-Authored-By: Claude Opus 4.6 Signed-off-by: clayarnoldg2m --- crates/goose/tests/providers.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/crates/goose/tests/providers.rs b/crates/goose/tests/providers.rs index bf515c6a31a1..68e81de4bccc 100644 --- a/crates/goose/tests/providers.rs +++ b/crates/goose/tests/providers.rs @@ -179,15 +179,17 @@ impl ProviderTester { .complete(session_id, "You are a helpful assistant.", &[message], &[]) .await?; - assert_eq!( - response.content.len(), - 1, - "Expected single content item in response" + assert!( + !response.content.is_empty(), + "Expected at least one content item in response" ); assert!( - matches!(response.content[0], MessageContent::Text(_)), - "Expected text response" + response + .content + .iter() + .any(|c| matches!(c, MessageContent::Text(_))), + "Expected at least one text content item in response" ); println!(