Model update API not recognizing model id #3828

Closed
opened 2025-11-11 15:40:45 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @Subhankar-Adak on GitHub (Feb 14, 2025).

Installation Method

I have installed open-webui with helm chart.
I have added new connections > Model is populating in model page.
Now, i need to update model parameters, like name and visibility using API call since i am automating the deployment.

As i trigger bellow command with admin token, it's throwing error, model not found.

root@wade1:/tmp# curl -X POST "http://100.98.240.54:3005/api/v1/models/model/update?id=Meta-Llama-3-8B"
-H "Content-Type: application/json"
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IExNy1hODhkLTI2Y2ZiMmMwMjI4ZiJ9.6xgaalgyVNWDFcaKsZVL6_u4uv1LT2jCZwHRUf6UOhI"
-d '{
"id": "Meta-Llama-3-8B",
"name": "llama32",
"meta": {
"description": "llama3"
},
"params": {
"max_tokens": 2000
},
"access_control": null
}'

output: {"detail":"We could not find what you're looking for :/"}

Interestingly, if admin manually makes any change on the model in UI, then going forward i can make model update using API also with same admin token. But this is not working unless admin first manually make any change on the model navigating to model page.

I feel, as model is first added, admin token doesn't get access to this model via API.

Environment

  • Open WebUI Version: [v5.4.0]

Logs and Screenshots

open-webui pod log:

INFO: 100.98.248.54:26840 - "POST /api/v1/models/model/update?id=Meta-Llama-3-8B HTTP/1.1" 401 Unauthorized

It's logging unauthorized, but token is correct .

Model detail once new connection created via API call:

Here model id is /model

{"data":[{"id":"/model","object":"model","created":0,"owned_by":"openai","name":"/model","openai":
{"id":"/model","object":"model","created":0,"owned_by":"/model"},"urlIdx":0,"actions":[]},

same model details, post admin navigates to model page and clocks on save button:

{"data":[{"id":"/model","object":"model","created":0,"owned_by":"openai","name":"/model","openai":
{"id":"/model","object":"model","created":0,"owned_by":"/model"},"urlIdx":0,"info":
{"id":"/model","user_id":"bcd11d8d-3ba8-4369-b401-47c8f8b49ba4","base_model_id":null,"name":"/model","params":{},"meta":{"profile_image_url":"/static/favicon.png","description":"","capabilities":{"vision":true,"citations":true},"suggestion_prompts":null,"tags":[]},"access_control":{"read":{"group_ids":[],"user_ids":[]},
"write":{"group_ids":[],"user_ids":[]}},"is_active":true,"updated_at":1739500883,"created_at":1739500883},"actions":[]},

As we can see, more info is getting added to model metadata as admin make interaction to the model in GUI.

Browser Console Logs:
[Include relevant browser console logs, if applicable]

Docker Container Logs:
[Include relevant Docker container logs, if applicable]

Screenshots/Screen Recordings (if applicable):
[Attach any relevant screenshots to help illustrate the issue]

Additional Information

[Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.]

Note

If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!

Originally created by @Subhankar-Adak on GitHub (Feb 14, 2025). ## Installation Method I have installed open-webui with helm chart. I have added new connections > Model is populating in model page. Now, i need to update model parameters, like name and visibility using **API** call since i am automating the deployment. As i trigger bellow command with admin token, it's throwing error, model not found. root@wade1:/tmp# curl -X POST "http://100.98.240.54:3005/api/v1/models/model/update?id=Meta-Llama-3-8B" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IExNy1hODhkLTI2Y2ZiMmMwMjI4ZiJ9.6xgaalgyVNWDFcaKsZVL6_u4uv1LT2jCZwHRUf6UOhI" \ -d '{ "id": "Meta-Llama-3-8B", "name": "llama32", "meta": { "description": "llama3" }, "params": { "max_tokens": 2000 }, "access_control": null }' **output: {"detail":"We could not find what you're looking for :/"}** Interestingly, if admin manually makes any change on the model in UI, then going forward i can make model update using API also with same admin token. But this is not working unless admin first manually make any change on the model navigating to model page. I feel, as model is first added, admin token doesn't get access to this model via API. ## Environment - **Open WebUI Version:** [v5.4.0] ## Logs and Screenshots open-webui pod log: INFO: 100.98.248.54:26840 - "POST /api/v1/models/model/update?id=Meta-Llama-3-8B HTTP/1.1" 401 Unauthorized It's logging unauthorized, but token is correct . **Model detail once new connection created via API call:** Here model id is /model {"data":[{"id":"/model","object":"model","created":0,"owned_by":"openai","name":"/model","openai": {"id":"/model","object":"model","created":0,"owned_by":"/model"},"urlIdx":0,"actions":[]}, **same model details, post admin navigates to model page and clocks on save button:** {"data":[{"id":"/model","object":"model","created":0,"owned_by":"openai","name":"/model","openai": {"id":"/model","object":"model","created":0,"owned_by":"/model"},"urlIdx":0,"info": {"id":"/model","user_id":"bcd11d8d-3ba8-4369-b401-47c8f8b49ba4","base_model_id":null,"name":"/model","params":{},"meta":{"profile_image_url":"/static/favicon.png","description":"","capabilities":{"vision":true,"citations":true},"suggestion_prompts":null,"tags":[]},"access_control":{"read":{"group_ids":[],"user_ids":[]}, "write":{"group_ids":[],"user_ids":[]}},"is_active":true,"updated_at":1739500883,"created_at":1739500883},"actions":[]}, As we can see, more info is getting added to model metadata as admin make interaction to the model in GUI. **Browser Console Logs:** [Include relevant browser console logs, if applicable] **Docker Container Logs:** [Include relevant Docker container logs, if applicable] **Screenshots/Screen Recordings (if applicable):** [Attach any relevant screenshots to help illustrate the issue] ## Additional Information [Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.] ## Note If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
Author
Owner

@Subhankar-Adak commented on GitHub (Feb 14, 2025):

Hi request to clarify on the behavior and possible solution to add and modify models via API call.

@Subhankar-Adak commented on GitHub (Feb 14, 2025): Hi request to clarify on the behavior and possible solution to add and modify models via API call.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#3828