fix(tools): support no-auth Composio toolkits + server-owned connection flags#4785
fix(tools): support no-auth Composio toolkits + server-owned connection flags#4785mmabrouk wants to merge 1 commit into
Conversation
…t connection flags No-auth Composio toolkits (codeinterpreter, the composio meta-toolkit) could not be connected. The adapter always POSTs an auth config, which Composio rejects for a no-auth toolkit (Auth_Config_NoAuthApp), and resolve/execute required a connected-account id those toolkits do not have, so the whole no-auth path was unreachable. Detect a no-auth toolkit (every auth_config_details[].mode == NO_AUTH), skip the auth-config and connected-account creation, and persist a usable connection with no Composio account. Resolve and execute omit the account id for a no-auth connection (Composio runs those tools with no account). Connection validity is now server-owned: a client can no longer send flags.is_valid to mark a pending auth connection usable. Refresh on a no-auth connection is a no-op, not a not-found error. Verified: connect 500 to 200, resolve 200, /tools/call ran print(6*7) and returned 42. New test_no_auth_connection.py (11 tests); all 15 tools unit tests pass, ruff clean. Reviewed by a second agent and Codex; their one blocker (client-settable is_valid) is fixed here. Claude-Session: https://claude.ai/code/session_01KsGSJQwsUdgWcNSEt2P2qD
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Railway Preview Environment
|
Context
A Composio toolkit that needs no auth (the code interpreter, the
composiometa-toolkit) could not be connected.POST /tools/connections/returned 500: the adapter always POSTs an auth config to Composio, which rejects it for a no-auth toolkit (Auth_Config_NoAuthApp, "use its tools directly without creating a connected account"). Past create, resolve and execute also required aconnected_account_idthat no-auth toolkits do not have, so the whole no-auth path was unreachable.Changes
auth_config_details[].mode == "NO_AUTH") and skip the auth-config and connected-account creation. Persist a usable connection with no Composio account.connected_account_idfor a no-auth connection. Composio runs those tools with no account (verified directly:print(6*7)returns42).flags: {is_valid: true}. Auth-backed connections persistis_valid=falseuntil their flow completes; only the server-confirmed no-auth branch setsis_valid=true.refresh_connectionon a no-auth connection is a no-op instead ofConnectionNotFoundError.Before: connect
codeinterpreterreturned 500. After: connect 200, resolve 200,/tools/callrunsprint(6*7)and returns42.Tests
api/oss/tests/pytest/unit/tools/test_no_auth_connection.py(11 tests): no-auth detection (empty and mixed-mode edges), adapter skips the auth-config, execute omits and sends the account id correctly, resolve accepts no-auth and still rejects auth-without-id, create server-owns the flags, refresh no-op.ruff formatandruff checkclean.is_valid) is fixed here.Notes
feat/agent-service(the gateway tool-resolution API), notmain, because that feature is not on main yet.state/project_idis missing) was flagged during review and left out of scope.https://claude.ai/code/session_01KsGSJQwsUdgWcNSEt2P2qD