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 field | Options key | Required |
|---|---|---|
| Base URL | qevron_api-base-url | Yes |
| API Key | qevron_api-key | Yes |
| Status | qevron_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:
- Base URL: the public origin.
- API Key: the Bearer token.
- Status: Enable.
- Save → Test connection sends a minimal probe to
<Base URL>/v1/chat/completionsand 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
| Symptom | Cause | Fix |
|---|---|---|
Qevron not configured: ... | Admin + ENV missing | Set both Base URL and API Key. |
Test connection returns 401 | Wrong API token | Re-issue in Qevron, paste again. |
Test connection returns 404 | Base URL has a path or trailing slash | Use the bare origin. Sosyabot appends /v1/chat/completions. |
| Specific model fails but others work | Per-model API key invalid | Check 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 api.