[GH-ISSUE #7059] Various internal endpoints not working on a fresh install of 0.4.0 #14587

Closed
opened 2026-04-19 20:54:12 -05:00 by GiteaMirror · 10 comments
Owner

Originally created by @samling on GitHub (Nov 20, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/7059

Bug Report

Installation Method

Kubernetes

Environment

  • Open WebUI Version: v0.4.0

  • Operating System: Ubuntu 24 (host)

  • Browser (if applicable): Chrome 130.0.6723.119

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

Certain endpoints to function correctly:

  • Create user API key
  • Save model changes (e.g. visibility, tool selection)

Actual Behavior:

Client-side 404s hitting various internal open-webui API endpoints

Description

Bug Summary:
I was initially experiencing issues having upgraded an existing deployment, so I backed up everything and started fresh in an incognito tab to rule out migration and cache issues.

  • Attempting to create an API key throws an error in the console: Uncaught (in promise) TypeError: Cannot read properties of null (reading 'api_key')

The container logs show FastAPI errors:

open-webui-55c55cd9db-t2w48 open-webui                ^^^^^^^^^^^^^^^^^^^
open-webui-55c55cd9db-t2w48 open-webui   File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app
open-webui-55c55cd9db-t2w48 open-webui     raw_response = await run_endpoint_function(
open-webui-55c55cd9db-t2w48 open-webui                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
open-webui-55c55cd9db-t2w48 open-webui   File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
open-webui-55c55cd9db-t2w48 open-webui     return await dependant.call(**values)
open-webui-55c55cd9db-t2w48 open-webui            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
open-webui-55c55cd9db-t2w48 open-webui   File "/app/backend/open_webui/apps/webui/routers/auths.py", line 742, in create_api_key
open-webui-55c55cd9db-t2w48 open-webui     if not request.app.config.state.ENABLE_API_KEY:
open-webui-55c55cd9db-t2w48 open-webui            ^^^^^^^^^^^^^^^^^^
open-webui-55c55cd9db-t2w48 open-webui AttributeError: 'FastAPI' object has no attribute 'config'
  • Attempting to update a model setting seems to be hit or miss. Anecdotally it seems like I can (sometimes) save the first change to a model, but subsequent saves throw an error in the console: index.ts:170 POST https://open-webui.(mydomain)/api/v1/models/id/anthropic/claude-2/update 404 (Not Found)

Nothing extra in the container logs, just a 404 attempting to hit the endpoint.

Reproduction Details

Steps to Reproduce:

  1. Install open-webui 0.4.0 with no existing data

  2. Create an account

  3. Navigate to settings > account > "create new secret key"; observe console errors

  4. Add a model provider (maybe specific to litellm?)

  5. Edit a model, change the visibility to public, save (successful)

  6. Edit the same mode, change the visibility to private, save (unsuccessful)

Any help is appreciated. Thank you!

Originally created by @samling on GitHub (Nov 20, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/7059 # Bug Report ## Installation Method Kubernetes ## Environment - **Open WebUI Version:** v0.4.0 - **Operating System:** Ubuntu 24 (host) - **Browser (if applicable):** Chrome 130.0.6723.119 **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: Certain endpoints to function correctly: - Create user API key - Save model changes (e.g. visibility, tool selection) ## Actual Behavior: Client-side 404s hitting various internal open-webui API endpoints ## Description **Bug Summary:** I was initially experiencing issues having upgraded an existing deployment, so I backed up everything and started fresh in an incognito tab to rule out migration and cache issues. - Attempting to create an API key throws an error in the console: `Uncaught (in promise) TypeError: Cannot read properties of null (reading 'api_key')` The container logs show FastAPI errors: ``` open-webui-55c55cd9db-t2w48 open-webui ^^^^^^^^^^^^^^^^^^^ open-webui-55c55cd9db-t2w48 open-webui File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app open-webui-55c55cd9db-t2w48 open-webui raw_response = await run_endpoint_function( open-webui-55c55cd9db-t2w48 open-webui ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ open-webui-55c55cd9db-t2w48 open-webui File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function open-webui-55c55cd9db-t2w48 open-webui return await dependant.call(**values) open-webui-55c55cd9db-t2w48 open-webui ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ open-webui-55c55cd9db-t2w48 open-webui File "/app/backend/open_webui/apps/webui/routers/auths.py", line 742, in create_api_key open-webui-55c55cd9db-t2w48 open-webui if not request.app.config.state.ENABLE_API_KEY: open-webui-55c55cd9db-t2w48 open-webui ^^^^^^^^^^^^^^^^^^ open-webui-55c55cd9db-t2w48 open-webui AttributeError: 'FastAPI' object has no attribute 'config' ``` - Attempting to update a model setting seems to be hit or miss. Anecdotally it seems like I can (sometimes) save the first change to a model, but subsequent saves throw an error in the console: `index.ts:170 POST https://open-webui.(mydomain)/api/v1/models/id/anthropic/claude-2/update 404 (Not Found)` Nothing extra in the container logs, just a 404 attempting to hit the endpoint. ## Reproduction Details **Steps to Reproduce:** 1. Install open-webui 0.4.0 with no existing data 2. Create an account 3. Navigate to settings > account > "create new secret key"; observe console errors 1. Add a model provider (maybe specific to litellm?) 2. Edit a model, change the visibility to public, save (successful) 3. Edit the same mode, change the visibility to private, save (unsuccessful) Any help is appreciated. Thank you!
Author
Owner

@tjbck commented on GitHub (Nov 20, 2024):

Fixed on dev!

<!-- gh-comment-id:2487183102 --> @tjbck commented on GitHub (Nov 20, 2024): Fixed on dev!
Author
Owner

@samling commented on GitHub (Nov 20, 2024):

Unfortunately creating an API key still seems to be broken:

open-webui-5fcddfc59-7b89k open-webui   File "/app/backend/open_webui/apps/webui/routers/auths.py", line 748, in create_api_key
open-webui-5fcddfc59-7b89k open-webui     api_key = create_api_key()
open-webui-5fcddfc59-7b89k open-webui               ^^^^^^^^^^^^^^^^
open-webui-5fcddfc59-7b89k open-webui TypeError: create_api_key() missing 1 required positional argument: 'request'

The issue with saving models after the first update persists as well.

<!-- gh-comment-id:2487196767 --> @samling commented on GitHub (Nov 20, 2024): Unfortunately creating an API key still seems to be broken: ``` open-webui-5fcddfc59-7b89k open-webui File "/app/backend/open_webui/apps/webui/routers/auths.py", line 748, in create_api_key open-webui-5fcddfc59-7b89k open-webui api_key = create_api_key() open-webui-5fcddfc59-7b89k open-webui ^^^^^^^^^^^^^^^^ open-webui-5fcddfc59-7b89k open-webui TypeError: create_api_key() missing 1 required positional argument: 'request' ``` The issue with saving models after the first update persists as well.
Author
Owner

@tjbck commented on GitHub (Nov 20, 2024):

Should be fixed with the latest dev 😅

<!-- gh-comment-id:2487197326 --> @tjbck commented on GitHub (Nov 20, 2024): Should be fixed with the latest dev 😅
Author
Owner

@samling commented on GitHub (Nov 20, 2024):

Appreciate the super quick fixes! Happy to keep trying them as they roll out. 😄

<!-- gh-comment-id:2487198536 --> @samling commented on GitHub (Nov 20, 2024): Appreciate the super quick fixes! Happy to keep trying them as they roll out. 😄
Author
Owner

@tjbck commented on GitHub (Nov 20, 2024):

As for the other issue, the model id containing '/' is not supported. You might want to try deleting the model if possible!

<!-- gh-comment-id:2487210495 --> @tjbck commented on GitHub (Nov 20, 2024): As for the other issue, the model id containing '/' is not supported. You might want to try deleting the model if possible!
Author
Owner

@samling commented on GitHub (Nov 20, 2024):

Got it - did that change in this version? They were working properly in 0.3.x. It's a naming convention I use in litellm to quickly find models by provider. Saving does work at least once, but maybe that creates a record that then has issues on subsequent updates?

<!-- gh-comment-id:2487216423 --> @samling commented on GitHub (Nov 20, 2024): Got it - did that change in this version? They were working properly in 0.3.x. It's a naming convention I use in litellm to quickly find models by provider. Saving does work at least once, but maybe that creates a record that then has issues on subsequent updates?
Author
Owner

@samling commented on GitHub (Nov 20, 2024):

I can confirm creating an API key works and removing / from the model name fixes the other issue. Still not sure if the latter is a regression, but it's a small ask to update my model names to avoid the issue. Many thanks!

<!-- gh-comment-id:2487222256 --> @samling commented on GitHub (Nov 20, 2024): I can confirm creating an API key works and removing `/` from the model name fixes the other issue. Still not sure if the latter is a regression, but it's a small ask to update my model names to avoid the issue. Many thanks!
Author
Owner

@tjbck commented on GitHub (Nov 20, 2024):

Updated the endpoints to allow / in the id, but I'd strongly discourage using / in the id in general, as they can be used as a part of url path parameters. Everything should work as intended now I believe, 0.4.1 will be released shortly!

<!-- gh-comment-id:2487231037 --> @tjbck commented on GitHub (Nov 20, 2024): Updated the endpoints to allow `/` in the id, but I'd strongly discourage using `/` in the id in general, as they can be used as a part of url path parameters. Everything should work as intended now I believe, 0.4.1 will be released shortly!
Author
Owner

@samling commented on GitHub (Nov 20, 2024):

Understood, I totally understand from an API ambiguity perspective. Thank you so much!

<!-- gh-comment-id:2487236445 --> @samling commented on GitHub (Nov 20, 2024): Understood, I totally understand from an API ambiguity perspective. Thank you so much!
Author
Owner

@JunweiDuan commented on GitHub (Nov 25, 2024):

Solved or not? I meet the same issue, urgent, urgent, urgent.

<!-- gh-comment-id:2497279817 --> @JunweiDuan commented on GitHub (Nov 25, 2024): Solved or not? I meet the same issue, urgent, urgent, urgent.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#14587