-
Notifications
You must be signed in to change notification settings - Fork 537
基于Higress访问大模型,无法传递apikey #1460
Replies: 2 comments · 7 replies
-
@lixiaoyin-221 进到容器里,执行 |
Beta Was this translation helpful? Give feedback.
All reactions
-
gateway.log没有任何报错信息,看了日志目录下其它日志,也没有报错信息。 当使用Postman访问时,gateway.log中可以看到访问日志: 而且当我切换模型时,报错信息会变为对应模型的报错信息,说明请求已经转发过去了,只不过没带header |
Beta Was this translation helpful? Give feedback.
All reactions
-
你在容器里执行一下 curl localhost:15000/logging?wasm=trace -X POST 然后再请求一下,看看有没有wasm相关的日志,没有的话,说明插件没有生效 |
Beta Was this translation helpful? Give feedback.
All reactions
-
另外看下配置目录下 wasmplugins 里的 ai-proxy-1.0.0.yaml,发一下yaml内容,注意 apiKey 脱敏 |
Beta Was this translation helpful? Give feedback.
All reactions
-
apiVersion: extensions.higress.io/v1alpha1
Trace日志也是有的: |
Beta Was this translation helpful? Give feedback.
All reactions
-
看日志是返回308了,你是用 HTTP 访问的吗?把域名配置那里的开启HTTPS强制跳转关一下呢? |
Beta Was this translation helpful? Give feedback.
All reactions
-
{ 如果关闭HTTPS强制跳转会提示:400 The plain HTTP request was sent to HTTPS port curl --location 'https://higress.xxx.com:8643/openai/v1/chat/completions' |
Beta Was this translation helpful? Give feedback.
All reactions
-
这是两个事情。一个你是用什么协议访问Higress,另一个是Higress使用什么协议转发请求到后端服务。建议你把 higress-system 命名空间下面的 McpBridge 和 Ingress 配置都贴一下。 |
Beta Was this translation helpful? Give feedback.
All reactions
-
你中间是不是走了什么代理呀,因为看日志你请求的url是higress.gkid.com:8643,但是看higress接受处理的地址是 172.17.0.3:8443,应该是你这个监听在8643端口的代理导致的 |
Beta Was this translation helpful? Give feedback.
-
使用docker: higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/all-in-one:latest 本地搭建 higress 环境
添加服务来源:DNS域名 | openai | api.openai.com | 443
添加路由:openai | 前缀匹配 | /openai | openai.dns
添加域名和证书
路由开启AI代理:
使用下面的请求进行访问
提示未提供apikey,我换了一些模型,同样提示未能从header中获取到token。
首先我理解apikey应该是由网关插件接管,不再通过请求发送,再者我在header中传也同样不起作用,请问是哪里的问题
Beta Was this translation helpful? Give feedback.
All reactions