Send the product photos the AI attaches to its replies #130
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.40) × (1 − Review Confidence (0.54)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 309 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 74% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.343
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #130"
general
weight: 0.35
claude[bot]
Omni-AI attaches up to 3 product photos to agent replies on
ai.reply.requested. Parrot used to ignore them, so customers got only the text ("Here is the photo of…") with no picture. Closes #124.What happens now
1. The text is sent first, as before.
2. Then each photo in
attachmentsis sent in order (at most 3; repeated URLs are dropped):- WhatsApp: an image message with its caption.
- Messenger: the image without a caption, since Messenger can't put text on a file.
- Instagram / TikTok: skipped and logged, since files can't be sent on those channels yet.
3. Each photo is stored as the AI's image message, so the inbox shows it as a picture in the AI's bubble. No web change was needed, because the inbox already renders attachments on any message.
4. Each photo is published on
messages.persistedas an AgentToUser image message, so Omni's history includes it.Rules
{requestId}:media:{index}), so a redelivered event never sends a photo twice.- Public
httpslinks only.- The address actually connected to must be public: no loopback, private, link-local/metadata or CGNAT addresses, and no redirects.
- JPEG or PNG, checked by the file's bytes, up to WhatsApp's 5 MB.
Changes
AiReplyRequested: optionalAttachments(url,caption).AiReplyProcessor: sends the photos after the text.ConversationService.SendAgentFileAsync: sends a file as the AI (markedIsAiReply) and publishes it.HttpAgentPhotoFetcher: the download, registered in MessageProcessor.Testing
Test.Parrot.Api: 2,034 passed. The new tests cover:- order and captions
- a resend sending nothing again
- a broken photo not blocking the rest
- no photos when the text fails
- the download rules and the address checks
http://localhost:9000, so they'll be refused (https only). Photos send where the photo URLs are public https, such as the S3 bucket.Deploy
Rebuild/redeploy message-processor; that's where
ai.reply.requestedis consumed. No migrations, and no new settings.