Skip to content

Tool/trigger discovery returns a bare 404 when Composio is not configured #5407

Description

@mmabrouk

What happens

On a self-hosted OSS deployment without COMPOSIO_API_KEY set, the platform tools discover_tools and discover_triggers return HTTP 404. list_schedules works.

Steps to reproduce

  1. Run OSS self-host without setting COMPOSIO_API_KEY.
  2. From an agent, call discover_tools or discover_triggers.
  3. Both return 404.

Why it happens

discover_tools and discover_triggers route through the Composio adapter, which is only built when COMPOSIO_API_KEY is set (api/entrypoints/routers.py). Without a key, the provider is missing and the service raises ProviderNotFoundError, which the router maps to 404 (api/oss/src/core/tools/service.py, api/oss/src/apis/fastapi/tools/router.py). list_schedules reads from the database and never touches the adapter, so it works.

The problem

A bare 404 reads as "endpoint missing," not "provider not configured." A self-hoster cannot tell whether they hit a bug or a missing setup step.

Suggested fix

Return a clearer status for the not-configured case, for example 501 or 503 with a body like Composio not configured; set COMPOSIO_API_KEY. This is distinct from a genuine not-found.

Context

Documented the expectation for self-hosters in #5406 (new "App tools and triggers" page). This issue tracks the API-side status-code improvement.

Metadata

Metadata

Assignees

Labels

BackendBug ReportSomething isn't workingdev experienceImprovement of the experience using the software. For instance better error messaginggood first issueGood for newcomers

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions