Skip to content

Commit d91290e

Browse files
authored
Merge pull request #30 from Mng-dev-ai/fix/streaming-stop-reason
Use end_turn stop reason for streams
2 parents 9794ba8 + 27e21af commit d91290e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

anthropic_bridge/providers/openai/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ async def _stream_response(
370370
{
371371
"type": "message_delta",
372372
"delta": {
373-
"stop_reason": "tool_use" if saw_tool_use else "end_turn",
373+
"stop_reason": "end_turn",
374374
"stop_sequence": None,
375375
},
376376
"usage": usage,

anthropic_bridge/providers/openrouter/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ async def _stream_openrouter(
435435
{
436436
"type": "message_delta",
437437
"delta": {
438-
"stop_reason": "tool_use" if saw_tool_use else "end_turn",
438+
"stop_reason": "end_turn",
439439
"stop_sequence": None,
440440
},
441441
"usage": {

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "anthropic-bridge"
3-
version = "0.1.26"
3+
version = "0.1.27"
44
description = "Bridge Anthropic API to OpenRouter and OpenAI models."
55
license = "MIT"
66
requires-python = ">=3.11"

0 commit comments

Comments
 (0)