{"record":{"id":"dd06ec7b48260517","repo":"BerriAI/litellm","slug":"litellm-params-is-required-for-langflowa2aconfig","errorCode":null,"errorMessage":"litellm_params is required for LangFlowA2AConfig (must contain custom_llm_provider and model)","messagePattern":"litellm_params is required for LangFlowA2AConfig \\(must contain custom_llm_provider and model\\)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/a2a_protocol/providers/langflow/config.py","lineNumber":25,"sourceCode":")\nfrom litellm.a2a_protocol.providers.base import BaseA2AProviderConfig\nfrom litellm.llms.langflow.a2a import merge_a2a_session_into_litellm_params\n\n\nclass LangFlowA2AConfig(BaseA2AProviderConfig):\n    \"\"\"A2A bridge for LangFlow: scopes contextId to the authenticated key as the\n    LangFlow session_id, then uses completion.\"\"\"\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        litellm_params = kwargs.get(\"litellm_params\")\n        if not litellm_params:\n            raise ValueError(\n                \"litellm_params is required for LangFlowA2AConfig (must contain custom_llm_provider and model)\"\n            )\n        litellm_params = merge_a2a_session_into_litellm_params(\n            litellm_params, params, litellm_params.get(A2A_USER_API_KEY_HASH_PARAM)\n        )\n        return await A2ACompletionBridgeHandler.handle_non_streaming(\n            request_id=request_id,\n            params=params,\n            litellm_params=litellm_params,\n            api_base=api_base,\n            _skip_a2a_provider_routing=True,\n        )\n\n    async def handle_streaming(\n        self,\n        request_id: str,\n        params: dict[str, Any],\n        api_base: str | None = None,","sourceCodeStart":7,"sourceCodeEnd":43,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/a2a_protocol/providers/langflow/config.py#L7-L43","documentation":"LangFlowA2AConfig.handle_non_streaming raises ValueError when kwargs lacks `litellm_params`. LangFlow routing needs custom_llm_provider and model from litellm_params, and also uses them to bind the LangFlow session (contextId) to the caller's API key hash.","triggerScenarios":"Direct invocation of the LangFlow A2A config handler without litellm_params in kwargs.","commonSituations":"Manual provider-handler dispatch in tests or custom routers; a gateway path that fails to forward litellm_params.","solutions":["Pass litellm_params containing custom_llm_provider ('langflow') and model","Use LiteLLM's standard a2a bridge entry points so params are populated automatically"],"exampleFix":"# before\nresp = await config.handle_non_streaming(request_id=rid, params=params)\n# after\nresp = await config.handle_non_streaming(request_id=rid, params=params, litellm_params={\"custom_llm_provider\": \"langflow\", \"model\": \"agent\"})","handlingStrategy":"validation","validationCode":"lp = kwargs.get(\"litellm_params\")\nif not lp or not lp.get(\"custom_llm_provider\") or not lp.get(\"model\"):\n    raise ValueError(\"langflow bridge needs custom_llm_provider and model\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pass complete litellm_params to LangFlow config handlers","Prefer the documented completion-bridge entry point over direct handler calls"],"tags":["a2a","litellm","langflow","validation","litellm-params"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}