Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion crates/codex-plus-core/src/protocol_proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ async fn upstream_request_parts(
ImageHandling::Strip => {
for key in &["messages", "input"] {
if let Some(arr) = body.get_mut(key).and_then(Value::as_array_mut) {
crate::vision::strip_images_only(arr);
crate::vision::replace_images_with_path_placeholders(arr).await;
}
}
}
Expand All @@ -883,6 +883,14 @@ async fn upstream_request_parts(
.await;
}
}
} else {
// VLM 配置不完整:不要静默 send-as-is,否则 image_url 会被
// 直接发给纯文本模型。改为本地路径占位,交给读图 MCP 处理。
for key in &["messages", "input"] {
if let Some(arr) = body.get_mut(key).and_then(Value::as_array_mut) {
crate::vision::replace_images_with_path_placeholders(arr).await;
}
}
}
}
}
Expand Down
Loading