Adding a new LLM provider to ai-blackteam requires implementing the BaseProvider contract. One file, three methods.

Quick Start

Create src/ai-blackteam/providers/your_provider.py:

The Required Methods

default_model() -> str

Return the default model name. This is used when the user doesn’t specify -m.

send_prompt(prompt, system_prompt=None) -> PromptResult

Send a single prompt. Return a PromptResult with at minimum response, model, and provider. Token counts and latency are optional but helpful for cost tracking.

send_in_conversation(messages, system_prompt=None) -> PromptResult

Send a full conversation. The messages parameter is a list of dicts:

Adding Tool Support (Optional)

If your provider supports function calling, override send_with_tools() and supports_tools():

Register the Default Config

Add your provider’s default configuration to src/ai-blackteam/config.py:

Set the API Key

Users configure it with:
Or via environment variable YOUR_PROVIDER_API_KEY. The config loader automatically checks for {PROVIDER_NAME_UPPER}_API_KEY.

Full Skeleton

Testing

Checklist

  1. File in src/ai-blackteam/providers/
  2. Class extends BaseProvider
  3. Decorated with @register_provider("name")
  4. default_model() returns a string
  5. send_prompt() returns a PromptResult
  6. send_in_conversation() returns a PromptResult
  7. Default config added to config.py
  8. Test verifies basic functionality