You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: read local image paths starting with http - #302
Image inputs are classified as remote URLs with startsWith('http') in both resolveImageInput and image generate --subject-ref. As a result, ordinary relative paths such as http-assets/frame.png or https-images/reference.png are forwarded as URL strings instead of reading the local file.
This affects, for example:
mmx image generate --prompt "A cat" --subject-ref type=character,image=http-assets/frame.png --dry-run
mmx video generate --model MiniMax-H3 --prompt "A cinematic scene" --image http-assets/frame.png --dry-run
Given an existing PNG at that path, the first command currently emits an image_url pointing at a local relative path; the second places that relative path in its first-frame URL. Neither payload contains the image bytes.
Changes
Recognize remote image URLs only by the complete http:// or https:// prefix, consistent with the existing toDataUri and media helpers.
Let other http-prefixed inputs use the existing local-file conversion and validation.
Keep existing data: and mm_file:// handling in resolveImageInput unchanged.
Add command-level dry-run regression tests using real temporary PNG files for image subject references and H3 first frames, plus HTTP/HTTPS URL positive controls. The new tests do not make API requests.
Validation
With the new command tests applied to base 38aba5f: 3 failed, 25 passed; all three failures are the local-path regressions.
bun test test/commands/image/generate.test.ts test/commands/video/generate.test.ts test/utils/media.test.ts: 33 passed.
bun run typecheck: passed.
bun run build: passed.
git diff --check: passed.
bun run lint: no errors; one pre-existing no-explicit-any warning at test/sdk/speech.test.ts:117.
Full bun test: 618 passed, 1 failed. The same failure reproduces in an untouched worktree at 38aba5f (613 passed, 1 failed): Zed configuration > writes a fresh config with the selected model and honors XDG_CONFIG_HOME at test/agent/zed.test.ts:68 on macOS. It expects the XDG directory but receives $HOME/.config/zed/settings.json. No Zed code or test is changed here.
AI-assisted implementation and tests. Two independent agent reviewers reviewed the complete diff separately, reran the focused tests, and reported no blocking findings, following the repository's blind-review instructions.
Need help on this PR? Tag @codesmith-bot with what you need.
Could a maintainer review this local-image-path fix? A real local PNG under http-image-/ or https-image-/ is currently mistaken for a remote URL; this patch recognizes the full HTTP(S) scheme so the file is read and encoded normally.
I reran the image command, video command and media utility suites today: all 33 tests pass, including real temporary image files and remote-URL controls. The official check passes; the separate automatic checks/review jobs were skipped, so this still needs maintainer review. The diff and independent review results are documented in the PR.
Related fixes, grouped here rather than posting more pings:
fix: bound polling requests by the remaining timeout #300 (5b8e49e): preserve the remaining timeout budget through HTTP/polling. Today's HTTP+polling suites pass 37 tests, including real loopback responses that stall headers or bodies; typecheck passes.
Both are mergeable and their official check is successful; automatic review jobs are skipped, not approvals. The full-suite baseline limitations remain disclosed in each PR. Validation was AI-assisted; no human review or real provider call is claimed.
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
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.
Problem
Image inputs are classified as remote URLs with
startsWith('http')in bothresolveImageInputandimage generate --subject-ref. As a result, ordinary relative paths such ashttp-assets/frame.pngorhttps-images/reference.pngare forwarded as URL strings instead of reading the local file.This affects, for example:
Given an existing PNG at that path, the first command currently emits an
image_urlpointing at a local relative path; the second places that relative path in its first-frame URL. Neither payload contains the image bytes.Changes
http://orhttps://prefix, consistent with the existingtoDataUriand media helpers.http-prefixed inputs use the existing local-file conversion and validation.data:andmm_file://handling inresolveImageInputunchanged.Validation
38aba5f: 3 failed, 25 passed; all three failures are the local-path regressions.bun test test/commands/image/generate.test.ts test/commands/video/generate.test.ts test/utils/media.test.ts: 33 passed.bun run typecheck: passed.bun run build: passed.git diff --check: passed.bun run lint: no errors; one pre-existingno-explicit-anywarning attest/sdk/speech.test.ts:117.bun test: 618 passed, 1 failed. The same failure reproduces in an untouched worktree at38aba5f(613 passed, 1 failed):Zed configuration > writes a fresh config with the selected model and honors XDG_CONFIG_HOMEattest/agent/zed.test.ts:68on macOS. It expects the XDG directory but receives$HOME/.config/zed/settings.json. No Zed code or test is changed here.AI-assisted implementation and tests. Two independent agent reviewers reviewed the complete diff separately, reran the focused tests, and reported no blocking findings, following the repository's blind-review instructions.
Need help on this PR? Tag
@codesmith-botwith what you need.