{"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":"exception","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/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/a2a_protocol/providers/watsonx_orchestrate/handler.py#L183-L219","documentation":"Configuration validation error from the WXO handler: 'wxo_agent_id' is missing or empty in litellm_params. LiteLLM needs the specific watsonx Orchestrate agent id to route the request to that agent; without it the call cannot be addressed and fails fast with ValueError.","triggerScenarios":"WXO model config that omits 'wxo_agent_id' or passes an empty value. Fired only after cp4d_host, instance_id, and api_key-adjacent checks that precede it have passed (it runs third in the ordered checks).","commonSituations":"Using a WXO 'skill' id instead of the agent id; agent deleted or recreated in WXO and the config never updated; key misspelled as 'agent_id' instead of 'wxo_agent_id'.","solutions":["Add 'wxo_agent_id' to litellm_params with the exact agent id shown in the watsonx Orchestrate UI/API.","Confirm the agent still exists in the target WXO instance (deleted agents keep configs stale).","Check spelling: it must be 'wxo_agent_id', not 'agent_id' or 'skill_id'."],"exampleFix":"# before\nlitellm_params:\n  model: watsonx_orchestrate/agent\n  cp4d_host: https://cpd.example.com:443\n  instance_id: 1f2a3b4c-...\n\n# after\nlitellm_params:\n  model: watsonx_orchestrate/agent\n  cp4d_host: https://cpd.example.com:443\n  instance_id: 1f2a3b4c-...\n  wxo_agent_id: my-agent-id","handlingStrategy":"validation","validationCode":"def validate_wxo_config(litellm_params: dict) -> None:\n    missing = [k for k in (\"cp4d_host\", \"instance_id\", \"wxo_agent_id\", \"api_key\") if not litellm_params.get(k)]\n    if missing:\n        raise ConfigError(f\"WXO config missing: {missing}\")","typeGuard":"def has_valid_wxo_config(p: dict) -> bool:\n    return all(isinstance(p.get(k), str) and p[k].strip() for k in (\"cp4d_host\", \"instance_id\", \"wxo_agent_id\", \"api_key\"))","tryCatchPattern":null,"preventionTips":["Verify agent ids exist via the WXO API when deploying config.","Automate config regeneration from the WXO agent list instead of hand-editing ids.","Alert when an agent id disappears from the instance after WXO maintenance."],"tags":["watsonx-orchestrate","configuration","validation","agent-id"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}