Add files via upload

This commit is contained in:
公明
2026-07-07 14:04:18 +08:00
committed by GitHub
parent 3dfcde7c88
commit 00802a275c
61 changed files with 9460 additions and 24 deletions
+61
View File
@@ -0,0 +1,61 @@
# Vision Analysis
[中文](../zh-CN/VISION.md)
Vision analysis registers the `analyze_image` MCP tool when enabled. It is intended for screenshots, captchas, UI states, and image evidence in authorized workflows.
## Config
```yaml
vision:
enabled: true
model: qwen-vl
api_key: ""
base_url: ""
provider: ""
max_image_bytes: 5242880
max_dimension: 2048
jpeg_quality: 82
max_payload_bytes: 524288
detail: auto
timeout_seconds: 60
```
Empty `api_key`, `base_url`, or `provider` inherits from `openai`.
## Data Handling
Image bytes are sent only to the vision model call. Agent history keeps text summaries, not raw image bytes. This reduces context size and accidental image propagation.
## Preprocessing
The runtime can resize and recompress large images based on:
- maximum file size;
- maximum dimension;
- JPEG quality;
- encoded payload size.
If small images are already under limits, preprocessing may be skipped.
## Usage Guidance
Use vision for:
- UI screenshots;
- visual vulnerability evidence;
- captcha or image-based prompts in authorized tests;
- interpreting tool screenshots.
Do not use it for:
- unrelated personal images;
- sensitive screenshots without authorization;
- long-term storage of raw evidence when a text summary is enough.
## Source Anchors
- Tool registration: `internal/app/vision_tools.go`
- Client: `internal/vision/client.go`
- Preprocess: `internal/vision/preprocess.go`
- Config: `internal/config/vision.go`