fix: handle NotGiven from from_standard_tools in Nova Sonic connect
Same pattern as the earlier get_setup_params fix: when context tools are absent, the fallback `adapter.from_standard_tools(self._tools)` can return the NotGiven sentinel, and `_send_prompt_start_event` expects a list. Coerce via `or []` so the NotGiven case becomes an empty list.
This commit is contained in:
@@ -654,7 +654,7 @@ class AWSNovaSonicLLMService(LLMService):
|
||||
tools = (
|
||||
llm_connection_params["tools"]
|
||||
if llm_connection_params["tools"]
|
||||
else adapter.from_standard_tools(self._tools)
|
||||
else (adapter.from_standard_tools(self._tools) or [])
|
||||
)
|
||||
logger.debug(f"Using tools: {tools}")
|
||||
await self._send_prompt_start_event(tools)
|
||||
|
||||
Reference in New Issue
Block a user