SSL Certificate Verify Failed for Self-Deployed OpenAI-Compatible Model After Upgrade from 1.7.1 to 1.10.0 #21003

Closed
opened 2026-02-21 20:10:13 -05:00 by yindo · 2 comments
Owner

Originally created by @Zedthm on GitHub (Dec 12, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.7.1+1.10.0

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

Describe the bug

When upgrading Dify from 1.7.1 to 1.10.0, a self-deployed embedding model (fully compatible with OpenAI API format) that worked stably in 1.7.1 now triggers an SSL certificate verification failure. No changes were made to the model server configuration or network environment during the upgrade.

Error Log

[models] Server Unavailable Error, HTTPSConnectionPool(host='xxxxx.xxxx.xxx.com', port=443): Max retries exceeded with url: /ai-platform-models-agent/v1/embeddings (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)')))

Steps to Reproduce

  1. Deploy Dify 1.7.1 and configure a self-hosted OpenAI-compatible embedding model with HTTPS endpoint.
  2. Confirm the model works normally (can generate embeddings without errors).
  3. Upgrade Dify to 1.10.0, keep all model settings unchanged.
  4. Trigger embedding tasks → the SSL verification error occurs immediately.

✔️ Expected Behavior

The same model configuration should work consistently across versions without SSL-related errors.

Actual Behavior

  • The embedding model API call fails immediately with an SSL certificate verification error (detailed log below)
  • The error persists even after re-saving the model configuration in Dify 1.10.0
  • Rolling back to Dify 1.7.1 (with identical model/network settings) makes the model work normally again
  • No other functions of Dify 1.10.0 are affected except calls to this self-deployed model
Originally created by @Zedthm on GitHub (Dec 12, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.7.1+1.10.0 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce ## Describe the bug When upgrading Dify from **1.7.1** to **1.10.0**, a self-deployed embedding model (fully compatible with OpenAI API format) that worked stably in 1.7.1 now triggers an SSL certificate verification failure. No changes were made to the model server configuration or network environment during the upgrade. ## Error Log [models] Server Unavailable Error, HTTPSConnectionPool(host='[xxxxx.xxxx.xxx.com](https://xxxxx.xxxx.xxx.com/)', port=443): Max retries exceeded with url: /ai-platform-models-agent/v1/embeddings (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) ## Steps to Reproduce 1. Deploy Dify 1.7.1 and configure a self-hosted OpenAI-compatible embedding model with HTTPS endpoint. 2. Confirm the model works normally (can generate embeddings without errors). 3. Upgrade Dify to 1.10.0, **keep all model settings unchanged**. 4. Trigger embedding tasks → the SSL verification error occurs immediately. ### ✔️ Expected Behavior The same model configuration should work consistently across versions without SSL-related errors. ### ❌ Actual Behavior - The embedding model API call fails immediately with an SSL certificate verification error (detailed log below) - The error persists even after re-saving the model configuration in Dify 1.10.0 - Rolling back to Dify 1.7.1 (with identical model/network settings) makes the model work normally again - No other functions of Dify 1.10.0 are affected except calls to this self-deployed model
yindo added the 🐞 bugwont-fix labels 2026-02-21 20:10:13 -05:00
yindo closed this issue 2026-02-21 20:10:13 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 12, 2025):

Dify 1.10.0 enforces SSL certificate verification by default for outbound HTTPS requests, which causes failures with self-signed or untrusted certificates—even if your configuration or model server hasn't changed. This is controlled by the HTTP_REQUEST_NODE_SSL_VERIFY config flag, which now defaults to True. There is a known issue in 1.10.0 where disabling SSL verification via the UI or config doesn't always work due to a backend bug, especially in Docker/self-hosted setups.

To work around this, edit api/core/helper/ssrf_proxy.py so that the verify parameter in the httpx client is set according to the HTTP_REQUEST_NODE_SSL_VERIFY variable. Then rebuild and restart your API container. Example code change:

def _create_proxy_mounts() -> dict[str, httpx.HTTPTransport]:
    return {
        "http://": httpx.HTTPTransport(
            proxy=dify_config.SSRF_PROXY_HTTP_URL,
            verify=dify_config.HTTP_REQUEST_NODE_SSL_VERIFY,
        ),
        "https://": httpx.HTTPTransport(
            proxy=dify_config.SSRF_PROXY_HTTPS_URL,
            verify=dify_config.HTTP_REQUEST_NODE_SSL_VERIFY,
        ),
    }

This workaround has been confirmed to resolve the issue for others. Disabling SSL verification is only recommended in trusted environments; for production, it's safer to mount your CA bundle and update the CA store inside the container. More details and discussion can be found here. If you need help updating the CA store or if this doesn't resolve your issue, let me know!

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Dec 12, 2025): <!-- Answer --> Dify 1.10.0 enforces SSL certificate verification by default for outbound HTTPS requests, which causes failures with self-signed or untrusted certificates—even if your configuration or model server hasn't changed. This is controlled by the HTTP_REQUEST_NODE_SSL_VERIFY config flag, which now defaults to True. There is a known issue in 1.10.0 where disabling SSL verification via the UI or config doesn't always work due to a backend bug, especially in Docker/self-hosted setups. To work around this, edit api/core/helper/ssrf_proxy.py so that the verify parameter in the httpx client is set according to the HTTP_REQUEST_NODE_SSL_VERIFY variable. Then rebuild and restart your API container. Example code change: ```python def _create_proxy_mounts() -> dict[str, httpx.HTTPTransport]: return { "http://": httpx.HTTPTransport( proxy=dify_config.SSRF_PROXY_HTTP_URL, verify=dify_config.HTTP_REQUEST_NODE_SSL_VERIFY, ), "https://": httpx.HTTPTransport( proxy=dify_config.SSRF_PROXY_HTTPS_URL, verify=dify_config.HTTP_REQUEST_NODE_SSL_VERIFY, ), } ``` This workaround has been confirmed to resolve the issue for others. Disabling SSL verification is only recommended in trusted environments; for production, it's safer to mount your CA bundle and update the CA store inside the container. More details and discussion can be found [here](https://github.com/langgenius/dify/issues/28332). If you need help updating the CA store or if this doesn't resolve your issue, let me know! <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/d92c85a4-cfcc-4bb5-a971-1e05224ac701?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/d92c85a4-cfcc-4bb5-a971-1e05224ac701?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/d92c85a4-cfcc-4bb5-a971-1e05224ac701?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/d92c85a4-cfcc-4bb5-a971-1e05224ac701?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d92c85a4-cfcc-4bb5-a971-1e05224ac701?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/d92c85a4-cfcc-4bb5-a971-1e05224ac701?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d92c85a4-cfcc-4bb5-a971-1e05224ac701?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Dify%201.10.0%20enforces%20SSL%20certificate%20verification%20by%20default%20for%20outbound%20HTTPS%20requests%2C%20which%20causes%20failures%20with%20self-signed%20or%20untrusted%20certificates%E2%80%94even%20if%20your%20configuration%20or%20model%20server%20hasn%27t%20changed.%20This%20is%20controlled%20by%20the%20HTTP_REQUEST_NODE_SSL_VERIFY%20config%20flag%2C%20which%20now%20defaults%20to%20True.%20There%20is%20a%20known%20issue%20in%201.10.0%20where%20disabling%20SSL%20verification%20via%20the%20UI%20or%20config%20doesn%27t%20always%20work%20due%20to%20a%20backend%20bug%2C%20especially%20in%20Docker/self-hosted%20setups.%0A%0ATo%20work%20around%20this%2C%20edit%20api/core/helper/ssrf_proxy.py%20so%20that%20the%20verify%20parameter%20in%20the%20httpx%20client%20is%20set%20according%20to%20the%20HTTP_REQUEST_NODE_SSL_VERIFY%20variable.%20Then%20rebuild%20and%20restart%20your%20API%20container.%20Example%20code%20change%3A%0A%0A%60%60%60python%0Adef%20_create_proxy_mounts%28%29%20-%3E%20dict%5Bstr%2C%20httpx.HTTPTransport%5D%3A%0A%20%20%20%20return%20%7B%0A%20%20%20%20%20%20%20%20%22http%3A//%22%3A%20httpx.HTTPTransport%28%0A%20%20%20%20%20%20%20%20%20%20%20%20proxy%3Ddify_config.SSRF_PROXY_HTTP_URL%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20verify%3Ddify_config.HTTP_REQUEST_NODE_SSL_VERIFY%2C%0A%20%20%20%20%20%20%20%20%29%2C%0A%20%20%20%20%20%20%20%20%22https%3A//%22%3A%20httpx.HTTPTransport%28%0A%20%20%20%20%20%20%20%20%20%20%20%20proxy%3Ddify_config.SSRF_PROXY_HTTPS_URL%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20verify%3Ddify_config.HTTP_REQUEST_NODE_SSL_VERIFY%2C%0A%20%20%20%20%20%20%20%20%29%2C%0A%20%20%20%20%7D%0A%60%60%60%0A%0AThis%20workaround%20has%20been%20confirmed%20to%20resolve%20the%20issue%20for%20others.%20Disabling%20SSL%20verification%20is%20only%20recommended%20in%20trusted%20environments%3B%20for%20production%2C%20it%27s%20safer%20to%20mount%20your%20CA%20bundle%20and%20update%20the%20CA%20store%20inside%20the%20container.%20More%20details%20and%20discussion%20can%20be%20found%20%5Bhere%5D%28https%3A//github.com/langgenius/dify/issues/28332%29.%20If%20you%20need%20help%20updating%20the%20CA%20store%20or%20if%20this%20doesn%27t%20resolve%20your%20issue%2C%20let%20me%20know%21)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/29571)
Author
Owner

@crazywoola commented on GitHub (Dec 12, 2025):

We do not provide technical support for starting from the source. Thank you for your understanding. We assume you have the necessary expertise to set it up independently. If you require technical support, please obtain our business license by contacting us at business@dify.ai.

@crazywoola commented on GitHub (Dec 12, 2025): We do not provide technical support for starting from the source. Thank you for your understanding. We assume you have the necessary expertise to set it up independently. If you require technical support, please obtain our business license by contacting us at business@dify.ai.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#21003