Repository navigation
fix(ai): prevent unsupported tool files from breaking Chat sessions - #52517
vladislav-miroshnikov wants to merge 1 commit into
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: |
|
hey @rekram1-node, I reproduced #52448 in the Chat request compiler with Parquet and CSV tool results. When an unsupported file is in chat history, every follow-up fails before reaching the API. This fix keeps the attachment in history and sends Chat an omission note instead, so the session can continue. I also checked the compiled Parquet request and a follow-up against openai api platform with gpt-5.4 and gpt-6.1-sol, both models handled them successfully. Could you take a look at this for v2, please? |
72cbdd3 to
511983b
Compare
|
Added replay coverage for Parquet, unnamed CSV and mixed PNG/PDF/CSV results. Unsupported Chat tool files now produce an omission note while preserving the stored history. |
511983b to
649a3c9
Compare
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Follow-up to #52448
Type of change
What does this PR do?
An unsupported file returned by a tool could make every later OpenAI Chat request fail when replaying the history.
The adapter now sends an omission note with the filename and MIME type. The file stays in the stored history. Tool text, images, PDFs, videos and user-media validation keep their existing handling.
#57640 filters new unsupported MCP attachments, but leaves existing history alone. Plugins can still return these files, so the replay fix is still needed.
How did you verify your code works?
Local checks on d0732ea:
The reporter's MCP server and new live-provider calls were not run.
Screenshots / recordings
Not applicable.
Checklist