Skip to content

Commit f63ea17

Browse files
authored
Update proxy.php
1 parent 7dad107 commit f63ea17

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

trunk/web/aiapi/proxy.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,18 @@ public function handleProxyRequest()
3636
}
3737

3838
// 解析JSON请求体(用于验证和日志)
39-
$requestData = json_decode($requestBody, true);
39+
$requestData = json_decode($requestBody);
4040
if (json_last_error() !== JSON_ERROR_NONE) {
4141
$this->sendError('无效的JSON请求体: ' . json_last_error_msg());
4242
return;
4343
}
44-
44+
// 强制修改模型
45+
// $requestData->model="Qwen/Qwen3-Coder-480B-A35B-Instruct:novita"; // huggingface free $0.1 per month
4546
// 构建转发请求头
4647
$headers = $this->buildForwardHeaders($contentType);
4748

4849
// 转发到千问API
49-
$response = $this->forwardToQwen($method, $headers, $requestBody);
50+
$response = $this->forwardToQwen($method, $headers, $requestBody); // json_encode($requestData) //如果强制修改模型替换requestBody
5051

5152
// 处理并返回响应
5253
$this->handleQwenResponse($response);

0 commit comments

Comments
 (0)