mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-02 10:21:16 +08:00
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:
@@ -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}] >>> 请求体内容 ({}字节): {}",
|
||||
|
||||
Reference in New Issue
Block a user