mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[PR #7326] [MERGED] fix: Include Authorization header in /api/pull and /api/chat requests #37673
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/7326
Author: @bnodnarb
Created: 11/25/2024
Status: ✅ Merged
Merged: 11/25/2024
Merged by: @tjbck
Base:
dev← Head:fix/ollama-authentication📝 Commits (1)
8dc73e8Fix: Add authorization header with bearer token for remote Ollama server endpoints📊 Changes
1 file changed (+35 additions, -11 deletions)
View changed files
📝
backend/open_webui/apps/ollama/main.py(+35 -11)📄 Description
Changelog Entry
Description
This pull request fixes a significant functional issue where the Authorization header was not being passed to certain Ollama API endpoints, specifically
POST /api/pullandPOST /api/chat.As a result, these requests failed with a401 Unauthorizederror when the Ollama server required authentication.This issue has been highlighted in discussion thread #6856 and has also been confirmed in the Discord Development Channel
Fixed
POST /api/pullandPOST /api/chatendpoints. This omission caused requests to fail with a401 Unauthorizederror when connecting to an Ollama server that requires authentication.GET /api/versionandGET /api/tags.Users can now successfully perform actions such as pulling models and initiating chat sessions when connected to authenticated Ollama servers.
Additional Information
Demonstration of Bug (Before Fix)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.