transformers - 💡(How to fix) Fix [Critical v5.3] /v1/chat/completions would not accept request as usual [4 comments, 4 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
huggingface/transformers#44483Fetched 2026-04-08 00:28:13
View on GitHub
Comments
4
Participants
4
Timeline
9
Reactions
0
Assignees
Timeline (top)
commented ×4assigned ×1closed ×1labeled ×1
RAW_BUFFERClick to expand / collapse

System Info

Linux

Who can help?

No response

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

Run transformers serve in the terminal, and then issue request:

curl -sS -X POST 'http://localhost:8000/v1/chat/completions'
-H 'Content-Type: application/json'
-d '{"model":"LiquidAI/LFM2.5-VL-1.6B","stream":true,"messages":[{"role":"user","content":[{"type":"text","text":"What is in this image?"},{"type":"image_url","image_url":{"url":"https://natureconservancy-h.assetsadobe.com/is/image/content/dam/tnc/nature/en/photos/b/l/Blue-jay-Matt-Williams.jpg?crop=0%2C11%2C4000%2C3000&wid=400&hei=300&scl=10.0"}}]}],"max_tokens":300}'

Response:

{"detail":[{"type":"missing","loc":["query","request"],"msg":"Field required","input":null}]}

Expected behavior

it should provide generated result

extent analysis

Fix Plan

Step 1: Verify Configuration

  • Ensure that the transformers serve command is running correctly and the model is loaded.
  • Check the configuration file for any missing or incorrect settings.

Step 2: Update Request Body

  • The request body is missing the prompt field, which is required for the model to generate a response.
  • Add the prompt field to the request body with the desired text.

Step 3: Modify Request Code

curl -sS -X POST 'http://localhost:8000/v1/chat/completions' \
  -H 'Content-Type: application/json' \
  -d '{
        "model": "LiquidAI/LFM2.5-VL-1.6B",
        "stream": true,
        "messages": [
          {
            "role": "user",
            "content": [
              {
                "type": "text",
                "text": "What is in this image?"
              },
              {
                "type": "image_url",
                "image_url": {
                  "url": "https://natureconservancy-h.assetsadobe.com/is/image/content/dam/tnc/nature/en/photos/b/l/Blue-jay-Matt-Williams.jpg?crop=0%2C11%2C4000%2C3000&wid=400&hei=300&scl=10.0"
                }
              }
            ]
          }
        ],
        "prompt": "Describe the image",  # Add this line
        "max_tokens": 300
      }'

Step 4: Verify Response

  • Run the modified request and verify that the model generates a response.
  • Check the response for any errors or missing fields.

Verification

  • Run the modified request and verify that the model generates a response.
  • Check the response for any errors or missing fields.

Extra Tips

  • Make

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

it should provide generated result

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING