agentle 0.9.42__py3-none-any.whl → 0.9.43__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -202,6 +202,9 @@ class AgentleToolToOpenRouterToolAdapter(Adapter[Tool, OpenRouterTool]):
202
202
  "array": "array",
203
203
  "dict": "object",
204
204
  "object": "object",
205
+ "none": "null",
206
+ "nonetype": "null",
207
+ "null": "null",
205
208
  }
206
209
 
207
210
  for param_name, param_info in agentle_params.items():
@@ -226,8 +229,23 @@ class AgentleToolToOpenRouterToolAdapter(Adapter[Tool, OpenRouterTool]):
226
229
  prop_schema = self._expand_complex_type(type_annotation)
227
230
  else:
228
231
  # Map the type to JSON Schema type
229
- json_type = type_mapping.get(param_type_str.lower(), param_type_str)
230
- prop_schema["type"] = json_type
232
+ if "|" in param_type_str:
233
+ # Handle union types like "str | None"
234
+ parts = [p.strip() for p in param_type_str.split("|")]
235
+ json_types: list[str] = []
236
+
237
+ for part in parts:
238
+ mapped = type_mapping.get(part.lower(), part)
239
+ if mapped not in json_types:
240
+ json_types.append(mapped)
241
+
242
+ if len(json_types) == 1:
243
+ prop_schema["type"] = json_types[0]
244
+ else:
245
+ prop_schema["type"] = json_types
246
+ else:
247
+ json_type = type_mapping.get(param_type_str.lower(), param_type_str)
248
+ prop_schema["type"] = json_type
231
249
 
232
250
  # Copy over other attributes (excluding 'required' and 'type')
233
251
  for key, value in param_info.items():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentle
3
- Version: 0.9.42
3
+ Version: 0.9.43
4
4
  Summary: ...
5
5
  Author-email: Arthur Brenno <64020210+arthurbrenno@users.noreply.github.com>
6
6
  License-File: LICENSE
@@ -359,7 +359,7 @@ agentle/generations/providers/openrouter/openrouter_generation_provider.py,sha25
359
359
  agentle/generations/providers/openrouter/_adapters/__init__.py,sha256=orgZeEBqH4X_cpyOMiClvfZHY5cLwLNqhAYLqNjGIH4,1826
360
360
  agentle/generations/providers/openrouter/_adapters/agentle_message_to_openrouter_message_adapter.py,sha256=IvaovVP0ChYEreysiDyqF8SXdXxnD_Y9MjA2raEoncw,9790
361
361
  agentle/generations/providers/openrouter/_adapters/agentle_part_to_openrouter_part_adapter.py,sha256=eIfwQQ9BokHy3FQ90GJ4i_J3L46XCiSBd1RWnzu-gAo,5967
362
- agentle/generations/providers/openrouter/_adapters/agentle_tool_to_openrouter_tool_adapter.py,sha256=41i3B6awaTNZsdQ46Oi1e10cuNhQqWL-KBJ5V_sHkiI,9547
362
+ agentle/generations/providers/openrouter/_adapters/agentle_tool_to_openrouter_tool_adapter.py,sha256=wKOANdS97r82FqBgCTPbR6OdHJQZYpVLwFRiINZHZXA,10334
363
363
  agentle/generations/providers/openrouter/_adapters/openrouter_message_to_generated_assistant_message_adapter.py,sha256=uB4TYc0fuwsoYdRnEnLhbwQISyaZ2Z2RWkPFGQXUc80,5295
364
364
  agentle/generations/providers/openrouter/_adapters/openrouter_response_to_generation_adapter.py,sha256=-QrOeUcKChVChOg7EY0EHLnjUSgQclk-df_sifwCE1M,7292
365
365
  agentle/generations/providers/openrouter/_adapters/openrouter_stream_to_generation_adapter.py,sha256=5eQ2sfWiBB9GJ0EkTA_7A0wK2LqixLHFGI83lwg0_i0,10181
@@ -1018,7 +1018,7 @@ agentle/web/actions/scroll.py,sha256=WqVVAORNDK3BL1oASZBPmXJYeSVkPgAOmWA8ibYO82I
1018
1018
  agentle/web/actions/viewport.py,sha256=KCwm88Pri19Qc6GLHC69HsRxmdJz1gEEAODfggC_fHo,287
1019
1019
  agentle/web/actions/wait.py,sha256=IKEywjf-KC4ni9Gkkv4wgc7bY-hk7HwD4F-OFWlyf2w,571
1020
1020
  agentle/web/actions/write_text.py,sha256=9mxfHcpKs_L7BsDnJvOYHQwG8M0GWe61SRJAsKk3xQ8,748
1021
- agentle-0.9.42.dist-info/METADATA,sha256=d2ra_dRi9kbEYhixrDlJGsCRuC63r9iviZfgpOOsEk4,86879
1022
- agentle-0.9.42.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
1023
- agentle-0.9.42.dist-info/licenses/LICENSE,sha256=T90S9vqRS6qP-voULxAcvwEs558wRRo6dHuZrjgcOUI,1085
1024
- agentle-0.9.42.dist-info/RECORD,,
1021
+ agentle-0.9.43.dist-info/METADATA,sha256=5axsf-zRn2zVGRru3Y2NBedqkf6uAye-6vrS7yPjgEE,86879
1022
+ agentle-0.9.43.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
1023
+ agentle-0.9.43.dist-info/licenses/LICENSE,sha256=T90S9vqRS6qP-voULxAcvwEs558wRRo6dHuZrjgcOUI,1085
1024
+ agentle-0.9.43.dist-info/RECORD,,