BerriAI/litellm · error · HTTPException

params must be an object

Error message

params must be an object

What it means

JSON-RPC tasks/* dispatch type check: the params member of the request is not an object, so it cannot be normalized into task operation parameters. Returned as a JSON-RPC-level 400 before the agent is called.

Source

Thrown at litellm/proxy/agent_endpoints/a2a_endpoints.py:877

                served_version=served_version,
            )
        elif method in {
            "tasks/get",
            "tasks/list",
            "tasks/cancel",
            "tasks/pushNotificationConfig/set",
            "tasks/pushNotificationConfig/get",
            "tasks/pushNotificationConfig/list",
            "tasks/pushNotificationConfig/delete",
            "agent/getAuthenticatedExtendedCard",
        }:
            if not agent_url:
                return _jsonrpc_error(request_id, -32000, f"Agent '{agent_id}' has no URL configured", 500)
            if isinstance(params, dict):
                params = normalize_request_params(params, served_version, method=method)
            if method == "tasks/pushNotificationConfig/set":
                if not isinstance(params, dict):
                    raise HTTPException(
                        status_code=400,
                        detail="params must be an object",
                    )
                push_config: Final = params.get("pushNotificationConfig", {})
                if "pushNotificationConfig" in params and not isinstance(push_config, dict):
                    raise HTTPException(
                        status_code=400,
                        detail="pushNotificationConfig must be an object",
                    )
                for callback_url in (params.get("url"), push_config.get("url")):
                    if not callback_url:
                        continue
                    if not isinstance(callback_url, str):
                        raise HTTPException(
                            status_code=400,
                            detail="Push notification URL must be a string",
                        )
                    _validate_push_notification_url(callback_url)

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Send params as a JSON object.

Example fix

params={...}
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at litellm/proxy/agent_endpoints/a2a_endpoints.py:877 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/37495896070a33c1. Report an issue: GitHub.