Skip to content

[Bug]: Provider validation hardcodes api.openai.com, blocking onboarding for custom base_url deployments #2372

Description

@mjobrien05

Bug Description

Several places that validate the OpenAI provider hardcode https://api.openai.com, ignoring any configured custom base_url. This means a self-hosted OpenAI-compatible backend (vLLM, a NIM, a LiteLLM gateway, etc.) — which OpenRAG's own config already supports via a base_url field — can never pass onboarding's provider-health check, since that check always calls the real OpenAI domain regardless of what's configured.

Found in:

  • src/api/provider_validation.py — https://api.openai.com/v1/models and https://api.openai.com/v1/chat/completions, used by /onboarding's mandatory, non-skippable test_completion=True provider-health check.
  • src/services/models_service.py — https://api.openai.com/v1/models.
  • src/services/docling_service.py — https://api.openai.com/v1/chat/completions.

Since the onboarding health check is mandatory and non-skippable, this blocks the entire onboarding flow — not just a secondary feature — for any deployment pointing OpenRAG at a custom OpenAI-compatible endpoint.

Steps to Reproduce

  1. Configure OpenRAG with a custom OpenAI-compatible base_url (any self-hosted OpenAI-compatible chat/embeddings endpoint).
  2. Go through onboarding and reach the provider validation step.
  3. Observe the validation call target.

Expected Behavior

Provider validation (and the other call sites listed above) should validate against the configured base_url, falling back to https://api.openai.com only when no override is set.

Actual Behavior

All three call sites always target https://api.openai.com, so onboarding's mandatory provider-health check fails (or silently validates the wrong endpoint) for any custom base_url configuration, even though base_url is itself a supported, documented config field.

Relevant Logs

GET https://api.openai.com/v1/models  (ignoring configured base_url)

OpenRAG Version

Confirmed present against current main (all three call sites still hardcode the domain as of this issue).

Deployment Method

Docker

Affected Area

Onboarding (setup wizard, initial configuration), Settings (configuration, model providers)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions