AI_DIAGNOSE_ERROR error condition

SQLSTATE: 56000

Failed to diagnose the issue.

AVAILABILITY_CHECK_FAILED

AI_DIAGNOSE could not check model availability before invoking the LLM: <errorMessage>

CONCURRENT_TASKS_NOT_SUPPORTED

Multiple cluster_ids found in job run <runId>. AI_DIAGNOSE does not support concurrent task runs as logs are not isolated.

CONTEXT_WINDOW_EXCEEDED

Context window exceeded: estimated <estimatedTokens> tokens exceeds max allowed token of <thresholdTokens>.

ENDPOINT_NOT_CONFIGURED

AI_DIAGNOSE endpoint is not configured. Set spark.databricks.sql.aiDiagnose.endpointName or pass model_endpoint to the procedure.

HTTP_REQUEST_FAILED

The remote HTTP request failed: <errorMessage>

INTERNAL_ERROR

An internal error occurred: <errorMessage>

INVALID_ARGUMENT

Invalid argument(s) to AI_DIAGNOSE: <errorMessage>

INVALID_RUN_ID

invalid run ID <runId>: unable to resolve the associated cluster. Please verify that the run ID is correct and that you have permission to view it.

LLM_AUTH_FAILED

LLM endpoint <endpointName> rejected the request with HTTP <httpStatusCode>: <errorMessage>. Verify the calling identity has access to the endpoint.

LLM_ENDPOINT_NOT_FOUND

LLM endpoint <endpointName> was not found (HTTP <httpStatusCode>): <errorMessage>. The model may not be available in this workspace.

LLM_NETWORK_TIMEOUT

LLM endpoint <endpointName> request timed out: <errorMessage>. The endpoint may be slow or the prompt too large.

LLM_NETWORK_UNREACHABLE

Cannot reach LLM endpoint <endpointName>: <errorMessage>. Check workspace network configuration.

LLM_NOT_APPROVED

LLM endpoint <endpointName> is not approved for this workspace: <errorMessage>. Use a model approved for this workspace's admin.

LLM_RATE_LIMITED

LLM endpoint <endpointName> rate-limited the request (HTTP <httpStatusCode>): <errorMessage>. Retry later.

LLM_SERVER_ERROR

LLM endpoint <endpointName> returned a server error (HTTP <httpStatusCode>): <errorMessage>.

MALFORMED_RESPONSE

The LLM endpoint returned a malformed response: <errorMessage>

MISSING_EVENT_LOGS

Spark event logs are not available from log destination <logDestination>. AI_DIAGNOSE requires readable event logs to analyze Spark execution. Underlying error: <underlyingError>

MISSING_INPUT_PROMPT

The 'prompt' parameter is required. Pass prompt => '[description]' to AI_DIAGNOSE with a description of the issue, including the exact error message or stack trace from the job run.

NO_AVAILABLE_MODELS

None of the preferred models are available for this workspace. Preferred: <preferred>. Available: <available>.

SERVERLESS_NOT_SUPPORTED

Serverless compute was detected for job run <runId>. AI_DIAGNOSE does not support diagnosing serverless job runs.

TOOL_CALL_TIMEOUT

Tool timed out after <timeoutSeconds> seconds.

UNSUPPORTED_JOB_STATE

The job state is not supported: <errorMessage>