Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serverless Inference API OpenAI /v1/chat/completions route broken #2946

Open
1 of 4 tasks
pelikhan opened this issue Jan 23, 2025 · 1 comment
Open
1 of 4 tasks

Serverless Inference API OpenAI /v1/chat/completions route broken #2946

pelikhan opened this issue Jan 23, 2025 · 1 comment

Comments

@pelikhan
Copy link

System Info

Trying to access the serverless inference endpoints using the OpenAI compatible route leads to status 400.

Invalid URL: missing field `name`

Information

  • Docker
  • The CLI directly

Tasks

  • An officially supported command
  • My own modifications

Reproduction

Here is a curl command to run inference, requires to setup your HF_TOKEN.

curl https://api-inference.huggingface.co/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HF_TOKEN" \
-d '{
  "model": "meta-llama/Llama-3.3-70B-Instruct",
  "messages": [
    {
      "role": "user",
      "content": "Write a short poem."
    }
  ]
}'

Expected behavior

This endpoint should be "openai" compatible.

@mzyil
Copy link

mzyil commented Jan 24, 2025

+1
The same request works in this URL format though:

https://api-inference.huggingface.co/models/meta-llama/Llama-3.3-70B-Instruct/v1/chat/completions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants