Bug Description
vision_analyze returns 400 invalid_request_error: "Invalid request data" for valid local image paths, across different primary chat models/providers.
This makes clipboard-pasted images and ordinary local files effectively unusable in the CLI for visual inspection workflows.
This appears to be a tool/integration issue rather than a model-specific limitation:
- reproduced with primary model
anthropic/claude-opus-4-6
- reproduced again after switching the session to
openai/gpt-5.4 via OpenRouter
- same failure shape in both cases
There is likely overlap with #6004 for clipboard images under ~/.hermes/images/, but the problem is broader: I also reproduced it on ordinary valid local JPEG/PNG paths outside the clipboard directory.
Steps to Reproduce
- Start Hermes CLI on macOS.
- Use
vision_analyze on a valid local image path, for example:
~/.hermes/images/clip_<timestamp>.png (clipboard image)
/path/to/project/runtime/artifacts/photos/example.jpg (ordinary local JPEG)
- Ask for any simple description, e.g.
"Describe the image in detail".
- Observe tool failure.
- Switch the primary session model/provider (I tested Anthropic -> OpenAI) and retry.
- Observe the same failure again.
Expected Behavior
vision_analyze should successfully analyze valid local images, or
- if local files are unsupported in the current execution path, it should return a clear actionable error (e.g. "local image paths are not mounted/available in sandbox") rather than a generic provider 400.
Actual Behavior
The tool returns a provider error like:
Error analyzing image: Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'Invalid request data'}, 'request_id': 'req_...'}
This happens repeatedly on valid local images.
I also saw one size-related 400 on a larger upscaled JPEG:
messages.0.content.1.image.source.base64: image exceeds 5 MB maximum: 6937612 bytes > 5242880 bytes
That size error is expected for that specific file, but the main bug is that smaller valid images still fail with the generic Invalid request data 400.
Environment
- OS: macOS 15.3 / Darwin 25.3.0 arm64
- Repo:
NousResearch/hermes-agent
- Version/Commit:
268ee6bd
- Python version:
Python 3.9.6
- Primary chat models tested:
anthropic/claude-opus-4-6
openai/gpt-5.4 (via OpenRouter)
Error Output
Clipboard image path:
vision_analyze(image_url="~/.hermes/images/clip_<timestamp>.png")
→ Error code: 400
→ invalid_request_error: Invalid request data
Ordinary local JPEG path:
vision_analyze(image_url="/path/to/project/runtime/artifacts/photos/example.jpg")
→ Error code: 400
→ invalid_request_error: Invalid request data
Another local JPEG after switching primary model to GPT-5.4:
same 400 invalid_request_error: Invalid request data
Additional Context
file identifies the JPEG as valid:
JPEG image data, JFIF standard 1.01, 1280x1197, components 3
- The clipboard-path failure may be partly explained by
#6004 (clipboard images not mounted into Docker sandbox), but the ordinary local JPEG failure suggests the problem is not limited to ~/.hermes/images/.
- The repeated cross-provider failure suggests the bug is likely in the
vision_analyze local-file handling / auxiliary vision request construction, not in the main chat model selection.
- A better error classification would help even before the root fix lands.
Bug Description
vision_analyzereturns400 invalid_request_error: "Invalid request data"for valid local image paths, across different primary chat models/providers.This makes clipboard-pasted images and ordinary local files effectively unusable in the CLI for visual inspection workflows.
This appears to be a tool/integration issue rather than a model-specific limitation:
anthropic/claude-opus-4-6openai/gpt-5.4via OpenRouterThere is likely overlap with
#6004for clipboard images under~/.hermes/images/, but the problem is broader: I also reproduced it on ordinary valid local JPEG/PNG paths outside the clipboard directory.Steps to Reproduce
vision_analyzeon a valid local image path, for example:~/.hermes/images/clip_<timestamp>.png(clipboard image)/path/to/project/runtime/artifacts/photos/example.jpg(ordinary local JPEG)"Describe the image in detail".Expected Behavior
vision_analyzeshould successfully analyze valid local images, orActual Behavior
The tool returns a provider error like:
This happens repeatedly on valid local images.
I also saw one size-related 400 on a larger upscaled JPEG:
That size error is expected for that specific file, but the main bug is that smaller valid images still fail with the generic
Invalid request data400.Environment
NousResearch/hermes-agent268ee6bdPython 3.9.6anthropic/claude-opus-4-6openai/gpt-5.4(via OpenRouter)Error Output
Clipboard image path:
Ordinary local JPEG path:
Another local JPEG after switching primary model to GPT-5.4:
Additional Context
fileidentifies the JPEG as valid:#6004(clipboard images not mounted into Docker sandbox), but the ordinary local JPEG failure suggests the problem is not limited to~/.hermes/images/.vision_analyzelocal-file handling / auxiliary vision request construction, not in the main chat model selection.