{"record":{"id":"88c7c0b7caae2877","repo":"run-llama/llama_index","slug":"openinferencecallbackhandler-is-not-installed-ple","errorCode":null,"errorMessage":"OpenInferenceCallbackHandler is not installed. Please install it using `pip install llama-index-callbacks-openinference`","messagePattern":"OpenInferenceCallbackHandler is not installed\\. Please install it using `pip install llama-index-callbacks-openinference`","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"llama-index-core/llama_index/core/callbacks/global_handlers.py","lineNumber":38,"sourceCode":"    if eval_mode == \"wandb\":\n        try:\n            from llama_index.callbacks.wandb import (\n                WandbCallbackHandler,\n            )  # pants: no-infer-dep\n        except ImportError:\n            raise ImportError(\n                \"WandbCallbackHandler is not installed. \"\n                \"Please install it using `pip install llama-index-callbacks-wandb`\"\n            )\n\n        handler = WandbCallbackHandler(**eval_params)\n    elif eval_mode == \"openinference\":\n        try:\n            from llama_index.callbacks.openinference import (\n                OpenInferenceCallbackHandler,\n            )  # pants: no-infer-dep\n        except ImportError:\n            raise ImportError(\n                \"OpenInferenceCallbackHandler is not installed. \"\n                \"Please install it using `pip install llama-index-callbacks-openinference`\"\n            )\n\n        handler = OpenInferenceCallbackHandler(**eval_params)\n    elif eval_mode == \"arize_phoenix\":\n        try:\n            from llama_index.callbacks.arize_phoenix import (\n                arize_phoenix_callback_handler,\n            )  # pants: no-infer-dep\n        except ImportError:\n            raise ImportError(\n                \"ArizePhoenixCallbackHandler is not installed. \"\n                \"Please install it using `pip install llama-index-callbacks-arize-phoenix`\"\n            )\n\n        handler = arize_phoenix_callback_handler(**eval_params)\n    elif eval_mode == \"honeyhive\":","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/run-llama/llama_index/blob/afd0fef371831f9bda13e5af7167cf4e981278ab/llama-index-core/llama_index/core/callbacks/global_handlers.py#L20-L56","documentation":"Raised by create_global_handler() when eval_mode is 'openinference' but llama-index-callbacks-openinference is missing. The OpenInference handler (used to export LLM traces in OpenInference format for downstream analysis tools) is an optional extra, imported lazily inside a try/except that converts the raw ImportError into an actionable message.","triggerScenarios":"Calling create_global_handler('openinference', ...) or set_global_handler('openinference') without the package installed; the lazy import `from llama_index.callbacks.openinference import OpenInferenceCallbackHandler` fails and the except ImportError branch re-raises with this text.","commonSituations":"Enabling OpenInference tracing after copying example code that assumes the extra is present; minimal Docker images that only install llama-index-core; version drift after splitting integrations into separate wheels.","solutions":["pip install llama-index-callbacks-openinference","Confirm with: python -c \"from llama_index.callbacks.openinference import OpenInferenceCallbackHandler\"","Pin the package version alongside llama-index-core in your lockfile","Disable the openinference eval mode if tracing was not intended"],"exampleFix":"# before\nset_global_handler('openinference')  # ImportError\n\n# after\n# pip install llama-index-callbacks-openinference\nset_global_handler('openinference')","handlingStrategy":"validation","validationCode":"import importlib.util\nif importlib.util.find_spec('llama_index.callbacks.openinference') is None:\n    raise SystemExit('pip install llama-index-callbacks-openinference')","typeGuard":null,"tryCatchPattern":"try:\n    handler = create_global_handler('openinference')\nexcept ImportError as e:\n    handler = None  # tracing optional","preventionTips":["Add optional callback extras to the project lockfile when enabling them","Docker/CI images should install the same extras as local dev to catch missing wheels early"],"tags":["llama-index","callbacks","import-error","optional-dependency","openinference"],"backgroundTag":null,"analyzedSha":"afd0fef371831f9bda13e5af7167cf4e981278ab","analyzedAt":"2026-08-15T05:42:58.429Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}