fix: handle reasoning content blocks in OpenAI-compat streaming parser (#8078)
Some checks are pending
Build Native Packages / Build darwin-arm64 (push) Waiting to run
Build Native Packages / Build darwin-x64 (push) Waiting to run
Build Native Packages / Build linux-arm64 (push) Waiting to run
Build Native Packages / Build linux-x64 (push) Waiting to run
Build Native Packages / Build win32-x64 (push) Waiting to run
Build Native Packages / Collect all binaries (push) Blocked by required conditions
Canary / bundle-desktop-linux (push) Blocked by required conditions
Canary / bundle-desktop-windows (push) Blocked by required conditions
Canary / Prepare Version (push) Waiting to run
Canary / build-cli (push) Blocked by required conditions
Canary / Upload Install Script (push) Blocked by required conditions
Canary / bundle-desktop (push) Blocked by required conditions
Canary / bundle-desktop-intel (push) Blocked by required conditions
Canary / Release (push) Blocked by required conditions
Cargo Deny / deny (push) Waiting to run
Unused Dependencies / machete (push) Waiting to run
CI / changes (push) Waiting to run
CI / Check Rust Code Format (push) Blocked by required conditions
CI / Build and Test Rust Project (push) Blocked by required conditions
CI / Lint Rust Code (push) Blocked by required conditions
CI / Check OpenAPI Schema is Up-to-Date (push) Blocked by required conditions
CI / Test and Lint Electron Desktop App (push) Blocked by required conditions
Live Provider Tests / Smoke Tests (Code Execution) (push) Blocked by required conditions
Live Provider Tests / check-fork (push) Waiting to run
Live Provider Tests / changes (push) Blocked by required conditions
Live Provider Tests / Build Binary (push) Blocked by required conditions
Live Provider Tests / Smoke Tests (push) Blocked by required conditions
Live Provider Tests / Compaction Tests (push) Blocked by required conditions
Live Provider Tests / goose server HTTP integration tests (push) Blocked by required conditions
Publish Docker Image / docker (push) Waiting to run
Publish to npm / Build native binaries (push) Waiting to run
Publish to npm / Release (push) Blocked by required conditions
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run

This commit is contained in:
Will Pfleger 2026-03-23 17:35:46 -04:00 • committed by GitHub
parent 2ff4ab27ee
commit ce160b183d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -58,7 +58,8 @@ enum DeltaContent {
#[derive(Serialize, Deserialize, Debug)]
struct ContentPart {
r#type: String,
text: String,
#[serde(default)]
text: Option<String>,
#[serde(rename = "thoughtSignature")]
thought_signature: Option<String>,
}
@ -100,7 +101,7 @@ fn extract_content_and_signature(
let text = text_parts
.iter()
.map(|p| p.text.as_str())
.filter_map(|p| p.text.as_deref())
.collect::<String>();
let signature = text_parts