Update credential error message to guide LLM behavior

When a block requires credentials the user hasn't connected, the tool response
now tells the LLM that a sign-in button is visible in the chat UI, and instructs
it to stop and wait rather than suggesting workarounds or directing users to
settings.

This message is never shown to the end user — the frontend suppresses the raw
tool response and shows the ChatCredentialsSetup widget instead.

Resolves SECRT-2011
This commit is contained in:
Otto (AGPT)
2026-02-18 16:28:30 +00:00
parent dc77e7b6e6
commit b4e27dc52b

View File

@@ -202,8 +202,11 @@ class RunBlockTool(BaseTool):
return SetupRequirementsResponse(
message=(
f"Block '{block.name}' requires credentials that are not configured. "
"Please set up the required credentials before running this block."
f"Block '{block.name}' requires credentials that the user has not yet connected. "
"A sign-in button has appeared in the chat for the user to connect their account. "
"STOP HERE and tell the user to click the sign-in button shown above in the chat. "
"Do NOT send further messages, suggest workarounds, or direct them to settings. "
"Wait for the user to complete sign-in before continuing."
),
session_id=session_id,
setup_info=SetupInfo(