-
Notifications
You must be signed in to change notification settings - Fork 615
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
Azure OpenAI api 端点设置 failover 配置的话健康检查会报 401,不开的话则正常访问 #1816
Comments
复现了,这个报错看上去是根本没带 token header ? azure openai 是需要带上一个 token 来请求的:
如果不带 token 去请求一个 azure openai api 地址就会报这个错误:
|
貌似不只是 azure openai ?我试了下其他供应商 model endpoint ,也是报 |
@Colstuwjx 我没复现出你这个问题。。我加下你微信,明天方便的话可以共享屏幕一起看一下 |
@cr7258 在打印 debug 日志后大概知道问题了,貌似 unavailable token 和 model provider host 不匹配导致的,我这边有配置两个 model provider,如 azure-openai-01, azure-openai-02 ,然后分别有 token-01, token-02 ,但是日志里发现 health check 使用的是 azure-openai-01 + token-02 的组合,这肯定就会报 401 了。 只通过 apitoken 来标识一个 model provider 是否不太完备,不同的 model provider,对应的 api host、api path、api token 可能都不一样。 |
@Colstuwjx ok,我晚点修复一下这个问题 |
补充下,如果只开一个 azure-openai-01 的 failover 的话,会出现时好时坏的情况,当返回 401 时情况是 failover 里的 apitoken 直接为空了:
|
If you are reporting any crash or any potential security issue, do not
open an issue in this repo. Please report the issue via ASRC(Alibaba Security Response Center) where the issue will be triaged appropriately.
Ⅰ. Issue Description
希望能通过 higress 实现 model 的 failover,但是当开启这个配置时,发送请求会直接报 401
Ⅱ. Describe what happened
当针对一个 azure openai 端点开启 healthcheck 配置时,返回 401 报错:
higress gateway 日志:
Ⅲ. Describe what you expected to happen
正常访问,或者当访问的这个 model endpoint 出现 ratelimit 429 等情况时置为不可用,higress 能够代理到其他可用 的 upstream 实例(当 ingress 配置了多个 upstream 时)
Ⅳ. How to reproduce it (as minimally and precisely as possible)
Ⅴ. Anything else we need to know?
Ⅵ. Environment:
The text was updated successfully, but these errors were encountered: