We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b1b166 commit 6e6e124Copy full SHA for 6e6e124
1 file changed
src/google/adk/tools/_function_parameter_parse_util.py
@@ -131,7 +131,19 @@ def _generate_json_schema_for_parameter(
131
json_schema_dict = _add_unevaluated_items_to_fixed_len_tuple_schema(
132
json_schema_dict
133
)
134
- return json_schema_dict
+
135
+ def _strip_unsupported_keys(d: Any) -> Any:
136
+ if isinstance(d, dict):
137
+ d.pop('prefixItems', None)
138
+ d.pop('unevaluatedItems', None)
139
+ for k, v in d.items():
140
+ _strip_unsupported_keys(v)
141
+ elif isinstance(d, list):
142
+ for item in d:
143
+ _strip_unsupported_keys(item)
144
+ return d
145
146
+ return _strip_unsupported_keys(json_schema_dict)
147
148
149
def _is_builtin_primitive_or_compound(
0 commit comments