{"record":{"id":"ffa05487d8506415","repo":"BerriAI/litellm","slug":"wxo-agent-id-is-required-in-litellm-params-for-w","errorCode":null,"errorMessage":"'wxo_agent_id' is required in litellm_params for WXO agents","messagePattern":"'wxo_agent_id' is required in litellm_params for WXO agents","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/a2a_protocol/providers/watsonx_orchestrate/handler.py","lineNumber":201,"sourceCode":"                continue\n            chunk_text = WatsonxOrchestrateTransformation.extract_text_from_wxo_result(event)\n            if chunk_text:\n                accumulated_text += chunk_text\n        return accumulated_text\n\n    @staticmethod\n    def _extract_litellm_params(litellm_params: dict[str, Any]) -> WXORequestParams:\n        cp4d_host: Final = litellm_params.get(\"cp4d_host\") or \"\"\n        instance_id: Final = litellm_params.get(\"instance_id\") or \"\"\n        wxo_agent_id: Final = litellm_params.get(\"wxo_agent_id\") or \"\"\n        api_key: Final = litellm_params.get(\"api_key\") or \"\"\n\n        if not cp4d_host:\n            raise ValueError(\"'cp4d_host' is required in litellm_params for WXO agents\")\n        if not instance_id:\n            raise ValueError(\"'instance_id' is required in litellm_params for WXO agents\")\n        if not wxo_agent_id:\n            raise ValueError(\"'wxo_agent_id' is required in litellm_params for WXO agents\")\n        if not api_key:\n            raise ValueError(\"'api_key' is required in litellm_params for WXO agents\")\n\n        return WXORequestParams(\n            cp4d_host=cp4d_host,\n            instance_id=instance_id,\n            wxo_agent_id=wxo_agent_id,\n            api_key=api_key,\n            username=litellm_params.get(\"username\") or None,\n            auth_mode=litellm_params.get(\"auth_mode\") or \"cp4d\",\n            thread_id=litellm_params.get(\"thread_id\") or None,\n        )\n\n    @staticmethod\n    async def handle_non_streaming(\n        request_id: str,\n        params: dict[str, Any],\n        litellm_params: dict[str, Any],","sourceCodeStart":183,"sourceCodeEnd":219,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/a2a_protocol/providers/watsonx_orchestrate/handler.py#L183-L219","documentation":"Watsonx Orchestrate exposes each deployed agent under its own agent id, used in the /v1/agents/{wxo_agent_id}/runs endpoint. _extract_litellm_params() treats wxo_agent_id as mandatory and raises this ValueError when it is absent or empty, before any request is built. Without it LiteLLM cannot address any specific agent.","triggerScenarios":"A watsonx_orchestrate deployment missing wxo_agent_id; passing the agent display name instead of the agent id; env-var-backed value unset; empty string after templating.","commonSituations":"Grabbing the human-readable agent name from the WXO console instead of the technical agent id; config generated from IaC where the agent id field is optional; re-creating an agent in WXO gets a new id while the proxy config keeps the old (that yields 404-style run errors, but a deleted/blank field yields this one).","solutions":["Copy the agent id from Watsonx Orchestrate (the identifier in the agent's API details) into wxo_agent_id","Confirm it is the agent id, not the agent name or skill name","Ensure the key is spelled wxo_agent_id and lives inside litellm_params","Restart the proxy after updating config.yaml"],"exampleFix":"# before\nlitellm_params:\n  model: watsonx_orchestrate/my-agent\n  cp4d_host: https://cp4d.example.com\n  instance_id: 6c9b...\n  api_key: os.environ/WXO_API_KEY\n\n# after\nlitellm_params:\n  model: watsonx_orchestrate/my-agent\n  cp4d_host: https://cp4d.example.com\n  instance_id: 6c9b...\n  wxo_agent_id: my-agent-id    # technical id from WXO, not display name\n  api_key: os.environ/WXO_API_KEY\n","handlingStrategy":"validation","validationCode":"def validate_wxo_agent(litellm_params: dict) -> None:\n    if not litellm_params.get(\"wxo_agent_id\"):\n        raise ValueError(\"watsonx_orchestrate deployment requires the technical wxo_agent_id\")\n","typeGuard":null,"tryCatchPattern":"try:\n    result = await WatsonxOrchestrateHandler.handle_request(params)\nexcept ValueError as e:\n    if \"'wxo_agent_id' is required\" in str(e):\n        raise HTTPException(500, \"WXO deployment missing wxo_agent_id\") from e\n    raise\n","preventionTips":["Copy the agent id from the WXO API details page, never the display name","When an agent is redeployed with a new id, update the proxy config the same change","List agents via the WXO API in a pre-deploy check to confirm the id exists"],"tags":["watsonx-orchestrate","agent-id","configuration","required-param"],"backgroundTag":"missing-required-argument","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}