Description
When vision_analyze is called and the main model does not support image inputs, the first invocation fails with a 400 error instead of automatically falling back to the configured auxiliary.vision provider. The second call succeeds without any configuration changes.
Expected Behavior
The system prompt indicates that when 'the active model has native vision, the image is attached to your context directly; otherwise Hermes falls back to an auxiliary vision model'. This fallback should happen automatically on the first attempt.
Actual Behavior
First call:
Error analyzing image: Error code: 400 - {'error': {'message': 'The provided messages input is invalid. The error info is [Unexpected item type in content].'}}
Second call (same image, no config change): Success.
Configuration
auxiliary:
vision:
provider: openrouter
model: nvidia/nemotron-nano-12b-v2-vl:free
timeout: 120
download_timeout: 30
Main model: qwen3.7-max (custom/Alibaba provider) — does NOT support vision.
Reproduction Steps
- Configure
auxiliary.vision with OpenRouter + a free vision model
- Set a non-vision model as primary (e.g., qwen3.7-max)
- Attach an image via WebUI or CLI
- Call
vision_analyze(image_url='/path/to/image.jpg', question='...')
- Observe error 400 on first attempt
- Retry same call → succeeds
Environment
- Hermes Agent v0.18.0 (2026.7.1)
- WebUI session
- Primary provider: custom (Alibaba MAAS, ap-southeast-1)
- Fallback chain: deepseek-v4-flash, deepseek-v4-pro, qwen3.6-plus, qwen-plus (all custom/Alibaba)
Hypothesis
The vision tool likely attempts to inject the image into the primary model's message payload first, and only falls back to auxiliary.vision after the primary call fails. The fallback logic should check model capabilities upfront rather than retrying after a 400 error.
Description
When
vision_analyzeis called and the main model does not support image inputs, the first invocation fails with a 400 error instead of automatically falling back to the configuredauxiliary.visionprovider. The second call succeeds without any configuration changes.Expected Behavior
The system prompt indicates that when 'the active model has native vision, the image is attached to your context directly; otherwise Hermes falls back to an auxiliary vision model'. This fallback should happen automatically on the first attempt.
Actual Behavior
First call:
Second call (same image, no config change): Success.
Configuration
Main model:
qwen3.7-max(custom/Alibaba provider) — does NOT support vision.Reproduction Steps
auxiliary.visionwith OpenRouter + a free vision modelvision_analyze(image_url='/path/to/image.jpg', question='...')Environment
Hypothesis
The vision tool likely attempts to inject the image into the primary model's message payload first, and only falls back to
auxiliary.visionafter the primary call fails. The fallback logic should check model capabilities upfront rather than retrying after a 400 error.