Generated pictures are JPEG bytes saved under a .png name
Maintainer antworten meist innerhalb von 1 Tag
@santoshkumarradha arbeitet bereits daran.
Seit 27.9.2026.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 75/100
Rechercherichtung
Start with internal/provider/media.go:156-169 and internal/session/tools_media.go to trace how generated bytes are written for both the codeaf image command and generate_image. Reproduce the issue with the supplied isolated-profile command and inspect the output with file. Done when the output is PNG data for a .png path, or is saved as .jpg with that choice reported to the user.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Seen on: dev 837b2b0.
Behaviour
codeaf image … --out media/plane.png and the chat's generate_image with path media/banner.png both wrote JPEG data (file: JPEG image data, 2048x2048 and 2048x1152). The agent noticed and re-encoded on its own. A file should match its extension: convert, or save under .jpg and say so.
Replication
- Build dev 837b2b0 (
git checkout 837b2b0 && make build, binarybin/codeaf), or install the dev build withcurl -fsSL https://agentfield.ai/get/devaf | bash. - Use an isolated profile:
export HOME=$(mktemp -d), exportOPENROUTER_API_KEY, and keep the default model (~deepseek/deepseek-v4-flash-latest, crew on auto). - On a busy machine set
task.max_loadto0(/settings, Tasks) so the busy-machine gate does not hold tasks. cd $(mktemp -d) && mkdir media && codeaf image "a paper plane on a desk" --out media/plane.png.file media/plane.png.
Evidence
file media/plane.png→JPEG image data, … 2048x2048.internal/provider/media.go:156-169andinternal/session/tools_media.go: the returned bytes are written under the requested name without a type check.
Guessed cause
A guess from reading the code, not a confirmed diagnosis. The provider returns JPEG despite the PNG request, and the bytes are saved under the asked name without checking the type.
Acceptance
- e2e: after the command above,
file media/plane.pngreports PNG image data (or the file is saved asplane.jpgand the command says so).
Found while writing the public docs; manual text differences are in #1545.
🤖 Generated with Claude Code
- Vorherrschende Sprache
- Go
- Sterne
- 115
- Forks
- 14
- Ø Merge
- 9 Std. 44 Min.
- Gemergte PRs (30 T.)
- 775
Entwicklungsumgebung
Die Einrichtungsdateien dieses Projekts haben wir noch nicht geprüft. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus Agent-Field/CodeAF
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Agent-Field/CodeAF#1679 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Agent-Field/CodeAF#1678 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:chat bug sev:papercut
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
Agent-Field/CodeAF#1592 ·
Maintainer antworten meist innerhalb von 1 Tag
-
codeaf do "" runs a paid job with an empty briefEvtl. vergeben @santoshkumarradha hat das vor 3 Tagen übernommen. Offenarea:headless bug sev:critical
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Agent-Field/CodeAF#1566 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:chat feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Agent-Field/CodeAF#1510 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in Agent-Field/CodeAF
Ähnliche Issues
-
[Docs] - Document minimum Terraform/OpenTofu version (>= 1.11) required by write-only argumentsOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 92/100
MagaluCloud/terraform-provider-mgc#323 ·
Maintainer antworten meist innerhalb von 11 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
rossoctl/context-guru#366 ·
Maintainer antworten meist innerhalb von 1 Tag
-
stage-fail
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
siyuan-note/bazaar#2293 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
piraeusdatastore/piraeus-operator#1070 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag