Skip to main content
The AI assistant and the LaTeX error assistant run in the web service (the workbench and error-assistant modules) of every Ayakaleaf Pro pod. What each setting does, user access and quotas are described in AI Integration; this page puts it into Kubernetes.

Configuration

1

ConfigMap

30-config.yaml (additions)
AI_ENABLED must be exactly "true". The assistant appears only when AI_ENABLED, AI_BASE_URL, AI_MODEL and AI_API_KEY are all set.
2

Secret

3

Apply, restart and check the gateway from every pod

Any HTTP status means the gateway is reachable; 000 means it is not.
The web_fetch tool fetches pages through the same proxy as External URL files, so the OVERLEAF_LINKED_URL_* settings also limit what the model may read.

Several replicas

Nothing extra. The token quota is counted in Redis, so a user’s usage is the same on every replica, and an admin’s reset applies everywhere.

Tested on Kubernetes

Against a mock of an OpenAI-compatible gateway, Tavily and the GitBook MCP endpoint (trusted through NODE_EXTRA_CA_CERTS from overleaf-certs), on Kubernetes 1.37, our end-to-end tests pass: for the AI assistant on three replicas behind HAProxy (31 cases), chats with tool calls and suggested edits, web and documentation search, reading web pages through linked-url-proxy limited by OVERLEAF_LINKED_URL_ALLOWED_RESOURCES, image and PDF attachments, consent, the token quota counted in Redis, AI turned off for a user and for the instance, and slow connections to the gateway; for the error assistant on one replica (15 cases), suggested fixes, consent, the shared token quota and AI turned off.
Last modified on November 2, 2026