Skip to main content
CYBERTEC Migrator Documentation
Support
latest Latest stable release View changelog ->
CYBERTEC Migrator › Features › AI-Assistant

AI-Assistant

5 min read

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.

How it works

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

Important
The 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.

Configuration

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.

Configuration file

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.

SettingRequiredDescription
default.providernoName of the provider to use. Default: the first provider
default.modelnoid of the model to use. Default: the first model of the provider
timeoutMsnoMaximum time in milliseconds to wait for an answer. Default: CORE_LLM_TIMEOUT_MS (300000)
providers.<name>.baseUrlyesBase URL of the OpenAI-compatible API, usually ending with /v1
providers.<name>.apiKeynoAPI key of the provider
providers.<name>.apinoAPI of the provider. Only openai-completions (chat completions) is supported
providers.<name>.authHeadernoSend the API key as Authorization: Bearer <apiKey> header. Default: true
providers.<name>.headersnoAdditional HTTP headers, e.g. for API gateways
providers.<name>.models[].idyesModel name sent to the server (model of the request)
providers.<name>.models[].namenoDisplay name shown in the code editor. Default: id
providers.<name>.models[].maxTokensnoMaximum number of tokens of an answer (max_tokens). Default: limit of the server
providers.<name>.models[].temperaturenoSampling temperature. Default: 0.2
providers.<name>.models[].extraBodynoAdditional, server specific request parameters merged into the request body
providers.<name>.models[].reasoning, input, contextWindownoDescriptive 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.

Selecting the configuration file

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.

Environment variables

VariableDescription
CORE_LLM_CONFIGPath of the configuration file (the startup parameter --llm-config takes precedence)
CORE_LLM_PROVIDERProvider of the configuration file to use (overrides default.provider)
CORE_LLM_MODELModel to use (overrides default.model); required without a configuration file
CORE_LLM_API_KEYAPI key; overrides the API key of the selected provider
CORE_LLM_BASE_URLBase URL of the LLM server, used only if no configuration file is given
CORE_LLM_TIMEOUT_MSMaximum 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 models

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.

Troubleshooting

Problems are shown in the sidebar of the code editor and logged by the core.

CodeMessageSolution
MIG-7000The AI-Assistant is not configuredConfigure an LLM server as described above
MIG-7001The LLM server can not be reachedCheck 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-7002The API key is unauthorizedCheck the API key and authHeader
MIG-7003The LLM server could not process the requestThe 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.