[PR #10704] Client request hook #13334

Closed
opened 2026-04-13 00:24:10 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/ollama/ollama/pull/10704

State: closed
Merged: No


This adds an optional Hook field to Client, which allows modifying a *http.Request before it is sent.

My usecase for this is to allow using the Open WebUI passthrough Ollama API which requires adding an "Authorization" header. Rather than limiting it to this, I figure there might be more usecases and adding a hook function is as easy as supporting the specific header.

**Original Pull Request:** https://github.com/ollama/ollama/pull/10704 **State:** closed **Merged:** No --- This adds an optional `Hook` field to `Client`, which allows modifying a `*http.Request` before it is sent. My usecase for this is to allow using the Open WebUI passthrough Ollama API which requires adding an "Authorization" header. Rather than limiting it to this, I figure there might be more usecases and adding a hook function is as easy as supporting the specific header.
GiteaMirror added the pull-request label 2026-04-13 00:24:10 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#13334