[PR #6278] [CLOSED] cmd: print proxy info when OLLAMA_DEBUG is true #37941

Closed
opened 2026-04-22 22:36:25 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/6278
Author: @zhangyunhao116
Created: 8/9/2024
Status: Closed

Base: mainHead: debug/proxy


📝 Commits (1)

  • 07c45d6 cmd: print proxy info when OLLAMA_DEBUG is true

📊 Changes

1 file changed (+9 additions, -0 deletions)

View changed files

📝 api/client.go (+9 -0)

📄 Description

This PR prints proxy information when OLLAMA_DEBUG is true.

I've noticed that users often encounter issues with HTTP proxy in their environment(like https://github.com/ollama/ollama/issues/6195 https://github.com/ollama/ollama/issues/4834), but setting OLLAMA_DEBUG to true doesn't provide additional debugging infos for this problem. All we got was something went wrong, please see the ollama server logs for details. Since this response comes from the HTTP proxy instead of the OLLAMA server, we still can't see anything in the server's log.

For my case, the proxy server will return 502 without any content for all requests to localhost. When I run ollama ps, the something went wrong, please see the ollama server logs for details is the only thing I can see.
After this PR, when I run env OLLAMA_DEBUG=1 ollama ps, I can see

proxy found: http://url.to.my.proxy
Error: something went wrong, please see the ollama server logs for details

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/6278 **Author:** [@zhangyunhao116](https://github.com/zhangyunhao116) **Created:** 8/9/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `debug/proxy` --- ### 📝 Commits (1) - [`07c45d6`](https://github.com/ollama/ollama/commit/07c45d6197cb00cb1ce855f5b3557bba9fc08a70) cmd: print proxy info when OLLAMA_DEBUG is true ### 📊 Changes **1 file changed** (+9 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `api/client.go` (+9 -0) </details> ### 📄 Description This PR prints proxy information when OLLAMA_DEBUG is true. I've noticed that users often encounter issues with HTTP proxy in their environment(like https://github.com/ollama/ollama/issues/6195 https://github.com/ollama/ollama/issues/4834), but setting OLLAMA_DEBUG to true doesn't provide additional debugging infos for this problem. All we got was `something went wrong, please see the ollama server logs for details`. Since this response comes from the HTTP proxy instead of the OLLAMA server, we still can't see anything in the server's log. For my case, the proxy server will return 502 without any content for all requests to localhost. When I run `ollama ps`, the `something went wrong, please see the ollama server logs for details` is the only thing I can see. After this PR, when I run `env OLLAMA_DEBUG=1 ollama ps`, I can see ``` proxy found: http://url.to.my.proxy Error: something went wrong, please see the ollama server logs for details ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-22 22:36:25 -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#37941