@@ -107,13 +107,6 @@ def test_format_request_message_content(content, exp_result):
107
107
assert tru_result == exp_result
108
108
109
109
110
- def test_format_request_message_content_unsupported_type ():
111
- content = {"unsupported" : {}}
112
-
113
- with pytest .raises (TypeError , match = "content_type=<unsupported> | unsupported type" ):
114
- SAOpenAIModel .format_request_message_content (content )
115
-
116
-
117
110
def test_format_request_message_tool_call ():
118
111
tool_use = {
119
112
"input" : {"expression" : "2+2" },
@@ -288,6 +281,11 @@ def test_format_request(model, messages, tool_specs, system_prompt):
288
281
},
289
282
{"contentBlockDelta" : {"delta" : {"toolUse" : {"input" : "" }}}},
290
283
),
284
+ # Content Delta - Reasoning Text
285
+ (
286
+ {"chunk_type" : "content_delta" , "data_type" : "reasoning_content" , "data" : "I'm thinking" },
287
+ {"contentBlockDelta" : {"delta" : {"reasoningContent" : {"text" : "I'm thinking" }}}},
288
+ ),
291
289
# Content Delta - Text
292
290
(
293
291
{"chunk_type" : "content_delta" , "data_type" : "text" , "data" : "hello" },
@@ -337,10 +335,3 @@ def test_format_request(model, messages, tool_specs, system_prompt):
337
335
def test_format_chunk (event , exp_chunk , model ):
338
336
tru_chunk = model .format_chunk (event )
339
337
assert tru_chunk == exp_chunk
340
-
341
-
342
- def test_format_chunk_unknown_type (model ):
343
- event = {"chunk_type" : "unknown" }
344
-
345
- with pytest .raises (RuntimeError , match = "chunk_type=<unknown> | unknown type" ):
346
- model .format_chunk (event )
0 commit comments