Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/FloxTBoTyy/BoardPulse-AI/llms.txt

Use this file to discover all available pages before exploring further.

BoardPulse AI supports three model provider modes: cloud for OpenAI-compatible APIs, local for Ollama running on your own hardware, and mock for deterministic test responses that require no API key. You can set a default provider in .env and override it per request — a useful pattern when you want most queries to use a cheaper local model but need cloud quality for specific tasks.

Provider modes at a glance

ModeRequiresBest for
mockNothingLocal development, CI, schema validation
cloudOpenAI API key (or compatible)Production, highest accuracy
localOllama running and reachableAir-gapped deployments, cost control

How routing works

The ModelRouter resolves the backend for each request using this priority order:
  1. Explicit request override — if the request includes preferred_provider: "cloud", "local", or "mock", that takes precedence (subject to the provider being configured and available).
  2. hybrid shortcut — requests with preferred_provider: "hybrid" try Ollama first, then fall back to cloud if Ollama is not enabled.
  3. DEFAULT_MODEL_PROVIDER — if no per-request override is set and the default is not mock, the default is used.
  4. Auto-detect — if DEFAULT_MODEL_PROVIDER=mock and no override is given, the router checks whether Ollama is enabled or an OpenAI key is present and uses whichever is available.
  5. Mock fallback — if nothing is configured, responses fall back to mock automatically.
A preferred_provider of "local" only resolves to Ollama if OLLAMA_ENABLED=true. A preferred_provider of "cloud" only resolves to cloud if OPENAI_API_KEY is set. Otherwise the router falls through to the next option.

Configuration by provider

Mock mode returns deterministic, pre-built SQL responses without calling any AI model. It is the default out of the box and requires no credentials.
DEFAULT_MODEL_PROVIDER=mock
Mock responses always generate a SELECT * FROM <first_approved_table> LIMIT 10 query. Use mock mode to:
  • Verify your database connection and table allowlist are working
  • Run integration tests in CI without API costs
  • Explore the BoardPulse AI interface before choosing a real provider
Start every new deployment in mock mode. Once you’ve confirmed that queries return data from your source database, switch to cloud or local.

Switching providers at runtime

You can override the provider on a per-request basis using the preferred_provider field in the API request body. This lets you run most queries through a fast local model and escalate specific queries to cloud when needed — without changing .env or restarting the stack.
{
  "message": "What were total sales by region last quarter?",
  "preferred_provider": "cloud"
}
Valid values for preferred_provider: "mock", "cloud", "local", "hybrid".

Build docs developers (and LLMs) love