Candil.Backend.OpenAICompat (Candil v3.0.0)

Copy Markdown View Source

Candil.Backend implementation for OpenAI-compatible HTTP APIs.

Used by:

  • provider: :openai (api.openai.com)
  • provider: :anthropic (api.anthropic.com — note Anthropic uses a slightly different request body, but the OpenAI-compat SSE streaming format works for both via the messages array)
  • provider: :ollama (Ollama's /v1/chat/completions endpoint)
  • provider: :azure (Azure OpenAI Service)

Auth tokens and base URLs come from Candil.Config per provider. This module is auto-registered for those providers on first lookup.