Repository navigation
fix(relay): preserve Claude tool-result images in Chat conversion - #436
Merged
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Keep the reviewed two-file converter/test patch. Comparison from the PR base 3596c90 to main@38fd4a3 confirms neither file changed. Preserve current main in every other path, including prior frontend and authorization CI corrections.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Preserve images in Claude tool-result content when converting to Chat Completions. Text remains on the tool message; images are carried as user multimodal input rather than base64 text. Image-only results use
[image]so tool content is nonempty. Unknown block types preserve the historical whole-array JSON fallback.Media is accumulated at the source-message scope, keeping parallel replies contiguous: assistant -> tool -> tool -> user(media).
Upstream: QuantumNous/new-api#7512, merged as 4eb3b9160566dc4c1f4f0e9340de254f7febf056.
Regression coverage
String, text+image, image-only, URL image, multiple text blocks, unknown-block fallback, and parallel tool-result ordering. The change is confined to the Claude Messages -> Chat converter and its real relaykit tests.
Branch repair and verification
Verified head: 970a425.
Refreshed onto main@38fd4a3 with a normal merge commit. Comparison from the original PR base confirms neither changed file had moved on main. All other main files are retained; no force-push or disabled checks.
The actual Go/relaykit suites and independent service qualification passed on this exact head. Reviewed the converter patch and PR discussion. No production image/OAuth/billing acceptance is claimed.
Pricing, groups, model price lock, /fast, OAuth restrictions, quota/settlement, routing policy and admin assistant behavior are unchanged. No deployment or production data/configuration changes.