Skip to content

What to Do When the SDK Still Requests the Official Endpoint? ​

When the SDK still requests the official endpoint, the Base URL parameter name may be incorrect, the SDK version may not support the parameter, an environment variable may be overriding the code configuration, or the client may be created without using the configuration you provided.

Quick Checks ​

  • The Python SDK uses base_url, while the Node.js SDK uses baseURL.
  • Check whether OPENAI_API_BASE, OPENAI_BASE_URL, or environment variables specific to the framework are also set.
  • Check whether there are multiple OpenAI clients and one of them does not have a Base URL configured.
  • Check whether the SDK version is too old.
  • Check whether the request domain in the logs is the official domain or the platform domain.

How to Fix It ​

Explicitly create a client and pass in the Base URL instead of relying on the global default configuration. After upgrading the SDK, test the minimal example again.