AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(copilot): prevent connect_integration from hallucinating wrong provider (#12810) (#12899)
SymbolStarb6438a2646a5
diff --git a/autogpt_platform/backend/backend/copilot/tools/connect_integration.py b/autogpt_platform/backend/backend/copilot/tools/connect_integration.pyindex 2e68f2f76d..03ceb33d34 100644--- a/autogpt_platform/backend/backend/copilot/tools/connect_integration.py+++ b/autogpt_platform/backend/backend/copilot/tools/connect_integration.py@@ -40,8 +40,15 @@ class ConnectIntegrationTool(BaseTool):f"Supported providers: {supported}. ""ONLY call this tool for one of the supported providers listed above — ""do NOT call it for Google, Gmail, Slack, or any other provider not in the list. "- "Call this when an external CLI or API call fails because the user "- "has not connected the relevant account. "+ "Call this ONLY when an external CLI or API call in the sandbox "+ "fails because the user has not connected the relevant account. "+ "Do NOT call this for agent block credential issues — `run_agent` "+ "automatically detects and prompts for the correct provider based "+ "on the agent's graph metadata. Using this tool for agent blocks "+ "risks requesting the WRONG provider. "+ "The `provider` parameter must match what the failing CLI/API "+ "actually needs. Double-check that the provider is in the supported "+ "list above before calling. ""The tool surfaces a credentials setup card in the chat so the user ""can authenticate without leaving the page. ""After the user connects the account, retry the operation. "