[stripe] opus budget thinking

This commit is contained in:
Colin Lin
2025-12-05 10:56:02 -05:00
parent b9b5d638c8
commit 3046b9f163
2 changed files with 6 additions and 1 deletions
@@ -1071,7 +1071,7 @@ def _parse_content_for_reasoning(
return None, message_text
reasoning_match = re.match(
r"<(?:think|thinking)>(.*?)</(?:think|thinking)>(.*)", message_text, re.DOTALL
r"<(?:think|thinking|budget:thinking)>(.*?)</(?:think|thinking|budget:thinking)>(.*)", message_text, re.DOTALL
)
if reasoning_match:
+5
View File
@@ -1043,6 +1043,11 @@ def test_convert_model_response_object():
"I am thinking here",
"The sky is a canvas of blue",
),
(
"<budget:thinking>\nLet me work through this step by step.\n</budget:thinking>\n\nYou have **8 fruits** remaining.",
"\nLet me work through this step by step.\n",
"\n\nYou have **8 fruits** remaining.",
),
("I am a regular response", None, "I am a regular response"),
],
)