What
Add an OpenAI-compatible adapter (adapters/openai.py) that implements the LLMAdapter interface.
Why
Many users have OpenAI API keys. This is the most requested missing adapter.
How
- Copy
adapters/anthropic_api.py as a starting template
- Implement
call() using the openai Python SDK
- Map
ChatCompletion response to LLMResponse
- Add lazy import in
adapters/__init__.py (same pattern as other adapters)
- Add tests using MockAdapter patterns (no real API calls)
- Add
openai to optional dependencies in pyproject.toml
Reference
adapters/base.py — the interface to implement
adapters/anthropic_api.py — closest reference implementation
tests/test_adapters.py — test patterns
What
Add an OpenAI-compatible adapter (
adapters/openai.py) that implements theLLMAdapterinterface.Why
Many users have OpenAI API keys. This is the most requested missing adapter.
How
adapters/anthropic_api.pyas a starting templatecall()using theopenaiPython SDKChatCompletionresponse toLLMResponseadapters/__init__.py(same pattern as other adapters)openaito optional dependencies inpyproject.tomlReference
adapters/base.py— the interface to implementadapters/anthropic_api.py— closest reference implementationtests/test_adapters.py— test patterns