unsloth/studio/backend
Roland Tannous 92cee0ff3e
Studio: support images on /v1/messages (Anthropic-compat) (#5128)
* Studio: support images on /v1/messages (Anthropic-compat)

Translate Anthropic `image` content blocks (base64 and url sources) to
OpenAI `image_url` multimodal parts so the Anthropic endpoint reaches
llama-server's native vision path. Mirrors the `/v1/chat/completions`
vision behavior: 400 when the active GGUF isn't a vision model, and
embedded images are re-encoded to PNG (stb_image format coverage).
Server-side agentic loop is disabled when images are present, matching
the existing `not image_b64` gate on /v1/chat/completions.

Adds translator + normalizer unit tests.

* Studio: address gemini-code-assist review on /v1/messages image support

- Preserve interleaving of Anthropic text + image content blocks in the
  translator (previously flattened all text first, then all images).
- Let _normalize_anthropic_openai_images return has_image so the route
  skips the second scan it was doing.
- Use module-level base64/io in the helper instead of re-importing.
2026-04-22 03:25:07 +04:00
..
assets Add Qwen3.6 inference defaults for Studio (#5065) 2026-04-16 11:42:42 -07:00
auth Studio: Expose openai and anthropic compatible external API end points (#4956) 2026-04-13 21:08:11 +04:00
core Studio: support images on /v1/messages (Anthropic-compat) (#5128) 2026-04-22 03:25:07 +04:00
loggers Final cleanup 2026-03-12 18:28:04 +00:00
models Studio: forward standard OpenAI tools / tool_choice on /v1/responses (Codex compat) (#5122) 2026-04-21 13:17:20 +04:00
plugins Bump Data Designer to 0.5.4 (removes litellm dependency) (#4569) 2026-03-25 02:01:43 -07:00
requirements change torchcodec version to 0.10.0 in extra-no-deps (#5043) 2026-04-16 19:50:57 +04:00
routes Studio: support images on /v1/messages (Anthropic-compat) (#5128) 2026-04-22 03:25:07 +04:00
state Final cleanup 2026-03-12 18:28:04 +00:00
storage feat: custom scan folders for GGUF model discovery (#4723) 2026-03-31 06:40:31 -07:00
tests Studio: support images on /v1/messages (Anthropic-compat) (#5128) 2026-04-22 03:25:07 +04:00
utils Update model_mappings.py 2026-04-22 00:13:59 +04:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
_platform_compat.py Fix Studio crash on Anaconda/conda-forge Python (#4484) 2026-03-22 05:36:55 -07:00
colab.py Fix/studio colab button message: Add fallback message for Colab Studio button when proxy URL fails (#4866) 2026-04-05 21:57:45 -07:00
main.py Chat first onboarding (#5063) 2026-04-16 09:58:10 -07:00
run.py Studio: Expose openai and anthropic compatible external API end points (#4956) 2026-04-13 21:08:11 +04:00
startup_banner.py studio: unify Windows installer/setup logging style, verbosity controls, and startup messaging (#4651) 2026-03-30 00:53:23 -07:00