core-agent-ide/codex-rs/protocol/src
zhao-oai 36113509f2
verify mime type of images (#5888)
solves: https://github.com/openai/codex/issues/5675

Block non-image uploads in the view_image workflow. We now confirm the
file’s MIME is image/* before building the data URL; otherwise we emit a
“unsupported MIME type” error to the model. This stops the agent from
sending application/json blobs that the Responses API rejects with 400s.

<img width="409" height="556" alt="Screenshot 2025-10-28 at 1 15 10 PM"
src="https://github.com/user-attachments/assets/a92199e8-2769-4b1d-8e33-92d9238c90fe"
/>
2025-10-28 14:52:51 -07:00
..
account.rs fix: move account struct to app-server-protocol and use camelCase (#5829) 2025-10-27 14:06:13 -07:00
approvals.rs Added model summary and risk assessment for commands that violate sandbox policy (#5536) 2025-10-24 15:23:44 -07:00
config_types.rs Generate JSON schema for app-server protocol (#5063) 2025-10-20 11:45:11 -07:00
conversation_id.rs Generate JSON schema for app-server protocol (#5063) 2025-10-20 11:45:11 -07:00
custom_prompts.rs Generate JSON schema for app-server protocol (#5063) 2025-10-20 11:45:11 -07:00
items.rs Add new thread items and rewire event parsing to use them (#5418) 2025-10-22 10:14:50 -07:00
lib.rs Added model summary and risk assessment for commands that violate sandbox policy (#5536) 2025-10-24 15:23:44 -07:00
message_history.rs Generate JSON schema for app-server protocol (#5063) 2025-10-20 11:45:11 -07:00
models.rs verify mime type of images (#5888) 2025-10-28 14:52:51 -07:00
num_format.rs Auto compact at ~90% (#5292) 2025-10-20 11:29:49 -07:00
parse_command.rs Generate JSON schema for app-server protocol (#5063) 2025-10-20 11:45:11 -07:00
plan_tool.rs Generate JSON schema for app-server protocol (#5063) 2025-10-20 11:45:11 -07:00
protocol.rs [MCP] Render MCP tool call result images to the model (#5600) 2025-10-27 17:55:57 -04:00
user_input.rs Add ItemStarted/ItemCompleted events for UserInputItem (#5306) 2025-10-20 13:34:44 -07:00