@@ -59,6 +59,7 @@ def complex_arguments_fn(
5959 must_be_none_with_default : None = None ,
6060 an_int_with_equals_field : int = Field (1 , ge = 0 ),
6161 int_annotated_with_default : Annotated [int , Field (description = "hey" )] = 5 ,
62+ num_annotated_with_str : str = "" ,
6263) -> str :
6364 _ = (
6465 an_int ,
@@ -81,6 +82,7 @@ def complex_arguments_fn(
8182 must_be_none_with_default ,
8283 an_int_with_equals_field ,
8384 int_annotated_with_default ,
85+ num_annotated_with_str ,
8486 )
8587 return "ok!"
8688
@@ -107,6 +109,7 @@ async def test_complex_function_runtime_arg_validation_non_json():
107109 "my_model_a" : {},
108110 "my_model_a_forward_ref" : {},
109111 "my_model_b" : {"how_many_shrimp" : 5 , "ok" : {"x" : 1 }, "y" : None },
112+ "num_annotated_with_str" : "5" ,
110113 },
111114 arguments_to_pass_directly = None ,
112115 )
@@ -381,6 +384,11 @@ def test_complex_function_json_schema():
381384 "title" : "Int Annotated With Default" ,
382385 "type" : "integer" ,
383386 },
387+ "num_annotated_with_str" : {
388+ "default" : "" ,
389+ "title" : "Num Annotated With Str" ,
390+ "type" : "string" ,
391+ },
384392 },
385393 "required" : [
386394 "an_int" ,
0 commit comments