Integrations
All integrations are optional. import beacon never imports a framework; each integration module imports its framework only when you use it.
| Framework | Install | Main API |
|---|---|---|
| OpenAI SDK | none (duck-typed) | validated_completion, avalidated_completion, validated_tool_call |
| LangChain | pip install "llm-beacon[langchain]" |
BeaconPromptTemplate, BeaconJsonOutputParser, BeaconCallbackHandler |
| LlamaIndex | pip install "llm-beacon[llamaindex]" |
BeaconOutputParser |
| Pydantic AI | optional | BeaconValidator |
| DSPy | pip install "llm-beacon[dspy]" |
BeaconJSONAdapter, BeaconValidateSchema |
Tested against openai 2.x, langchain-core 1.x, llama-index-core 0.14, pydantic-ai 2.x and dspy 3.x. Every integration has tests with fake clients (always run) and with the real library (run when it’s installed).
OpenAI SDKValidated completions, sync and async, plus tool calls.
LangChainPrompt template, output parser and callback handler.
LlamaIndexA strict output parser for query engines.
Pydantic AIOutput validation with precise ModelRetry feedback.
DSPyA strict JSON adapter and a schema-validating module.