{"record":{"id":"91655a45fb885270","repo":"BerriAI/litellm","slug":"litellm-params-is-required-for-bedrockagentcorea2a","errorCode":null,"errorMessage":"litellm_params is required for BedrockAgentCoreA2AConfig (must contain model with AgentCore ARN)","messagePattern":"litellm_params is required for BedrockAgentCoreA2AConfig \\(must contain model with AgentCore ARN\\)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/a2a_protocol/providers/bedrock_agentcore/config.py","lineNumber":33,"sourceCode":"    \"\"\"\n    Provider configuration for Bedrock AgentCore A2A-native agents.\n\n    AgentCore agents that speak A2A natively expect the full JSON-RPC envelope.\n    This config bypasses the completion bridge and forwards requests directly,\n    deriving the endpoint URL from the model ARN and signing with SigV4/JWT.\n    \"\"\"\n\n    async def handle_non_streaming(\n        self,\n        request_id: str,\n        params: dict[str, Any],\n        api_base: str | None = None,\n        **kwargs,\n    ) -> dict[str, Any]:\n        \"\"\"Handle non-streaming request to AgentCore A2A agent.\"\"\"\n        litellm_params: Final = kwargs.get(\"litellm_params\")\n        if not litellm_params:\n            raise ValueError(\n                \"litellm_params is required for BedrockAgentCoreA2AConfig (must contain model with AgentCore ARN)\"\n            )\n        return await BedrockAgentCoreA2AHandler.handle_non_streaming(\n            request_id=request_id,\n            params=params,\n            litellm_params=litellm_params,\n            agent_extra_headers=kwargs.get(\"agent_extra_headers\"),\n        )\n\n    async def handle_streaming(\n        self,\n        request_id: str,\n        params: dict[str, Any],\n        api_base: str | None = None,\n        **kwargs,\n    ) -> AsyncIterator[dict[str, Any]]:\n        \"\"\"Handle streaming request to AgentCore A2A agent.\"\"\"\n        litellm_params: Final = kwargs.get(\"litellm_params\")","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/a2a_protocol/providers/bedrock_agentcore/config.py#L15-L51","documentation":"BedrockAgentCoreA2AConfig.handle_non_streaming raises ValueError when kwargs lacks `litellm_params`. The AgentCore handler derives the agent endpoint from the model string (AgentCore ARN) carried in litellm_params, so without it the request cannot be routed.","triggerScenarios":"Invoking the bedrock_agentcore A2A config handler directly (or via a bridge call path) without passing litellm_params in kwargs, e.g. handler.handle_non_streaming(request_id=..., params=..., api_base=None).","commonSituations":"Custom dispatch code that calls provider configs manually and forwards only some kwargs; a LiteLLM version mismatch where the caller stopped forwarding litellm_params.","solutions":["Pass litellm_params (a dict containing at least `model` set to the AgentCore agent ARN) in the kwargs","If calling through LiteLLM's normal completion/a2a path, ensure the model is configured with custom_llm_provider=bedrock and the AgentCore ARN so params propagate"],"exampleFix":"# before\nresp = await config.handle_non_streaming(request_id=rid, params=params)\n# after\nresp = await config.handle_non_streaming(\n    request_id=rid, params=params,\n    litellm_params={\"custom_llm_provider\": \"bedrock\", \"model\": \"arn:aws:bedrock-agentcore:...\"},\n)","handlingStrategy":"validation","validationCode":"lp = kwargs.get(\"litellm_params\")\nif not lp or not lp.get(\"model\"):\n    raise ValueError(\"bedrock_agentcore needs litellm_params.model = AgentCore ARN\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always forward litellm_params through **kwargs to provider configs","Keep ARN-shaped model values in deployment config for agentcore agents"],"tags":["a2a","litellm","bedrock-agentcore","validation","litellm-params"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}