ComposioHQ/composio · error · ValidationError
proxy_execute: parameters[{i}].type must be 'header' or 'que
Error message
proxy_execute: parameters[{i}].type must be 'header' or 'query', got {param_type!r} What it means
Guard ensuring each proxy_execute parameter's location/type is 'header' or 'query'. The type is read from the 'in' key (falling back to 'type', defaulting to 'header'), so explicit wrong values like 'path' or 'body' are rejected with the index and offending value.
Source
Thrown at python/composio/core/models/session_context.py:72
raise ValidationError("proxy_execute: toolkit is required")
if not endpoint:
raise ValidationError("proxy_execute: endpoint is required")
if method not in _VALID_METHODS:
raise ValidationError(
f"proxy_execute: method must be one of {sorted(_VALID_METHODS)}, got {method!r}"
)
# Transform and validate parameters
api_params: t.List[Parameter] = []
if parameters:
for i, p in enumerate(parameters):
if not isinstance(p, dict) or "name" not in p or "value" not in p:
raise ValidationError(
f"proxy_execute: parameters[{i}] must be a dict with 'name' and 'value' keys"
)
param_type = p.get("in", p.get("type", "header"))
if param_type not in _VALID_PARAM_TYPES:
raise ValidationError(
f"proxy_execute: parameters[{i}].type must be 'header' or 'query', "
f"got {param_type!r}"
)
api_params.append(
Parameter(
name=p["name"],
type=param_type, # type: ignore[typeddict-item]
value=str(p["value"]),
)
)
response = client.tool_router.session.proxy_execute(
session_id=session_id,
toolkit_slug=toolkit,
endpoint=endpoint,
method=method,
body=body if body is not None else omit,
parameters=api_params if api_params else omit,View on GitHub (pinned to 64b1b85502)
Solutions
- Set 'in' to 'header' or 'query' (or omit it — header is the default)
- Put path values directly in the endpoint string, not in parameters
Example fix
# before
parameters=[{'name': 'owner', 'value': 'acme', 'in': 'path'}]
# after
session.proxy_execute(toolkit='github', endpoint='/repos/acme/cli', parameters=[{'name': 'X-Extra', 'value': '1', 'in': 'header'}]) Defensive patterns
Strategy: validation
Validate before calling
for p in parameters or []:
assert p.get('in', 'header') in ('header','query') Type guard
def valid_param_types(params):
return all(p.get('in', p.get('type','header')) in ('header','query') for p in (params or [])) Prevention
- Put path values in the endpoint template
- Strip path/body params from OpenAPI lists
When it happens
Trigger: Passing a parameter with {'in': 'path'} or {'type': 'body'} — endpoints don't accept path/body params through this proxy parameters mechanism.
Common situations: Porting an OpenAPI parameter list verbatim, which includes path parameters that must instead go into the endpoint template.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- proxy_execute: parameters[{i}] must be a dict with 'name' an
- proxy_execute: toolkit is required
- proxy_execute: endpoint is required
- proxy_execute: method must be one of {sorted(_VALID_METHODS)
- Could not determine a home directory to store the Composio c
AI-assisted analysis of ComposioHQ/composio@64b1b85502 (2026-08-28).
Data as JSON: /api/errors/bf1cbac2dbdd34ab.
Report an issue: GitHub.