Code Migrator job fails or returns LLM error

A Code Migrator job in Cloudera Migration Assistant fails when it cannot use the large language model (LLM), when a request to the LLM is too large, or when the code does not build. Check the LLM settings first.

Symptoms

One or more of the following:

  • The Code Migrator item is not displayed in the navigation pane.
  • A job fails, and an error from the LLM endpoint is displayed in the job details, for example an authentication error, a model that is not found, or a rate limit error.
  • A job fails on a very large file after a long wait.
  • A job fails because the build or the validation fails.

Code Migrator item is missing

Code Migrator is deployed only when Enable LLM is on in the engine configuration of the Cloudera Migration Assistant engine.

Solution

Ask an Anywhere Cloud administrator to turn it on and to enter the LLM settings. See Configuring LLM connection.

LLM settings are wrong

Cloudera Migration Assistant cannot check the API key or the model name when you deploy, so a wrong value becomes visible only when a job runs. A wrong API key causes an authentication error. A wrong model name causes a model-not-found error. A wrong base URL causes a connection error.

Solution

  1. Ask an Anywhere Cloud administrator to check LLM Base URL, LLM API Key, and LLM Model Name in the engine configuration of the Cloudera Migration Assistant engine.
    The endpoint must be compatible with the OpenAI API.
  2. After the administrator saves the correct values, run the job again.

    See Canceling and retrying refactor jobs.

    If the deployment itself fails, see Engine fails to deploy: invalid configuration.

LLM rate limit is reached

The LLM provider returns a rate limit error. A single rate limit error can make a job fail. This is a known issue. For CMA-5181, see Known issues and limitations in Cloudera Migration Assistant 2.0.0.

Solution

Wait, and retry the job. Ask your LLM provider about the limits of your account.

Large file times out

A request for a very large source file can take longer than the time that the LLM endpoint or a gateway in front of it allows, or it can exceed a token rate limit. A retry sends the same request, so it fails in the same way.

Solution

  1. Split the source into smaller files.
  2. Create a new job.
    See Creating refactor jobs.

Build or validation fails

Code Migrator could not produce code that builds and passes validation.

Solution

  1. Open the job, and read the error of the last iteration.
  2. Add context that explains the error, for example, the dependency or the version, and create a new job.
    See Creating refactor jobs.