Budibase/budibase · error · HTTPError

LiteLLM requires a database connection. Set DATABASE_URL on

Error message

LiteLLM requires a database connection. Set DATABASE_URL on LiteLLM when store_model_in_db is enabled.

What it means

Error "LiteLLM requires a database connection. Set DATABASE_URL on LiteLLM when store_model_in_db is enabled." thrown in Budibase/budibase.

Source

Thrown at packages/server/src/sdk/workspace/ai/configs/litellm.ts:345

    },
    body: JSON.stringify({
      litellm_params: {
        model: `${mappedProvider}/${name}`,
        custom_llm_provider: mappedProvider,
        ...credentialFields,
      },
    }),
  }

  const res = await fetch(
    `${liteLLMUrl}/health/test_connection`,
    requestOptions
  )

  if (res.status !== 200) {
    const text = await res.text()
    if (text.includes("DB not connected")) {
      throw new HTTPError(
        "LiteLLM requires a database connection. Set DATABASE_URL on LiteLLM when store_model_in_db is enabled.",
        400
      )
    }
    throw new HTTPError(text, 500)
  }

  const json = await res.json()
  if (json?.status !== "success") {
    const message = [
      "Error validating configuration",
      sanitizeLiteLLMErrorMessage(json.error?.message || json.result?.error),
    ]
      .filter(Boolean)
      .join(": ")

    throw new HTTPError(message, 400)
  }

View on GitHub (pinned to a81a902e9a)

When it happens

Trigger: Thrown at packages/server/src/sdk/workspace/ai/configs/litellm.ts:345 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29). Data as JSON: /api/errors/617c43dfeefee0ae. Report an issue: GitHub.