fix: throw exception on multiple injections (#5033)

Throw exception on for multiple injections

Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
This commit is contained in:
Emmanuel Ferdman
2025-06-10 16:54:01 -04:00
committed by GitHub
parent 85c809a651
commit d719438307
@@ -850,7 +850,7 @@ def _get_store_arg(tool: BaseTool) -> Optional[str]:
if _is_injection(type_arg, InjectedStore)
]
if len(injections) > 1:
ValueError(
raise ValueError(
"A tool argument should not be annotated with InjectedStore more than "
f"once. Received arg {name} with annotations {injections}."
)