anthropics / anthropics/claude-code-action

v1 cannot process issues with JPEGs in them

オープン
#495 コメント 1 件 リアクション 4 件 担当者 0 名 GitHub で見る
bug p1
主要言語
TypeScript
スター
8.9k
フォーク
2.1k
平均マージ
3日 9時間
マージ済み PR(30日)
10

説明

Describe the bug
Claude GitHub Action fails with an API error when processing GitHub issues that contain uploaded images. The error indicates a media type mismatch where the base64 image data doesn't match the expected PNG format.

To Reproduce
Steps to reproduce the behavior:

1. Create a GitHub issue in a repository with Claude GitHub Action enabled
2. Upload an image directly to the issue (drag and drop or paste)
3. Mention @claude in the issue to trigger the action
4. Claude responds with an API error about image format mismatch

Expected behavior
Claude should be able to process issues containing images, either by:
- Correctly handling various image formats (JPEG, PNG, etc.)
- Gracefully skipping image content if unable to process
- Converting images to the correct format before sending to the API

Screenshots
The error message received:
```
{"type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01WnM9ZBxs2vCwhKiSdzoJmn","type":"tool_result","content":[{"type":"image","source":{"type":"base64","data":"/9j/4AAQSkZJRgABAQAASABIAAD/4QBARXhpZgAATU0AKgAAAA
...

API Error: 400 {
"type":"error",
"error":{
"type":"invalid_request_error",
"message":"messages.1.content.6.image.source.base64.data: Image does not match the provided media type image/png"
},
"request_id":"req_011CSYPDcYC4wR98Ljz3ke1u"
}
```
API Provider

[x] Anthropic First-Party API (default)
[ ] AWS Bedrock
[ ] GCP Vertex

Additional context
- The issue appears to be related to how the GitHub Action processes embedded images in issues
- The base64 image data appears to be JPEG format (based on the /9j/ header which is typical for JPEG) but is being sent with a PNG media type
- This prevents Claude from analyzing issues that contain screenshots or other visual content
- Action version: @v1 (latest)

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。