v4.3.19-15: satellite_snapshot 이미지도 SSE로 직접 주입 (모델이 경로 오타내는 문제)

실사용 중 발견: 모델이 satellite_snapshot 결과의 /api/files/... 마크다운을
답변에 그대로 복사하지 않고 재작성하면서 /api/files/ 접두사를 빠뜨림 —
그러면 클라이언트 정규식이 매치 안 돼서 사진탭이 아예 안 열림.
weather_map_screenshot과 같은 패턴으로, 도구 결과의 마크다운을 그대로
SSE로 주입해서 모델의 재현 정확도에 의존하지 않게 함. 태풍 돌핀 실제
NASA 위성사진으로 재현·검증 완료.
This commit is contained in:
kim committed 2026-07-27 12:18:32 +09:00
1 parent ce9f556e84
commit f49d7a903c
1 file changed
+8
+8
View File
@@ -1510,6 +1510,14 @@ print(json.dumps({'slides': slides, 'total': len(prs.slides)}, ensure_ascii=Fals
if (name === 'weather_map_screenshot' && tr.success && typeof args?.url === 'string') {
sendSSE?.('token', { text: `\n${args.url}\n` });
}
// satellite_snapshot: observed the model re-typing the returned markdown image
// instead of copying it verbatim, dropping the /api/files/ prefix — the photo
// tab then never opens client-side. Push the tool's own (guaranteed-correct)
// markdown straight through so it never depends on the model reproducing it.
if (name === 'satellite_snapshot' && tr.success) {
const imgMatch = _resultText.match(/!\[[^\]]*\]\(\/api\/files\/satellite-images\/[^)]+\)/);
if (imgMatch) sendSSE?.('token', { text: `\n${imgMatch[0]}\n` });
}
return { name, args, result: _resultText, error: !tr.success, ...(_hasImageMd ? { isImage: true } : {}), ...(tr.data !== undefined ? { data: tr.data } : {}) };
}
}