Skip to content

Commit da15718

Browse files
jsonbaileyclaude
andcommitted
fix: warn in _parse_tools when tools_data is present but not a dict
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a0bc651 commit da15718

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

packages/sdk/server-ai/src/ldai/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
def _parse_tools(tools_data: Optional[Dict[str, Any]]) -> Optional[Dict[str, LDTool]]:
5757
"""Parse the root-level tools map from a flag variation dict."""
5858
if not isinstance(tools_data, dict):
59+
if tools_data is not None:
60+
log.warning('Skipping tools: expected a dict, got %s', type(tools_data).__name__)
5961
return None
6062
result: Dict[str, LDTool] = {}
6163
for tool_name, tool_dict in tools_data.items():

0 commit comments

Comments
 (0)