Skip to content

Qevron AI Gateway Setup ​

Qevron is Sosyabot's default LLM gateway — every text-generation call (prompts, inline assist, AI agents) routes through it, then on to whichever upstream model the admin enables in AI Models. The admin form at /admin/api-integration/qevron is where you point Sosyabot at your Qevron deployment.

Overview ​

Form fieldOptions keyRequired
Base URLqevron_api-base-urlYes
API Keyqevron_api-keyYes
Statusqevron_integration_status—

ENV fallback: QEVRON_API_BASE_URL, QEVRON_API_KEY.

The full chat-completions URL Sosyabot calls is <Base URL>/v1/chat/completions — only the origin goes in Base URL; Sosyabot appends the path.

Step-by-step ​

1. Provision a Qevron deployment ​

Qevron is a self-hosted (or vendor-managed) OpenAI-compatible gateway. If you already run one, skip to step 2. Otherwise contact your Qevron operator for deployment URL and an API token.

2. Generate an API token ​

In your Qevron admin UI, issue a Bearer token scoped to chat completions. Copy the token — Qevron typically shows it once.

3. Confirm the public origin ​

The Base URL Sosyabot needs is the bare origin (no path, no trailing slash). Examples:

  • http://172.19.16.57:3001 (internal)
  • https://qevron.example.com (public)

Pasting into Sosyabot admin panel ​

/admin/api-integration/qevron:

  1. Base URL: the public origin.
  2. API Key: the Bearer token.
  3. Status: Enable.
  4. Save → Test connection sends a minimal probe to <Base URL>/v1/chat/completions and reports HTTP status.

Failure: Qevron not configured: set credentials from the admin panel (Integrations → Qevron) or via QEVRON_API_KEY env.

Per-model API key override ​

Each AI model registered in AI Models can carry its own API key (PUT /api/v1/ai-models/:id/api-key). When set, it overrides the global Qevron key for that specific model — useful when one model lives behind a different gateway or quota plan.

Verification ​

Test from /admin/data/ai-models → pick a text model → Test button. The test runs a one-shot prompt through Qevron and surfaces the response (or upstream error) inline.

You can also try inline AI from /app/ai-contents: select any model, click Generate, and confirm a response.

Troubleshooting ​

SymptomCauseFix
Qevron not configured: ...Admin + ENV missingSet both Base URL and API Key.
Test connection returns 401Wrong API tokenRe-issue in Qevron, paste again.
Test connection returns 404Base URL has a path or trailing slashUse the bare origin. Sosyabot appends /v1/chat/completions.
Specific model fails but others workPer-model API key invalidCheck the model's per-model key under AI Models; clear it to fall back to the global Qevron key.

ENV fallback ​

QEVRON_API_BASE_URL=https://qevron.example.com
QEVRON_API_KEY=<your bearer token>

After editing .env run ./service.sh restart.