niadra.integrations.litellm brings completion() and acompletion(), which are litellm.completion and litellm.acompletion with the context, and NiadraLogger, a LiteLLM CustomLogger that records the answer of every call made inside a conversation. Python only; it covers any provider LiteLLM routes.
Install
The five primitives
Minimal example
examples/litellm_completion.py.
Limits
- Outside a block,
completion()andacompletion()are LiteLLM’s own calls. NiadraLoggeronly records; for the pack to go in, usecompletion().- The
litellmextra pins versions incompatible withopenai-agents; install one per environment. - Tested against
litellm1.102 with the transport replaced and Niadra on the emulator.
Next steps
OpenAI and Azure OpenAI
the client
wrap(), with no router in between.Python SDK
the conversation,
mark_injected() and the provider’s usage.
