The OPENAI_API_BASE environment variable only takes effect in the chat and model management, but does not take effect when text is vectorized. #130

Closed
opened 2026-02-21 17:26:06 -05:00 by yindo · 1 comment
Owner

Originally created by @wertycn on GitHub (Jun 2, 2023).

Dify version: Self Host

Steps To Reproduce

Configuring the OPENAI_API_BASE variable only takes effect on the chat API, while the embeddings API still makes requests to api.openai.com.

The current behavior

The expected behavior

When text is vectorized, the progress remains at 0. Upon checking the work logs, the following error is shown.

[2023-06-02 17:16:00,124: WARNING/MainProcess] Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f6bf9f2f880>, 'Connection to api.openai.com timed out. (connect timeout=600)')': /v1/engines/text-embedding-ada-002/embeddings

Originally created by @wertycn on GitHub (Jun 2, 2023). <!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest version of the relevant Dify packages to make sure your issue has not already been fixed. --> Dify version: Self Host ## Steps To Reproduce <!-- Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than Dify. Issues without reproduction steps or code examples may be immediately closed as not actionable. --> Configuring the OPENAI_API_BASE variable only takes effect on the chat API, while the embeddings API still makes requests to api.openai.com. ## The current behavior ## The expected behavior When text is vectorized, the progress remains at 0. Upon checking the work logs, the following error is shown. [2023-06-02 17:16:00,124: WARNING/MainProcess] Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f6bf9f2f880>, 'Connection to api.openai.com timed out. (connect timeout=600)')': /v1/engines/text-embedding-ada-002/embeddings
yindo closed this issue 2026-02-21 17:26:06 -05:00
Author
Owner

@wertycn commented on GitHub (Jun 2, 2023):

The issue has been resolved, and the OPENAI_API_BASE environment variable needs to be configured within the worker container as well.

@wertycn commented on GitHub (Jun 2, 2023): The issue has been resolved, and the OPENAI_API_BASE environment variable needs to be configured within the worker container as well.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#130