AI_DIAGNOSE_ERROR error condition
Failed to diagnose the issue.
AMBIGUOUS_LOG_DESTINATION
AI_DIAGNOSE could not determine which directory under log destination <logDestination> contains the Spark event logs: multiple candidate subdirectories were found and none directly contains a 'service=eventlog' directory. Please specify the exact logs destination path (the directory directly containing 'service=eventlog/').
AVAILABILITY_CHECK_FAILED
AI_DIAGNOSE could not check model availability before invoking the LLM: <errorMessage>
CLUSTER_LAUNCH_FAILED
Job run <runId> has a classic cluster configuration but the cluster never started (cluster was not assigned). This is typically caused by a permission error or quota issue during cluster creation.
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>.
PIPELINE_TASK_NOT_SUPPORTED
Job run <runId> contains a pipeline task (Spark Declarative Pipelines on Lakeflow/Lakeflow). AI_DIAGNOSE does not support diagnosing pipeline tasks as they do not use a standard Spark cluster.
SERVERLESS_NOT_SUPPORTED
Serverless compute was detected for job run <runId>. AI_DIAGNOSE does not support diagnosing serverless job runs.
SPARK_EVENTS_CONNECTION_FAILED
AI_DIAGNOSE failed to read Spark Query Events from the AI Diagnose service. Contact Databricks support if it persists. Details: <cause>
SPARK_EVENTS_CREDENTIALS_UNAVAILABLE
AI_DIAGNOSE could not acquire credentials to read Spark Query Events from the AI Diagnose service. Contact Databricks support if it persists.
SPARK_EVENTS_MISSING_WORKSPACE
AI_DIAGNOSE could not read Spark Query Events because the workspace id is missing or invalid. Contact Databricks support if it persists.
SPARK_EVENTS_OUT_OF_BOUND_PREDICATE
AI_DIAGNOSE cannot scan Spark Query Events: a predicate on column <column> is not pinned to the diagnosed job run (allowed: <allowed>, got: <got>).
SPARK_EVENTS_SERVICE_UNAVAILABLE
AI_DIAGNOSE could not read Spark Query Events because the AI Diagnose service URL is unavailable. Contact Databricks support if it persists.
SPARK_EVENTS_UNEXPECTED_WORKSPACE_SCOPE
AI_DIAGNOSE stopped reading Spark Query Events because the service returned an unexpected workspace scope. Contact Databricks support if it persists.
SQL_TASK_NOT_SUPPORTED
Job run <runId> contains a SQL task (SQL alert, SQL query, or SQL dashboard) that runs on a SQL warehouse. AI_DIAGNOSE requires a Spark cluster with log delivery and does not support SQL warehouse tasks.
TOOL_CALL_TIMEOUT
Tool timed out after <timeoutSeconds> seconds.
UNSUPPORTED_JOB_STATE
The job state is not supported: <errorMessage>