The AI-Assistant (Enterprise Edition) helps with the migration of procedural code. In the code editor of functions, procedures, triggers and views
- Explain describes what the code does and which Oracle specifics have to be considered in PostgreSQL
- Translate proposes a PostgreSQL version of the code, which may be applied to the editor with Apply
Answers of a large language model may be wrong. Always review and test translated code before migrating it.
The AI-Assistant also generates assessment insights: at the assessment depth expert, an executive summary, key risks, a migration strategy, quick wins and open questions are derived from the automated assessment (see Migration Assessment). Only the aggregated assessment result (score, findings, affected object names) is sent to the LLM for the insights, no source code.
The Migrator core sends the code of the database object to a large language model (LLM) and shows the answer in the sidebar of the code editor.
Any server implementing the OpenAI chat completions API (POST <baseUrl>/chat/completions) can be used, for example
- self-hosted: vLLM, Ollama, llama.cpp server, LiteLLM
- hosted: OpenAI or any other OpenAI-compatible provider
ImportantThe code of the selected database object is sent to the configured LLM server. Use a self-hosted server if the code must not leave your infrastructure. Before the first use, each user has to confirm that code is sent to the LLM.
The requests are sent by the core container, so the LLM server has to be reachable from there.
Every exchange with the LLM server is recorded in the internal database (table llm_http_log, deleted together with the migration). The API key is never recorded.
The AI-Assistant is disabled unless an LLM server is configured, either with a configuration file or with environment variables. On startup the core validates the configuration and logs the model in use:
NOTICE llm/init the AI-Assistant uses model 'qwen3.8-27b' of provider 'h200' at 'https://llm.example.com/v1' (/config/llm.yaml)
An invalid configuration (e.g. a missing file or an unknown model) stops the core with an error message describing the problem.
The configuration file is written in YAML (JSON works as well). It lists one or more providers with their models; the Migrator uses one model at a time.
# Optional: provider and model to use (default: the first provider and its first model)
default:
provider: h200
model: qwen3.8-27b
# Optional: maximum time to wait for an answer in milliseconds
timeoutMs: 300000
providers:
h200:
baseUrl: https://llm.example.com/v1
apiKey: ${LLM_API_KEY}
api: openai-completions
authHeader: true
models:
- id: qwen3.8-27b
name: Qwen3.8 27B (H200)
reasoning: true
input: [text, image]
contextWindow: 262144
maxTokens: 32768
ollama:
baseUrl: http://ollama:11434/v1
api: openai-completions
authHeader: false
models:
- id: qwen2.5-coder:32b
A complete example is available in apps/backend/llm.example.yaml.
| Setting | Required | Description |
|---|---|---|
default.provider | no | Name of the provider to use. Default: the first provider |
default.model | no | id of the model to use. Default: the first model of the provider |
timeoutMs | no | Maximum time in milliseconds to wait for an answer. Default: CORE_LLM_TIMEOUT_MS (300000) |
providers.<name>.baseUrl | yes | Base URL of the OpenAI-compatible API, usually ending with /v1 |
providers.<name>.apiKey | no | API key of the provider |
providers.<name>.api | no | API of the provider. Only openai-completions (chat completions) is supported |
providers.<name>.authHeader | no | Send the API key as Authorization: Bearer <apiKey> header. Default: true |
providers.<name>.headers | no | Additional HTTP headers, e.g. for API gateways |
providers.<name>.models[].id | yes | Model name sent to the server (model of the request) |
providers.<name>.models[].name | no | Display name shown in the code editor. Default: id |
providers.<name>.models[].maxTokens | no | Maximum number of tokens of an answer (max_tokens). Default: limit of the server |
providers.<name>.models[].temperature | no | Sampling temperature. Default: 0.2 |
providers.<name>.models[].extraBody | no | Additional, server specific request parameters merged into the request body |
providers.<name>.models[].reasoning, input, contextWindow | no | Descriptive information about the model, not used by the Migrator |
Values may reference environment variables with ${NAME}, which keeps secrets out of the file.
The core refuses to start if a referenced environment variable is not set.
The configuration file is passed to the core with the startup parameter --llm-config or the environment variable CORE_LLM_CONFIG.
The startup parameter takes precedence. The file has to be a YAML or JSON file (.yaml, .yml or .json).
node index.js --llm-config /config/llm.yaml
With Docker or Podman, mount the file into the core container and pass the startup parameter as command, e.g. in a docker-compose.override.yml:
services:
core:
volumes:
- ./llm.yaml:/config/llm.yaml:ro
command: ['--llm-config', '/config/llm.yaml']
environment:
- LLM_API_KEY=${LLM_API_KEY}
Alternatively set CORE_LLM_CONFIG=/config/llm.yaml in the environment file of the installation.
| Variable | Description |
|---|---|
CORE_LLM_CONFIG | Path of the configuration file (the startup parameter --llm-config takes precedence) |
CORE_LLM_PROVIDER | Provider of the configuration file to use (overrides default.provider) |
CORE_LLM_MODEL | Model to use (overrides default.model); required without a configuration file |
CORE_LLM_API_KEY | API key; overrides the API key of the selected provider |
CORE_LLM_BASE_URL | Base URL of the LLM server, used only if no configuration file is given |
CORE_LLM_TIMEOUT_MS | Maximum time in milliseconds to wait for an answer. Default: 300000 |
A single model can be configured without a file:
CORE_LLM_BASE_URL=https://api.openai.com/v1
CORE_LLM_MODEL=gpt-5-mini
CORE_LLM_API_KEY=sk-...
Reasoning (“thinking”) models are supported. The reasoning is not shown, only the final answer.
Reasoning increases the response time; the request is aborted after timeoutMs.
If a server allows to disable the reasoning, this can be done with extraBody, e.g. for Qwen models served by vLLM:
models:
- id: qwen3.8-27b
extraBody:
chat_template_kwargs:
enable_thinking: false
If the answer is cut off, increase maxTokens so the model is able to finish its reasoning and the answer.
Problems are shown in the sidebar of the code editor and logged by the core.
| Code | Message | Solution |
|---|---|---|
MIG-7000 | The AI-Assistant is not configured | Configure an LLM server as described above |
MIG-7001 | The LLM server can not be reached | Check baseUrl and that the server is reachable from the core container (DNS, firewall, proxy). Also returned if the server does not answer within timeoutMs |
MIG-7002 | The API key is unauthorized | Check the API key and authHeader |
MIG-7003 | The LLM server could not process the request | The message of the server is shown, e.g. an unknown model or code exceeding the context window |
Requests that were in progress while the core restarted are reported as failed and can be started again with the retry button.