Dory Docs

AI Providers

Dory uses a pluggable AI provider architecture. You can switch providers through environment variables without changing application code.

Providers listed in the public repository

ProviderDORY_AI_PROVIDER valueNotes
OpenAIopenaiUses the official OpenAI API.
OpenAI-compatibleopenai-compatibleFor services exposing an OpenAI-compatible API.
AnthropicanthropicClaude models via Anthropic's API.
GooglegoogleGemini models via Google Generative AI.
QwenqwenQwen models through a compatible endpoint.
xAIxaiGrok models via xAI API.

Required variables

In practice you will usually need:

export DORY_AI_PROVIDER=openai
export DORY_AI_MODEL=gpt-4o-mini
export DORY_AI_API_KEY=your_api_key_here
export DORY_AI_URL=https://api.openai.com/v1

How to choose

  • Use OpenAI when you want the default documented path.
  • Use OpenAI-compatible when you already standardize on a compatible gateway or proxy.
  • Choose a provider based on model availability, latency, cost, and internal policy.

Limitation

Provider support does not guarantee identical output quality. SQL generation quality will vary by model, schema complexity, and prompt clarity.

On this page