Skip to content
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

自定义 OpenAI 服务 URL不支持单独填写HOST #1784

Open
lgy1027 opened this issue Feb 20, 2025 · 1 comment
Open

自定义 OpenAI 服务 URL不支持单独填写HOST #1784

lgy1027 opened this issue Feb 20, 2025 · 1 comment

Comments

@lgy1027
Copy link

lgy1027 commented Feb 20, 2025

我现在部署的是2.0.7版本在添加自定义 OpenAI 服务,url必须填写host+path,无法支持单独填写host情况:

Image

Image

Gateway日志如下:


2025-02-20T02:10:58.640786Z     warning envoy wasm external/envoy/source/extensions/common/wasm/context.cc:1398 wasm log higress-system.ai-statistics-1.0.0: [ai-statistics] [c539b289-3db1-420a-a2b7-51bcada4f174] get usage information failed, skip metric record thread=37
{"ai_log":"{\"answer\":null,\"api\":\"-\",\"llm_service_duration\":4,\"question\":\"什么是爱情?输出500字情书\",\"response_type\":\"normal\"}","authority":"10.0.100.204:32046","bytes_received":"367","bytes_sent":"169","downstream_local_address":"10.233.70.212:80","downstream_remote_address":"10.0.100.204:32042","duration":"4","istio_policy_status":"-","method":"POST","path":"/v1/chat/completions","protocol":"HTTP/1.1","request_id":"c539b289-3db1-420a-a2b7-51bcada4f174","requested_server_name":"-","response_code":"301","response_flags":"-","route_name":"ai-route-one-api-router.internal","start_time":"2025-02-20T02:10:58.636Z","trace_id":"-","upstream_cluster":"outbound|443||llm-one-api.internal.dns","upstream_host":"112.29.111.158:443","upstream_local_address":"10.233.70.212:60232","upstream_service_time":"2","upstream_transport_failure_reason":"-","user_agent":"PostmanRuntime-ApipostRuntime/1.1.0","x_forwarded_for":"10.0.100.204","response_code_details":"via_upstream"}

填写host+path请求如下:

Image

Image

路由信息如下:

Image

@CH3CHO
Copy link
Collaborator

CH3CHO commented Feb 20, 2025

试试把自定义服务 URL 改成这样的格式:https://openai.xxx.com/v1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants