LocalAI/core/http/endpoints/openai
Ettore Di Giacinto 7809c5f5d0
fix(vision): propagate mtmd media marker from backend via ModelMetadata (#9412)
Upstream llama.cpp (PR #21962) switched the server-side mtmd media
marker to a random per-server string and removed the legacy
"<__media__>" backward-compat replacement in mtmd_tokenizer. The
Go layer still emitted the hardcoded "<__media__>", so on the
non-tokenizer-template path the prompt arrived with a marker mtmd
did not recognize and tokenization failed with "number of bitmaps
(1) does not match number of markers (0)".

Report the active media marker via ModelMetadataResponse.media_marker
and substitute the sentinel "<__media__>" with it right before the
gRPC call, after the backend has been loaded and probed. Also skip
the Go-side multimodal templating entirely when UseTokenizerTemplate
is true — llama.cpp's oaicompat_chat_params_parse already injects its
own marker and StringContent is unused in that path. Backends that do
not expose the field keep the legacy "<__media__>" behavior.
2026-04-18 20:30:13 +02:00
..
types feat(realtime): WebRTC support (#8790) 2026-03-13 21:37:15 +01:00
chat.go fix(streaming): deduplicate tool call emissions during streaming (#9292) 2026-04-10 00:44:25 +02:00
chat_test.go chore: refactor endpoints to use same inferencing path, add automatic retrial mechanism in case of errors (#9029) 2026-03-16 21:31:02 +01:00
completion.go feat(api): Allow coding agents to interactively discover how to control and configure LocalAI (#9084) 2026-04-04 15:14:35 +02:00
constants.go fix(api): SSE streaming format to comply with specification (#7182) 2025-11-09 22:00:27 +01:00
edit.go feat(api): Allow coding agents to interactively discover how to control and configure LocalAI (#9084) 2026-04-04 15:14:35 +02:00
embeddings.go feat(api): Allow coding agents to interactively discover how to control and configure LocalAI (#9084) 2026-04-04 15:14:35 +02:00
image.go feat(api): Allow coding agents to interactively discover how to control and configure LocalAI (#9084) 2026-04-04 15:14:35 +02:00
image_test.go Fix image upload processing and img2img pipeline in diffusers backend (#8879) 2026-03-11 08:05:50 +01:00
inference.go fix: thinking models with tools returning empty content (reasoning-only retry loop) (#9290) 2026-04-09 18:30:31 +02:00
inference_test.go fix: thinking models with tools returning empty content (reasoning-only retry loop) (#9290) 2026-04-09 18:30:31 +02:00
inpainting.go feat(UI): image generation improvements (#7804) 2025-12-31 21:59:46 +01:00
inpainting_test.go feat(realtime): WebRTC support (#8790) 2026-03-13 21:37:15 +01:00
list.go feat(api): Allow coding agents to interactively discover how to control and configure LocalAI (#9084) 2026-04-04 15:14:35 +02:00
openai_suite_test.go Fix image upload processing and img2img pipeline in diffusers backend (#8879) 2026-03-11 08:05:50 +01:00
realtime.go fix(vision): propagate mtmd media marker from backend via ModelMetadata (#9412) 2026-04-18 20:30:13 +02:00
realtime_model.go feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
realtime_transport.go feat(realtime): WebRTC support (#8790) 2026-03-13 21:37:15 +01:00
realtime_transport_webrtc.go feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
realtime_transport_ws.go feat(realtime): WebRTC support (#8790) 2026-03-13 21:37:15 +01:00
realtime_webrtc.go feat(realtime): WebRTC support (#8790) 2026-03-13 21:37:15 +01:00
transcription.go feat: wire transcription for llama.cpp, add streaming support (#9353) 2026-04-14 16:13:40 +02:00