fix(proxy): improve URL building and remove redundant model mapping

- Add model parameter to request logs for better debugging
- Fix duplicate /v1/v1 in URL when both base_url and endpoint have version
- Extend ?beta=true parameter to /v1/chat/completions endpoint
- Remove model mapping from transform layer (now handled by model_mapper)
- Add DeepSeek max_tokens clamping (1-8192 range)
This commit is contained in:
Jason
2026-01-30 12:03:37 +08:00
parent 70a18c1141
commit 065d5db843
3 changed files with 67 additions and 122 deletions
+5 -1
View File
@@ -666,7 +666,11 @@ impl RequestForwarder {
// 输出请求信息日志
let tag = adapter.name();
log::info!("[{tag}] >>> 请求 URL: {url}");
let request_model = filtered_body
.get("model")
.and_then(|v| v.as_str())
.unwrap_or("<none>");
log::info!("[{tag}] >>> 请求 URL: {url} (model={request_model})");
if let Ok(body_str) = serde_json::to_string(&filtered_body) {
log::debug!(
"[{tag}] >>> 请求体内容 ({}字节): {}",