alita-sdk 0.3.584__py3-none-any.whl → 0.3.585__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.

Potentially problematic release.


This version of alita-sdk might be problematic. Click here for more details.

@@ -264,6 +264,8 @@ def _resolve_server_variables_in_spec(spec: dict) -> tuple[dict, Optional[dict]]
264
264
  if not isinstance(servers, list):
265
265
  return spec, None
266
266
 
267
+ unresolved_info = None
268
+
267
269
  for i, server in enumerate(servers):
268
270
  if not isinstance(server, dict):
269
271
  continue
@@ -275,23 +277,32 @@ def _resolve_server_variables_in_spec(spec: dict) -> tuple[dict, Optional[dict]]
275
277
  resolved_url, missing_vars = _resolve_server_variables(url, variables)
276
278
 
277
279
  if missing_vars:
278
- # Don't raise here - return the info so it can be raised at execution time
279
- # This allows toolkit creation to succeed and tools to be listed
280
- logger.warning(
281
- f"Server URL '{url}' has variables without defaults: {missing_vars}. "
282
- f"Tool execution will fail until defaults are provided in the spec."
283
- )
284
- return spec, {
285
- "url": url,
286
- "missing_vars": missing_vars,
287
- "server_index": i,
288
- }
280
+ # Track unresolved variables for deferred error at execution time
281
+ # Store only the first server with issues (usually there's only one)
282
+ if unresolved_info is None:
283
+ logger.warning(
284
+ f"Server URL '{url}' has variables without defaults: {missing_vars}. "
285
+ f"Tool execution will fail until defaults are provided in the spec."
286
+ )
287
+ unresolved_info = {
288
+ "url": url,
289
+ "missing_vars": missing_vars,
290
+ "server_index": i,
291
+ }
292
+
293
+ # Add placeholder defaults so openapi_pydantic validation passes
294
+ # The URL will still have {placeholders} but at least the spec parses
295
+ if variables and isinstance(variables, dict):
296
+ for var_name in missing_vars:
297
+ if var_name in variables and isinstance(variables[var_name], dict):
298
+ # Add a placeholder default - the URL won't work but spec will parse
299
+ variables[var_name]["default"] = f"MISSING_{var_name}"
289
300
 
290
301
  if resolved_url != url:
291
302
  server["url"] = resolved_url
292
303
  logger.debug(f"Resolved server URL: '{url}' -> '{resolved_url}'")
293
304
 
294
- return spec, None
305
+ return spec, unresolved_info
295
306
 
296
307
 
297
308
  def _apply_base_url_override(spec: dict, base_url_override: str) -> dict:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alita_sdk
3
- Version: 0.3.584
3
+ Version: 0.3.585
4
4
  Summary: SDK for building langchain agents using resources from Alita
5
5
  Author-email: Artem Rozumenko <artyom.rozumenko@gmail.com>, Mikalai Biazruchka <mikalai_biazruchka@epam.com>, Roman Mitusov <roman_mitusov@epam.com>, Ivan Krakhmaliuk <lifedj27@gmail.com>, Artem Dubrovskiy <ad13box@gmail.com>
6
6
  License-Expression: Apache-2.0
@@ -366,7 +366,7 @@ alita_sdk/tools/ocr/__init__.py,sha256=uhwn2LGzk7Fldy9nKm-kvwzrVjiagOeVr0IZ9TJn9
366
366
  alita_sdk/tools/ocr/api_wrapper.py,sha256=08UF8wj1sR8DcW0z16pw19bgLatLkBF8dySW-Ds8iRk,29649
367
367
  alita_sdk/tools/ocr/text_detection.py,sha256=1DBxt54r3_HdEi93QynSIVta3rH3UpIvy799TPtDTtk,23825
368
368
  alita_sdk/tools/openapi/__init__.py,sha256=X06z0_BxLbymk9H-P1Pr2SuEiYyJRPEg_9VOzjrZ3NQ,19463
369
- alita_sdk/tools/openapi/api_wrapper.py,sha256=l7n8mlNQhqjMOa-MfuabjoCc9vFLQYQpRudPTLkSP5M,52454
369
+ alita_sdk/tools/openapi/api_wrapper.py,sha256=m-v6R45UlUWKuHNqxb4oElIfoln89WutbmxF1TnQgF0,53109
370
370
  alita_sdk/tools/openapi/tool.py,sha256=2UU3_VZp6hK4-c333Jl0jV62PS93iOWjmpWc_K7eo7Q,569
371
371
  alita_sdk/tools/pandas/__init__.py,sha256=8Epxo-iDrOMa3kZ0SezIV792T15aDlER_iwAUF11vGo,2998
372
372
  alita_sdk/tools/pandas/api_wrapper.py,sha256=SsvlCjYz417HihWkfxm_GKrUkm5ZxnxdI8Objele128,12260
@@ -444,9 +444,9 @@ alita_sdk/tools/zephyr_scale/api_wrapper.py,sha256=kT0TbmMvuKhDUZc0i7KO18O38JM9S
444
444
  alita_sdk/tools/zephyr_squad/__init__.py,sha256=cUSc0ZhpGmWnTQ3ZjllU9QmNlCfaHZ21HCFjfenSMH8,3081
445
445
  alita_sdk/tools/zephyr_squad/api_wrapper.py,sha256=kmw_xol8YIYFplBLWTqP_VKPRhL_1ItDD0_vXTe_UuI,14906
446
446
  alita_sdk/tools/zephyr_squad/zephyr_squad_cloud_client.py,sha256=R371waHsms4sllHCbijKYs90C-9Yu0sSR3N4SUfQOgU,5066
447
- alita_sdk-0.3.584.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
448
- alita_sdk-0.3.584.dist-info/METADATA,sha256=xxCpfREoEZlAigBLUjXNBe9y2jJaTb0MxE482oxtjCk,24266
449
- alita_sdk-0.3.584.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
450
- alita_sdk-0.3.584.dist-info/entry_points.txt,sha256=VijN0h4alp1WXm8tfS3P7vuGxN4a5RZqHjXAoEIBZnI,49
451
- alita_sdk-0.3.584.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
452
- alita_sdk-0.3.584.dist-info/RECORD,,
447
+ alita_sdk-0.3.585.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
448
+ alita_sdk-0.3.585.dist-info/METADATA,sha256=WyrOdV2Ear_QW24O39Rkhf0zgmiOb3YSgz_mSg9rU5A,24266
449
+ alita_sdk-0.3.585.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
450
+ alita_sdk-0.3.585.dist-info/entry_points.txt,sha256=VijN0h4alp1WXm8tfS3P7vuGxN4a5RZqHjXAoEIBZnI,49
451
+ alita_sdk-0.3.585.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
452
+ alita_sdk-0.3.585.dist-info/RECORD,,