bytedance / bytedance/UI-TARS-desktop

[Bug]: Getting "Error 404 status code (no body)" with Hugging Face deployment

Open
#577 6 comments 0 reactions 0 assignees View on GitHub
Bug
Dominant language
TypeScript
Stars
39k
Forks
3.9k
PR merge metrics
No merged PRs in 30d

Description

### Version

v0.1.0

### Model

UI-TARS-1.5-7B

### Deployment Method

Cloud

### Issue Description

**Describe the bug**
When using Hugging Face for UI-TARS-1.5 as the VLM provider in UI-TARS-desktop, the application consistently returns a "404 Not Found" error, preventing it from generating responses. I have checked my settings (Provider, Base URL, API Key, Model Name) multiple times and I also ran a direct API call via cURL, relying on the provided test cURL example in the Hugging Face inference endpoint platform

TSteps to reproduce the behavior:

1. Go to 'Settings' -> 'VLM Settings'.
2. Select 'Hugging Face for UI-TARS-1.5' as the 'VLM Provider'.
3. Enter the correct 'VLM Base URL': https://dx8w45x81yjxhhqt.us-east-1.aws.endpoints.huggingface.cloud/v1/chat/completions.
4. Enter the correct 'VLM API Key' obtained from Hugging Face.
5. Enter the correct 'VLM Model Name' (ui-tars-1-5-7b-tek).
6. Click 'Save'.
7. Restart UI-TARS-desktop.
8. Attempt to interact with the agent (ask a simple question like "Hello!").
9. See error: "Error 404 status code (no body)".

**Expected behavior**
The agent should connect to the Hugging Face API and respond, similar to the successful curl test.

**Screnshots**

- Screenshot showing the 404 error within UI-TARS-desktop.

- Screenshot showing the correctly configured VLM Settings page in UI-TARS-desktop.

**Troubleshooting Steps Taken**

- Initially encountered AuthenticationError, which was resolved by correcting the API Key.
- Subsequently encountered 404 Not Found errors.
- Verified VLM Provider selection is correct ("Hugging Face for UI-TARS-1.5").
- Verified VLM Base URL is exactly `https://dx8w45x81yjxhhqt.us-east-1.aws.endpoints.huggingface.cloud/v1/chat/completions ` (also tested base URL variations `https://dx8w45x81yjxhhqt.us-east-1.aws.endpoints.huggingface.cloud` and `https://dx8w45x81yjxhhqt.us-east-1.aws.endpoints.huggingface.cloud/v1/` - which also resulted in 404).
- Verified VLM API Key is correct by copy-pasting directly from Hugging Face platform.
- Verified VLM Model Name is correct by copy-pasting from the Inference Endpoints platform.
- Confirmed settings were saved.
- Restarted UI-TARS-desktop multiple times.
- Crucially, performed a direct API call using curl with the exact same Base URL, API Key, and Model Name, which succeeded without any errors.

**Successful curl Command (API Key masked):**

```
curl "https://dx8w45x81yjxhhqt.us-east-1.aws.endpoints.huggingface.cloud/v1/chat/completions" -X POST -H "Authorization: Bearer hf_XXXXX" -H "Content-Type: application/json" -d "{\"model\": \"tgi\", \"messages\": [ { \"role\": \"user\", \"content\": [{ \"type\": \"text\", \"text\": \"Hello!\" } ] } ], \"max_tokens\": 150, \"stream\": true }"
```

**Successful curl Response:**
```
data: {"object":"chat.completion.chunk","id":"","created":1746785649,"model":"/repository","system_fingerprint":"3.2.1-sha-4d28897","choices":[{"index":0,"delta":{"role":"assistant","content":"Hello"},"logprobs":null,"finish_reason":null}],"usage":null}

data: {"object":"chat.completion.chunk","id":"","created":1746785649,"model":"/repository","system_fingerprint":"3.2.1-sha-4d28897","choices":[{"index":0,"delta":{"role":"assistant","content":"!"},"logprobs":null,"finish_reason":null}],"usage":null}

data: {"object":"chat.completion.chunk","id":"","created":1746785649,"model":"/repository","system_fingerprint":"3.2.1-sha-4d28897","choices":[{"index":0,"delta":{"role":"assistant","content":" How"},"logprobs":null,"finish_reason":null}],"usage":null}

data: {"object":"chat.completion.chunk","id":"","created":1746785649,"model":"/repository","system_fingerprint":"3.2.1-sha-4d28897","choices":[{"index":0,"delta":{"role":"assistant","content":" can"},"logprobs":null,"finish_reason":null}],"usage":null}

data: {"object":"chat.completion.chunk","id":"","created":1746785649,"model":"/repository","system_fingerprint":"3.2.1-sha-4d28897","choices":[{"index":0,"delta":{"role":"assistant","content":" I"},"logprobs":null,"finish_reason":null}],"usage":null}

data: {"object":"chat.completion.chunk","id":"","created":1746785649,"model":"/repository","system_fingerprint":"3.2.1-sha-4d28897","choices":[{"index":0,"delta":{"role":"assistant","content":" help"},"logprobs":null,"finish_reason":null}],"usage":null}

data: {"object":"chat.completion.chunk","id":"","created":1746785649,"model":"/repository","system_fingerprint":"3.2.1-sha-4d28897","choices":[{"index":0,"delta":{"role":"assistant","content":" you"},"logprobs":null,"finish_reason":null}],"usage":null}

data: {"object":"chat.completion.chunk","id":"","created":1746785650,"model":"/repository","system_fingerprint":"3.2.1-sha-4d28897","choices":[{"index":0,"delta":{"role":"assistant","content":" today"},"logprobs":null,"finish_reason":null}],"usage":null}

data: {"object":"chat.completion.chunk","id":"","created":1746785650,"model":"/repository","system_fingerprint":"3.2.1-sha-4d28897","choices":[{"index":0,"delta":{"role":"assistant","content":"?"},"logprobs":null,"finish_reason":null}],"usage":null}

data: {"object":"chat.completion.chunk","id":"","created":1746785650,"model":"/repository","system_fingerprint":"3.2.1-sha-4d28897","choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":"stop"}],"usage":null}
```

**Desktop OS:** Windows 11

**UI-TARS-desktop Version:** 0.1.0

**Additional context**

- I am a complete beginner, so please let me know if I have missed anything important in the bug description.
- My issue is almost exactly the same as described in https://github.com/bytedance/UI-TARS-desktop/issues/568 with only the VLM provider being different (Hugging Face instead of VolcEngine)

### Error Logs

![Image](https://github.com/user-attachments/assets/5bd162f7-b6ea-4b99-9158-0fc7c685f914)

![Image](https://github.com/user-attachments/assets/b6aee637-d6a4-448f-9bb5-75ebb765ac2a)

Contributor guide

Open the contributing guide

Research direction

Start at the desktop VLM Settings flow and the Hugging Face provider request path, comparing the application's request with the successful curl command in the issue. Verify how the configured base URL and model name are sent, then reproduce the request and confirm that the agent receives a response instead of a 404.

Written by the indexing model from the issue text.

Assessment

Tech stack
huggingface, typescript
Domain
ai, api, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.