LocalAI/core/http
Daniel Liljeberg fc3980dadd
fix: inject text-file content into chat completions messages (#9896)
Non-image/non-audio file attachments (txt, md, csv, json) were being
  stored in the 'files' metadata field but never added to the message
  content array sent to /v1/chat/completions. Images and audio correctly
  received content blocks; files did not.

  Fix: push a text content block into messageContent when textContent is
  present, matching the pattern used for image_url and audio_url.

  Also fixes Home.jsx addFiles which never called file.text() at all,
  meaning files attached on the home screen had empty textContent even
  before reaching useChat.js.

  Note: PDF files use file.text() which returns raw bytes rather than
  parsed text. Proper PDF support would require PDF.js or server-side
  extraction and is not part of this fix.

Signed-off-by: Daniel Liljeberg <damien_@hotmail.com>
2026-05-20 01:00:32 +02:00
..
auth chore: Security hardening (#9719) 2026-05-08 16:25:45 +02:00
endpoints realtime: honor output_modalities to skip TTS in text-only mode (#9838) 2026-05-15 12:39:47 +02:00
middleware fix(middleware): parse OpenAI-spec tool_choice in /v1/chat/completions (#9559) 2026-05-14 00:14:38 +02:00
react-ui fix: inject text-file content into chat completions messages (#9896) 2026-05-20 01:00:32 +02:00
routes feat(realtime): Add Liquid Audio s2s model and assistant mode on talk page (#9801) 2026-05-13 21:57:27 +02:00
static fix(streaming): comply with OpenAI usage / stream_options spec (#9815) 2026-05-14 08:53:46 +02:00
views feat(realtime): WebRTC support (#8790) 2026-03-13 21:37:15 +01:00
app.go fix(http): honor X-Forwarded-Prefix when proxy strips the prefix (#9614) 2026-05-13 21:59:33 +02:00
app_test.go fix(http): honor X-Forwarded-Prefix when proxy strips the prefix (#9614) 2026-05-13 21:59:33 +02:00
csrf_multipart_test.go chore: Security hardening (#9719) 2026-05-08 16:25:45 +02:00
explorer.go chore(refactor): move logging to common package based on slog (#7668) 2025-12-21 19:33:13 +01:00
http_suite_test.go refactor(tests): split app_test.go, move real-backend coverage to e2e-backends 2026-04-27 23:09:20 +00:00
openresponses_test.go feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
render.go feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
route_coverage_test.go chore: Security hardening (#9719) 2026-05-08 16:25:45 +02:00