Skip to content

Commit 7461863

Browse files
google-genai-botcopybara-github
authored andcommitted
fix: LiteLLM Claude thinking blocks with display: "omitted" were lost
Starting with Opus 4.7 thoughts display defaults to omitted instead of summarized https://platform.claude.com/docs/en/build-with-claude/extended-thinking#controlling-thinking-display which omits thinking_text. However thinking signature is still critically important to be preserved and sent back to the model. PiperOrigin-RevId: 934866189
1 parent a57c3e4 commit 7461863

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/google/adk/models/lite_llm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ def _convert_reasoning_value_to_parts(reasoning_value: Any) -> List[types.Part]:
525525
continue
526526
thinking_text = block.get("thinking", "")
527527
signature = block.get("signature", "")
528-
if not thinking_text:
528+
if not thinking_text and not signature:
529529
continue
530530
part = types.Part(text=thinking_text, thought=True)
531531
if signature:

0 commit comments

Comments
 (0)