Skip to content

Bound view_image payloads and context history#72

Open
Aawegg wants to merge 1 commit into
ArtificialAnalysis:mainfrom
Aawegg:fix/image-context-budget
Open

Bound view_image payloads and context history#72
Aawegg wants to merge 1 commit into
ArtificialAnalysis:mainfrom
Aawegg:fix/image-context-budget

Conversation

@Aawegg

@Aawegg Aawegg commented Jul 15, 2026

Copy link
Copy Markdown

Summary

  • resize and compress oversized view_image results with configurable pixel and byte budgets
  • keep only the newest configured image blocks in active model context, replacing older images with lightweight placeholders
  • add configuration validation, user docs, and coverage for high-entropy images and repeated image calls

Closes #39

Test plan

  • uv run pytest tests/test_image_context.py tests/test_view_image.py tests/test_agent.py tests/test_mcp_image_smoke.py -q (55 passed)
  • uv run ruff check src tests
  • changed-file type checks

Resize oversized view_image results and prune stale image blocks so repeated visual inspection cannot exhaust the model context.
@Aawegg
Aawegg force-pushed the fix/image-context-budget branch from 5a5487d to 55a3aaf Compare July 15, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ENH: too many view_image calls spam context window

1 participant