Skip to content

fix(session): gate screenshot media for visionless models#105

Merged
Alezander9 merged 2 commits into
mainfrom
screenshot-gate
Jun 26, 2026
Merged

fix(session): gate screenshot media for visionless models#105
Alezander9 merged 2 commits into
mainfrom
screenshot-gate

Conversation

@Alezander9

@Alezander9 Alezander9 commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary:

  • remove unsupported tool-result media from model messages based on selected model input capabilities
  • replace browser screenshots for visionless models with a short text notice
  • keep media attachments for vision-capable models

Tests:

  • bun test test/session/message-v2.test.ts
  • bun typecheck
  • pre-push hook: bun turbo typecheck filtered packages

Summary by cubic

Gates tool-result media by model input capabilities. Visionless models no longer receive screenshots/images; they get a short text notice, while vision-capable models keep media.

  • Bug Fixes
    • Filter attachments by model.capabilities.input (image/audio/video/pdf); add a single, deduped omission notice (special message for browser_execute screenshots).
    • After gating, extract only model-supported media to separate messages when providers don’t support media in tool results.
    • Updated tests for vision vs. non-vision behavior; removed outdated screenshot media regression test.

Written for commit ee1f973. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Re-trigger cubic

@Alezander9 Alezander9 merged commit a444091 into main Jun 26, 2026
3 checks passed
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.

1 participant