{"record":{"id":"9d462890ce0bd897","repo":"BerriAI/litellm","slug":"litellm-params-is-required-for-watsonxorchestratea","errorCode":null,"errorMessage":"litellm_params is required for WatsonxOrchestrateA2AConfig (must contain cp4d_host, instance_id, wxo_agent_id, api_key)","messagePattern":"litellm_params is required for WatsonxOrchestrateA2AConfig \\(must contain cp4d_host, instance_id, wxo_agent_id, api_key\\)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/a2a_protocol/providers/watsonx_orchestrate/config.py","lineNumber":27,"sourceCode":"from litellm.a2a_protocol.providers.watsonx_orchestrate.handler import (\n    WatsonxOrchestrateHandler,\n)\n\n\nclass WatsonxOrchestrateA2AConfig(BaseA2AProviderConfig):\n    \"\"\"A2A bridge for IBM watsonx Orchestrate (REST runs API + poll/SSE).\"\"\"\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: Any,\n    ) -> dict[str, Any]:\n        \"\"\"Handle a non-streaming A2A request via WXO runs API.\"\"\"\n        litellm_params: Final = kwargs.get(\"litellm_params\")\n        if not litellm_params:\n            raise ValueError(\n                \"litellm_params is required for WatsonxOrchestrateA2AConfig \"\n                \"(must contain cp4d_host, instance_id, wxo_agent_id, api_key)\"\n            )\n        return await WatsonxOrchestrateHandler.handle_non_streaming(\n            request_id=request_id,\n            params=params,\n            litellm_params=litellm_params,\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: Any,\n    ) -> AsyncIterator[dict[str, Any]]:\n        \"\"\"Handle a streaming A2A request via WXO streaming runs API.\"\"\"\n        litellm_params: Final = kwargs.get(\"litellm_params\")","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/a2a_protocol/providers/watsonx_orchestrate/config.py#L9-L45","documentation":"WatsonxOrchestrateA2AConfig.handle_non_streaming raises ValueError when kwargs lacks `litellm_params`. The watsonx Orchestrate handler needs cp4d_host, instance_id, wxo_agent_id and api_key from litellm_params to build the runs API URL and authenticate.","triggerScenarios":"Calling the watsonx_orchestrate config handler without litellm_params in kwargs.","commonSituations":"Manual handler dispatch in tests/custom routers; watsonx deployment created without the required metadata fields so the params never get populated.","solutions":["Pass litellm_params containing cp4d_host, instance_id, wxo_agent_id and api_key","Configure the watsonx Orchestrate deployment in LiteLLM with all four fields so litellm_params is complete"],"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={\"cp4d_host\": \"https://cpd.example.com\", \"instance_id\": \"...\", \"wxo_agent_id\": \"...\", \"api_key\": \"...\"})","handlingStrategy":"validation","validationCode":"required = (\"cp4d_host\", \"instance_id\", \"wxo_agent_id\", \"api_key\")\nmissing = [k for k in required if not kwargs.get(\"litellm_params\", {}).get(k)]\nif missing:\n    raise ValueError(f\"watsonx orchestrate params missing: {missing}\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate watsonx deployment fields at config load time","Reference secrets by name via your secret manager, never inline api_key values in code"],"tags":["a2a","litellm","watsonx-orchestrate","validation","litellm-params"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}