Compatibility issues with Cloudflare's AI Gateway #1454

Closed
opened 2026-02-21 17:33:51 -05:00 by yindo · 0 comments
Owner

Originally created by @zhangxudongsteven on GitHub (Mar 20, 2024).

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • Pleas do not modify this template :) and fill in all the required fields.

Dify version

0.5.10

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

try to set Cloudflare's AI Gateway as OpenAI proxy but failed.

cloudflare provide an openai proxy url in this format:
https://gateway.ai.cloudflare.com/v1/[id]/[gateway]/openai/chat/completions

i can set it by OpenAI-API-compatible as provider, but failed by setting OpenAI as provider directly.

✔️ Expected Behavior

expect the Cloudflare's AI Gateway to be set as an openai proxy.

Actual Behavior

proxy set failed.
20240320-152401

the log from Cloudflare shows Dify tried to visit /v1/chat/completion. however, it needs to use /chat/completion without /v1 as prefix.
screenshot-20240320-152946

Originally created by @zhangxudongsteven on GitHub (Mar 20, 2024). ### Self Checks - [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 (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] Pleas do not modify this template :) and fill in all the required fields. ### Dify version 0.5.10 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce try to set Cloudflare's AI Gateway as OpenAI proxy but failed. cloudflare provide an openai proxy url in this format: https://gateway.ai.cloudflare.com/v1/[id]/[gateway]/openai/chat/completions i can set it by `OpenAI-API-compatible` as provider, but failed by setting OpenAI as provider directly. ### ✔️ Expected Behavior expect the Cloudflare's AI Gateway to be set as an openai proxy. ### ❌ Actual Behavior proxy set failed. ![20240320-152401](https://github.com/langgenius/dify/assets/17109597/7df2067d-6fd3-40da-aba7-8b9bfa0497b1) the log from Cloudflare shows Dify tried to visit /v1/chat/completion. however, it needs to use /chat/completion without /v1 as prefix. ![screenshot-20240320-152946](https://github.com/langgenius/dify/assets/17109597/a6fd3261-2ffc-42b7-bb6c-4def46e450ee)
yindo added the 🐞 bug label 2026-02-21 17:33:51 -05:00
yindo closed this issue 2026-02-21 17:33:51 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#1454