-
Notifications
You must be signed in to change notification settings - Fork 3.3k
bug: Databricks streaming parser fails on adaptive thinking response chunks #8077
Description
Bug Description
Commit 28cab714b6a ("claude adaptive thinking #7944") enabled adaptive thinking for Claude Opus 4.6/Sonnet 4.6 models via the Databricks provider. When thinking.type = "adaptive" is sent, Databricks returns streaming chunks containing reasoning content blocks:
{
"choices": [{
"delta": {
"content": [{"type": "reasoning", "summary": [{"type": "summary_text", "text": "...", "signature": ""}]}]
}
}]
}The OpenAI-compat streaming parser in openai.rs fails to deserialize these chunks:
Failed to parse streaming chunk: data did not match any variant of untagged enum DeltaContent
Root Cause
DeltaContent in openai.rs (line 53) is defined as:
#[serde(untagged)]
enum DeltaContent {
String(String),
Array(Vec<ContentPart>),
}ContentPart requires a text: String field:
struct ContentPart {
r#type: String,
text: String, // ← required
thought_signature: Option<String>,
}When Databricks returns {"type": "reasoning", "summary": [...]}, there is no text field — the content is in summary instead. Serde tries both DeltaContent variants, both fail, and the entire streaming chunk is rejected.
The Anthropic native provider parser (anthropic.rs) was updated to handle reasoning blocks in commit a762fe1000e, but the OpenAI-compat parser used by Databricks was not.
Impact
ALL streaming responses fail* for Claude Opus 4.6 and Sonnet 4.6 models via the Databricks provider. The model returns a reasoning block as the very first streaming chunk, which immediately fails parsing and aborts the response. This affects any deployment using goose with Databricks-hosted Claude 4.6 models.
Reproduction
- Configure goose with a Databricks provider using a
claude-opus-4-6model - Send any message that *triggers auto reasoning (i.e. a simple message like
testwon't trigger, but almost anything more complex will) - Observe:
Failed to parse streaming chunk: data did not match any variant of untagged enum DeltaContent