Skip to content

Commit 183ef2d

Browse files
aldergclaude
andcommitted
Document enabling AI via DRAWIO_CONFIG (no DRAWIO_ENABLE_AI) [jgraph/drawio#5441]
enableAi and the other AI options are editor config keys, not standalone DRAWIO_* env vars, so they are set inside DRAWIO_CONFIG. Adds an example and links to the configure-ai-options doc. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 682dd1f commit 183ef2d

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ All container behaviour is controlled by environment variables, processed by [`m
7070
* **DRAWIO_CSP_HEADER**: Override the default Content-Security-Policy `<meta>` injected into the page. Defaults to a hard-coded policy in [`docker-entrypoint.sh`](main/docker-entrypoint.sh) — start from that policy when customising.
7171
* **ENABLE_DRAWIO_PROXY**: Set to `1` to enable the `/proxy` endpoint (ProxyServlet) which allows embedding images from external URLs; default disabled.
7272

73+
**Enabling AI diagram generation:** the AI options (`enableAi`, `gptApiKey`, `geminiApiKey`, `claudeApiKey`, `aiModels`, `aiConfigs`, ...) are editor configuration settings, not standalone environment variables — there is no `DRAWIO_ENABLE_AI`. Set them inside `DRAWIO_CONFIG`, for example:
74+
75+
```bash
76+
DRAWIO_CONFIG={"enableAi":true,"claudeApiKey":"sk-ant-...","aiModels":[{"name":"Claude 4.5 Sonnet","model":"claude-sonnet-4-5","config":"claude"}]}
77+
```
78+
79+
`enableAi` defaults to `true` only on app.diagrams.net, and the custom AI actions only appear once an API key and model are configured, so a self-hosted deployment needs both `enableAi: true` **and** a key. See [Customise LLM backends for diagram generation](https://www.drawio.com/doc/faq/configure-ai-options) for the full list of options.
80+
7381
### Export server integration
7482

7583
* **DRAWIO_SELF_CONTAINED**: Set to `1` to route export requests through Tomcat's `ExportProxyServlet` (`/service/0`) instead of calling the export server directly. Use this when the export server is only reachable inside the docker network.

0 commit comments

Comments
 (0)