-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] HUGGINGFACE_PROXY_URL 端点不正确 #5072
Comments
👀 @chai-mi Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. |
@chai-mi 你好! 我是Dosu,一个可以帮助你解决 bug,回答问题,还可以成为贡献者的机器人。我会在等待人类维护者时帮助你。 The issue you're encountering seems to be related to how the To resolve this, you might need to adjust the For example, if your proxy URL is Additionally, check if there are any configuration options in the framework that allow you to customize the endpoint path or if you can modify the proxy setup to handle the appended paths correctly. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
这个感觉不是 HF Proxy Url 的问题,是 CF 的规范和 HF 不一样。如果我另外一个 proxy_url 就单纯做 HF 的转发就可以的 |
This feeling is not a problem with HF Proxy Url, but because the specifications of CF are different from HF. If I use another proxy_url, I can simply forward HF. |
CF 也只是单纯的把 我看 @huggingface/inference SDK 对 endpointUrl 的处理是这样的 let url = (() => {
if (endpointUrl && isUrl(model)) {
throw new TypeError("Both model and endpointUrl cannot be URLs");
}
if (isUrl(model)) {
console.warn("Using a model URL is deprecated, please use the `endpointUrl` parameter instead");
return model;
}
if (endpointUrl) {
return endpointUrl;
}
if (task) {
return `${HF_INFERENCE_API_BASE_URL}/pipeline/${task}/${model}`;
}
return `${HF_INFERENCE_API_BASE_URL}/models/${model}`;
})();
if (chatCompletion && !url.endsWith("/chat/completions")) {
url += "/v1/chat/completions";
} |
✅ @chai-mi This issue is closed, If you have any questions, you can comment and reply. |
📦 部署环境
Vercel
📌 软件版本
1.36.33
💻 系统环境
Windows
🌐 浏览器
Chrome
🐛 问题描述
HUGGINGFACE_PROXY_URL 设置后无法访问模型
HUGGINGFACE API 端点为以下形式
https://api-inference.huggingface.co/models/Qwen/QwQ-32B-Preview/v1/chat/completions
设置例如
HUGGINGFACE_PROXY_URL=https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/huggingface
后访问的端点变为https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/huggingface/v1/chat/completions
,无法正确访问模型返回错误信息:
📷 复现步骤
No response
🚦 期望结果
No response
📝 补充信息
No response
The text was updated successfully, but these errors were encountered: