Repository navigation
feat: add named frame sources and vision annotation pipeline - #990
Conversation
Generalize screenshot plumbing into named frame sources (screen + directory-backed camera sources), add a pluggable image annotator (local llama-mtmd-cli engine with auto-downloaded Qwen3-VL GGUF, or a gateway side-call), expose it via GetLatestFrame(source, format) and a new ImageDecode tool, and gate base64 image injection for models declared text-only via vision.text_only_models - annotation text replaces images at all three choke points (chat tool results, headless agent, user attachments). Also fixes headless infer agent silently dropping tool result images, and hoists tool images into a follow-up user message so tool-role messages stay text-only. Closes #895
Models opt into text via GetLatestFrame's annotated format (the default when an annotator is configured; the annotation text replaces the image) or ImageDecode - any chat-completions orchestrator can use the tools directly, no per-model vision fingerprinting needed.
…tion The agent re-publishes 'running' tool-progress events as keep-alives; the floating window appended a line per tick. Update the tool's line in place with elapsed seconds instead, and stamp the total on completion. Also re-extract the embedded ComputerUse.app on every launch - the previous exists-check kept launching a stale copy after CLI upgrades.
Clipboard-pasted and file-attached images are saved to disk, but the model only received the base64 part - a model without vision had no way to find the file. Append a text part naming the saved path so it can inspect the image via ImageDecode.
The message now references the saved path for ImageDecode, but the file was deleted the moment the message was sent, so the model chased a dead path. Prune clipboard images by retention (newest 20 / 24h) instead of removing them on send.
Drop the local llama-mtmd-cli engine - the gateway already serves local models (e.g. Ollama), so the annotator is always a gateway side-call. vision.annotator.model is a provider/model reference, defaulting to ollama_cloud/qwen3.5-vl.
qwen3.5-vl is not a real model id; the vision-capable Qwen on Ollama Cloud is qwen3.5:397b.
qwen3.5:397b hallucinates too much on annotation; Haiku 4.5 is a cheap vision model with reliable structured output.
Co-authored-by: Eden Reich <[email protected]>
|
@infer Can you create a follow-ups bug report / feature requests for the todos? I want to merge this PR. use /ponytail:ponytail |
|
Model: Todos
Pull Request✅ Infer Result: SuccessDone. Created two follow-up issues from the PR's TODOs: Issue #997 - [FEATURE] Vision model detection: route image data natively to vision-capable models
Issue #998 - [FEATURE] macOS Accessibility API integration for computer use tools
No existing open issues matched either topic, so no duplicates were created. Both are filed on Model: Tokens: 1,267,684 in · 9,464 out · 1,277,148 total (20 requests) Tool calls: 35 total · 89% success rate TracesStats
|
|
🎉 This PR is included in version 0.159.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Closes #895
What
Lets any chat-completions model — including text-only ones like DeepSeek — understand screen and camera frames, via explicit tools instead of base64 image forwarding.
screensource; newdirectorysources serve the newest image from a folder (camera frames), with optional retention pruning. Registered on the tool registry, so chat and headlessinfer agentget them.internal/vlm): image → scene summary + numbered element list with bounding boxes, via a side-call to a vision model through the gateway (title-generator pattern). The gateway also serves fully local models (Ollama), so offline annotation is just a local provider — no separate engine in the CLI. Default model:ollama_cloud/qwen3.5-vl.GetLatestFrame(source, format)replacesGetLatestScreenshot:annotatedreturns text instead of the image (default when the annotator is enabled),regularreturns the raw frame. Screen-source annotations include MouseClick-ready element centers.ImageDecode(image, prompt?): describe any local image file as text, optionally answering a question about it.--filesattachments add a[image saved at <path>]text part, so a model without vision canImageDecodethe file itself; pasted files are retained (pruned newest-20/24h) instead of deleted on send.No model fingerprinting: models opt into text by calling the tools, which any orchestrator that speaks chat completions can do.
Fixes along the way
infer agentsilently dropped tool-result images; they now flow and are hoisted into a follow-up user message (tool-role messages stay text-only for Anthropic).Behavior notes
SetScreenshotProvider(and its MouseClick re-registration vestige) is deleted; MouseClick keeps the shared computer-use rate limiter.Success: false.Tested
deepseek-v4-flash:cloud(text-only) described the actual screen — iTerm/tmux panes and code visible in the editor — through thescreensource +qwen3.5:cloudannotator.Docs
README ("Frame Sources & Vision Annotation"), docs/tools-reference.md (GetLatestFrame, ImageDecode), docs/configuration-reference.md (Vision Settings,
gateway.vision_enableddisambiguation). A[DOCS]ticket for inference-gateway/docs to follow.TODOs