[PR #15946] docs(cmd/serve): list OLLAMA_DEBUG_LOG_REQUESTS in serve --help #77665

Open
opened 2026-05-05 10:20:28 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15946
Author: @Anai-Guo
Created: 5/3/2026
Status: 🔄 Open

Base: mainHead: fix/serve-help-debug-log-requests


📝 Commits (1)

  • a75af3f docs(cmd/serve): list OLLAMA_DEBUG_LOG_REQUESTS in serve --help

📊 Changes

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

View changed files

📝 cmd/cmd.go (+1 -0)

📄 Description

Summary

OLLAMA_DEBUG_LOG_REQUESTS=1 is a supported env var (added in #14106) that turns on request-body logging and curl-replay-command emission for inference requests. It's registered in envconfig/config.go and consumed by server/inference_request_log.go, but it was not in the env-var list rendered by ollama serve --help, so users had no CLI-discoverable hint that it exists.

This PR adds it to the serveCmd env-doc block in cmd/cmd.go, placed right after OLLAMA_DEBUG since the two are conceptually paired (both control debug instrumentation).

After this change, ollama serve --help will include the line:

OLLAMA_DEBUG_LOG_REQUESTS  Log inference request bodies and replay curl commands to a temp directory

(description text comes from the existing registration in envconfig/config.go:308).

Why

Without this entry, the only way to learn about OLLAMA_DEBUG_LOG_REQUESTS is reading source or finding the original PR — which is exactly what the reporter in #15945 had to do. Listing every supported env var in --help is the existing convention; this just closes the gap.

Test plan

  • git diff shows a single +1/-0 change to cmd/cmd.go
  • go build ./... passes (CI)
  • ollama serve --help includes OLLAMA_DEBUG_LOG_REQUESTS between OLLAMA_DEBUG and OLLAMA_HOST

Fixes #15945

🤖 Generated with Claude Code


🔄 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/15946 **Author:** [@Anai-Guo](https://github.com/Anai-Guo) **Created:** 5/3/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/serve-help-debug-log-requests` --- ### 📝 Commits (1) - [`a75af3f`](https://github.com/ollama/ollama/commit/a75af3fcf93838049df645090ee8b3cd7cb02433) docs(cmd/serve): list OLLAMA_DEBUG_LOG_REQUESTS in serve --help ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+1 -0) </details> ### 📄 Description ## Summary `OLLAMA_DEBUG_LOG_REQUESTS=1` is a supported env var (added in #14106) that turns on request-body logging and curl-replay-command emission for inference requests. It's registered in `envconfig/config.go` and consumed by `server/inference_request_log.go`, but it was not in the env-var list rendered by `ollama serve --help`, so users had no CLI-discoverable hint that it exists. This PR adds it to the `serveCmd` env-doc block in `cmd/cmd.go`, placed right after `OLLAMA_DEBUG` since the two are conceptually paired (both control debug instrumentation). After this change, `ollama serve --help` will include the line: ``` OLLAMA_DEBUG_LOG_REQUESTS Log inference request bodies and replay curl commands to a temp directory ``` (description text comes from the existing registration in `envconfig/config.go:308`). ## Why Without this entry, the only way to learn about `OLLAMA_DEBUG_LOG_REQUESTS` is reading source or finding the original PR — which is exactly what the reporter in #15945 had to do. Listing every supported env var in `--help` is the existing convention; this just closes the gap. ## Test plan - [x] `git diff` shows a single +1/-0 change to `cmd/cmd.go` - [ ] `go build ./...` passes (CI) - [ ] `ollama serve --help` includes `OLLAMA_DEBUG_LOG_REQUESTS` between `OLLAMA_DEBUG` and `OLLAMA_HOST` Fixes #15945 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <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-05-05 10:20:28 -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#77665