fix(llm): upstream-test 改裸 /chat/completions,避开 join_target 剥 /v1 的副作用 (1.0.42)
1.0.41 join_target 在 base 自带路径段时剥掉客户端的 /v1,upstream-test 走 internal_redirect 固定拼 /v1/chat/completions,结果被剥成 …/v4/,智谱 SDK 抛 NPE 报 500 'model=null',管理台点测试时像 '模型不存在'。改为裸 /chat/completions 走 join_target,结果是 …/v4/chat/completions(智谱真端点),正常 200。
This commit is contained in:
1 parent
9e0a1e53b9
commit
2c66197d2c
1 file changed
+1
-1
@@ -204,7 +204,7 @@ fn h_admin_upstream_test(r: *mut ngx_http_request_t, _actor: Actor) -> Status {
|
||||
return http::fail(r, HTTPStatus::NOT_FOUND, &format!("上游 {slot} 不存在"));
|
||||
}
|
||||
|
||||
let uri = format!("/_upstream_test/{slot}/v1/chat/completions");
|
||||
let uri = format!("/_upstream_test/{slot}/chat/completions");
|
||||
util::log_notice(&format!("[api] 测试 LLM 上游 {slot}"));
|
||||
|
||||
// ⚠️ nginx 的 internal_redirect 只**浅拷贝 ngx_str_t 结构体**(data 指针 + len),
|
||||
|
||||
Reference in new issue
Block a user