Skip to content

feat(slack): Send current-message images natively to image models - #2617

Merged
thomasjiangcy merged 1 commit into
mainfrom
feat/slack-native-images
Nov 3, 2026
Merged

thomasjiangcy merged 1 commit into
mainfrom
feat/slack-native-images

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Slack images in the current message now reach the model as native image parts, not a vision-model summary. Before, the main model got a 500-character summary from AI_VISION_MODEL and lost small text, exact numbers, and dense UI detail. Prod runs one anthropic/claude-opus-5.5 profile, which reads images.

Web chat (#1933) already sends original images this way. Pi converts ImageContent to Anthropic base64 image blocks.

Behavior

  • Images go in natively only when every profile model accepts image input. The router picks the profile after attachments resolve, so every model it can pick must read images.
  • The media type comes from the file bytes, not Slack's declared type. Providers reject an image whose bytes do not match its media type.
  • A vision summary is still used when a profile model is text-only, and for images in earlier thread messages (thread hydration does not change).
  • The "no vision model" notice now shows only when neither path can read the image.

Tests

  • attachment-media-behavior: the first scenario now sends a mislabeled PNG natively. The second scenario uses a text-only model to cover the omitted-image notice.
  • bot-image-hydration: the inline-summary scenarios use real PNG bytes and a text-only model, so they test the fallback by model and not by fake bytes.

Not in scope
Native PDFs and other files. pi-ai 0.85.1 and 1.5.0 have no document content type, although Anthropic accepts document blocks.

via @thomasjiangcy.

--

View Session [Sentry]

When every profile model accepts image input, pass Slack images from the
current message to the model as image parts instead of a vision summary.
Use the media type detected from the bytes, since providers reject a
mismatched type. Keep the vision summary for text-only profile models and
for images in earlier thread messages.

Co-Authored-By: Thomas Jiang <[email protected]>
@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Nov 3, 2026 3:46pm UTC

Request Review

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

1 screenshot change — 1 changed · 0 added · 0 removed

Review screenshots in Frameshift

Settings Mcp · Desktop
Settings Mcp · Desktop
Changed

@thomasjiangcy
thomasjiangcy merged commit 15e4b1a into main Nov 3, 2026
47 checks passed
@thomasjiangcy
thomasjiangcy deleted the feat/slack-native-images branch November 3, 2026 15:53

This branch was successfully deployed

1 active deployment
Preview – junior-docs — aee8a8b4 Deployed Nov 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant