{"record":{"id":"56e8ecd870e66e90","repo":"ComposioHQ/composio","slug":"proxy-execute-parameters-i-must-be-a-dict-with","errorCode":null,"errorMessage":"proxy_execute: parameters[{i}] must be a dict with 'name' and 'value' keys","messagePattern":"proxy_execute: parameters\\[(.+?)\\] must be a dict with 'name' and 'value' keys","errorType":"validation","errorClass":"ValidationError","httpStatus":null,"severity":"error","filePath":"python/composio/core/models/session_context.py","lineNumber":67,"sourceCode":"    Projects the generated client's response model onto the SDK's own shape so\n    the public return type does not move when the client is regenerated.\n    \"\"\"\n    # Client-side validation (matches TS SessionProxyExecuteParamsSchema)\n    if not toolkit:\n        raise ValidationError(\"proxy_execute: toolkit is required\")\n    if not endpoint:\n        raise ValidationError(\"proxy_execute: endpoint is required\")\n    if method not in _VALID_METHODS:\n        raise ValidationError(\n            f\"proxy_execute: method must be one of {sorted(_VALID_METHODS)}, got {method!r}\"\n        )\n\n    # Transform and validate parameters\n    api_params: t.List[Parameter] = []\n    if parameters:\n        for i, p in enumerate(parameters):\n            if not isinstance(p, dict) or \"name\" not in p or \"value\" not in p:\n                raise ValidationError(\n                    f\"proxy_execute: parameters[{i}] must be a dict with 'name' and 'value' keys\"\n                )\n            param_type = p.get(\"in\", p.get(\"type\", \"header\"))\n            if param_type not in _VALID_PARAM_TYPES:\n                raise ValidationError(\n                    f\"proxy_execute: parameters[{i}].type must be 'header' or 'query', \"\n                    f\"got {param_type!r}\"\n                )\n            api_params.append(\n                Parameter(\n                    name=p[\"name\"],\n                    type=param_type,  # type: ignore[typeddict-item]\n                    value=str(p[\"value\"]),\n                )\n            )\n\n    response = client.tool_router.session.proxy_execute(\n        session_id=session_id,","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/ComposioHQ/composio/blob/64b1b85502b1beeb2379e6c9e8bf1104504fa637/python/composio/core/models/session_context.py#L49-L85","documentation":"Guard inside the parameter-transform loop of proxy_execute: each entry of the parameters list must be a dict containing both 'name' and 'value' keys before it is converted to the internal Parameter model. Malformed entries are rejected with their index for easy debugging.","triggerScenarios":"Passing parameters=[{'name': 'X-Token'}] (missing 'value'), parameters=['X-Token: abc'], or a list of objects/tuples instead of dicts.","commonSituations":"Converting from a headers dict or curl -H strings to the list-of-dicts shape the SDK expects.","solutions":["Pass parameters as [{'name': ..., 'value': ..., 'in': 'header'|'query'}]","Convert header dicts: [{'name': k, 'value': v} for k, v in headers.items()]"],"exampleFix":"# before\nsession.proxy_execute(..., parameters=[{'Authorization': 'Bearer x'}])\n\n# after\nsession.proxy_execute(..., parameters=[{'name': 'Authorization', 'value': 'Bearer x'}])","handlingStrategy":"validation","validationCode":"for i, p in enumerate(parameters or []):\n    assert isinstance(p, dict) and {'name','value'} <= p.keys(), f'bad param {i}'","typeGuard":"def valid_params(params):\n    return all(isinstance(p, dict) and 'name' in p and 'value' in p for p in (params or []))","tryCatchPattern":null,"preventionTips":["Convert header dicts with list comprehension","Never pass raw strings"],"tags":["python","session","validation","parameters"],"backgroundTag":"invalid-request-parameters","analyzedSha":"64b1b85502b1beeb2379e6c9e8bf1104504fa637","analyzedAt":"2026-08-28T15:39:33.623Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}