[Optimize]: Resolution budgets, crop/bbox coordinate tools, and image-workflow guidance for vision tools
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 38/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- rust
- Área
- ai, computer-vision, tooling
Línea de trabajo
Comienza trazando los caminos existentes de analyze_image, view_image, optimize_image_with_size_limit e ImageAnalyzer, incluido el manejo de ImageLimits y coordinate_note. Después, revisa cómo se registran los archivos SKILL.md integrados. Se considera terminado cuando los ajustes preestablecidos de presupuesto, crop_image y draw_bbox, el reescalado mediante budget-path y la habilidad image-workflow funcionan conjuntamente, mientras el comportamiento heredado permanece sin cambios.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Upgrade BitFun's built-in vision tools with four capabilities borrowed from Qwen-MM-Plugins' design:
- Resolution budget presets for
analyze_image/view_image(small/normal/large) - Coordinate closed loop: new
crop_imageanddraw_bboxtools using 0-1000 normalized coordinates - Small-image upscaling to a minimum pixel floor (capped at 2x linear) so tiny crops stay legible for VLMs
- Built-in decision skill (
image-workflow) teaching the agent when to view vs analyze vs crop, and how to pick a budget
Background
The current vision path is two fixed-limit tools plus a batch pre-analysis path:
analyze_imagesends the image + prompt to the configured image-understanding model. Every call pays full image tokens, and the only size control is the hard provider cap (1MB tool cap / provider dimension limits). There is no way for the agent to trade detail against cost.view_imageattaches an image to the primary model context, also with no resolution control.optimize_image_with_size_limitnever upscales, so a tiny crop (e.g. a 64x64 region) is sent as-is and OCR/detail suffers.- The only coordinate handling is a prose
coordinate_notewarning the model that positions in the analysis are estimates. There is no tool to actually crop or annotate a static image, so the estimate cannot be turned into an action loop. - Tool descriptions are one-liners; the model has no guidance on which tool to use when.
Qwen-MM-Plugins solves these with token-budget-driven resolution presets (256/1024/2048 visual tokens), a crop/draw_bbox pair that consumes grounding output in the same 0-1000 normalized coordinate system, an upscale floor, and declarative SKILL.md decision documents.
Proposed changes
1. Budget presets (optional parameter, legacy behavior unchanged)
- Add
ImageBudget(small/normal/large) mapping to pixel targets via token budgets (256/1024/2048 x 32^2 = ~512^2 / ~1024^2 / ~1448^2), clamped by the providerImageLimitsceiling. - Add an optional
budgetparameter toanalyze_imageandview_image. When omitted, the existing path runs unchanged (no behavior change for existing callers/configs). - Fix the
resize_notewording which currently hard-codes "downscaled" and would misreport upscaling.
2. Coordinate closed loop: crop_image + draw_bbox
crop_image(path, box[x1,y1,x2,y2 in 0-1000], output_path?): validates and clamps the box, saves the cropped region next to the source by default, and returns pixel-mapped coordinates. Attaches a preview when the primary model supports multimodal tool output; degrades to a text summary otherwise.draw_bbox(path, boxes[{bbox,label?}], output_path?): draws rectangles with an adaptive line width and a fixed palette. v1 draws boxes only (no text labels, no new dependencies).- Both support remote workspace paths (read + write through workspace filesystem services).
- Closed loop: the model reports a region in normalized coordinates,
crop_imagecuts it, thenanalyze_image(crop_path, budget="large")re-inspects the region at high resolution.
3. Small-image upscaling
- In the budget path only: images below the minimum pixel floor (~512^2) are upscaled, capped at 2x linear so tiny images do not burn tokens pointlessly (larger regions should be re-cropped instead).
4. Built-in decision skill
- New builtin skill
image-workflow(SKILL.md): tool-selection decision table, budget guidance (small preview / normal default / large detail; large on crops), coordinate discipline (normalized 0-1000, model coordinates are estimates, use reported width/height/was_resized to convert), and cost tips (image tokens dominate; crop before repeated full-image calls).
Non-goals (follow-ups)
- 32px patch-grid snapping for Qwen-style providers
- Text label rendering in
draw_bbox(needs font rasterization) - Budget support for the
ImageAnalyzerbatch pre-analysis path
- Lenguaje dominante
- Rust
- Estrellas
- 2.3k
- Forks
- 236
- Merge medio
- 2 h 46 min
- PR fusionados (30 d)
- 482
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de GCWing/OpenBitFun
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
GCWing/OpenBitFun#3213 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
GCWing/OpenBitFun#2363 ·
Los mantenedores suelen responder en 1 día
-
question
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
GCWing/OpenBitFun#2340 ·
Los mantenedores suelen responder en 1 día
-
[Feature]: 生态兼容逻辑优化Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
GCWing/OpenBitFun#3271 ·
Los mantenedores suelen responder en 1 día
-
[Feature]: 文件树UI优化Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
GCWing/OpenBitFun#3270 ·
Los mantenedores suelen responder en 1 día
Todos los issues de GCWing/OpenBitFun
Issues similares
-
bug CLI exec tool-calls
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
maintainer-needed p2 triaged ui windows
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
ai_p2
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
ClickHouse/ClickHouse#123351 ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
github/copilot-sdk#2804 · 1 comentario ·
Los mantenedores suelen responder en 1 día