Repository navigation
Accept images in the local API for Claude and Codex - #14
Merged
Merged
Conversation
Requests with image_url parts were refused, though both Claude Code and Codex read images. Accept PNG, JPEG, GIF and WebP as base64 data: URLs; each becomes "[image N]" in the transcript. Claude Code gets them as content blocks of one stream-json user message; Codex gets them written into the request's temporary folder and attached with --image, while its view_image tool (which could read any file) stays off. The API does not fetch http(s) image URLs, so a request cannot make it reach other hosts. Gemini CLI could only read images through its file tools, which stay off, so images for it get 400. The body limit grows from 4 to 32 MB to fit base64 images.
redacid
pushed a commit
that referenced
this pull request
Dec 3, 2026
Version bump and changelog for images in the local API (#14).
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.
image_urlparts were refused withonly text content is supported. Claude Code and Codex both read images, so the API now passes them on.What
image_urlparts with base64data:URLs (PNG, JPEG, GIF, WebP) forclaude/…andcodex/…models; each becomes[image N]in the transcript text.--input-format stream-json, one user message with the text and image content blocks.--image;view_imagestays disabled.https://…) are refused: the API never fetches a URL, so a request cannot make it reach other hosts.Tested
make check: 198 tests (parsing, numbering, refusals, Claude stream-json input, Codex--imagewith the file written).ApiServerwith a red PNG: Codex "Red." (4.4 s), Claude Code haiku "Red" (3.6 s; streaming 2.5 s).Docs:
docs/api.md(Images),docs-dev/architecture.md, OpenAPI description, README status.