Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/strands/models/sagemaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,10 @@ async def stream(
)

# Handle reasoning content
if choice["delta"].get("reasoning_content"):
# NOTE: Both `reasoning` and `reasoning_content` need to be handled as vLLM v0.16.0 deprecated
# the `reasoning_content` in favour of `reasoning`
# See https://github.com/vllm-project/vllm/pull/33402
if any(k in choice["delta"] for k in {"reasoning_content", "reasoning"}):
Comment thread
alvarobartt marked this conversation as resolved.
Outdated
if not reasoning_content_started:
yield self.format_chunk(
{"chunk_type": "content_start", "data_type": "reasoning_content"}
Expand All @@ -379,7 +382,7 @@ async def stream(
{
"chunk_type": "content_delta",
"data_type": "reasoning_content",
"data": choice["delta"]["reasoning_content"],
"data": choice["delta"].get("reasoning_content", choice["delta"].get("reasoning")),
Comment thread
alvarobartt marked this conversation as resolved.
Outdated
}
)

Expand Down
Loading