ollama - ✅(Solved) Fix `OLLAMA_DEBUG_LOG_REQUESTS` is missing from `ollama serve --help`. [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
ollama/ollama#15945Fetched 2026-05-04 04:58:28
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
cross-referenced ×1labeled ×1referenced ×1

Fix Action

Fixed

PR fix notes

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

Description (problem / solution / changelog)

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

Changed files

  • cmd/cmd.go (modified, +1/-0)

Code Example

$ ollama serve --help
Start Ollama

Usage:
  ollama serve [flags]

Aliases:
  serve, start

Flags:
  -h, --help   help for serve

Environment Variables:
      OLLAMA_DEBUG               Show additional debug information (e.g. OLLAMA_DEBUG=1)
      OLLAMA_HOST                IP Address for the ollama server (default 127.0.0.1:11434)
      OLLAMA_CONTEXT_LENGTH      Context length to use unless otherwise specified (default: 4k/32k/256k based on VRAM)
      OLLAMA_KEEP_ALIVE          The duration that models stay loaded in memory (default "5m")
      OLLAMA_MAX_LOADED_MODELS   Maximum number of loaded models per GPU
      OLLAMA_MAX_QUEUE           Maximum number of queued requests
      OLLAMA_MODELS              The path to the models directory
      OLLAMA_NUM_PARALLEL        Maximum number of parallel requests
      OLLAMA_NO_CLOUD            Disable Ollama cloud features (remote inference and web search)
      OLLAMA_NOPRUNE             Do not prune model blobs on startup
      OLLAMA_ORIGINS             A comma separated list of allowed origins
      OLLAMA_SCHED_SPREAD        Always schedule model across all GPUs
      OLLAMA_FLASH_ATTENTION     Enabled flash attention
      OLLAMA_KV_CACHE_TYPE       Quantization type for the K/V cache (default: f16)
      OLLAMA_LLM_LIBRARY         Set LLM library to bypass autodetection
      OLLAMA_GPU_OVERHEAD        Reserve a portion of VRAM per GPU (bytes)
      OLLAMA_LOAD_TIMEOUT        How long to allow model loads to stall before giving up (default "5m")

---
RAW_BUFFERClick to expand / collapse

What is the issue?

The OLLAMA_DEBUG_LOG_REQUESTS=1 env var enables request logging:

But that is not listed in the output of ollama serve --help:

$ ollama serve --help
Start Ollama

Usage:
  ollama serve [flags]

Aliases:
  serve, start

Flags:
  -h, --help   help for serve

Environment Variables:
      OLLAMA_DEBUG               Show additional debug information (e.g. OLLAMA_DEBUG=1)
      OLLAMA_HOST                IP Address for the ollama server (default 127.0.0.1:11434)
      OLLAMA_CONTEXT_LENGTH      Context length to use unless otherwise specified (default: 4k/32k/256k based on VRAM)
      OLLAMA_KEEP_ALIVE          The duration that models stay loaded in memory (default "5m")
      OLLAMA_MAX_LOADED_MODELS   Maximum number of loaded models per GPU
      OLLAMA_MAX_QUEUE           Maximum number of queued requests
      OLLAMA_MODELS              The path to the models directory
      OLLAMA_NUM_PARALLEL        Maximum number of parallel requests
      OLLAMA_NO_CLOUD            Disable Ollama cloud features (remote inference and web search)
      OLLAMA_NOPRUNE             Do not prune model blobs on startup
      OLLAMA_ORIGINS             A comma separated list of allowed origins
      OLLAMA_SCHED_SPREAD        Always schedule model across all GPUs
      OLLAMA_FLASH_ATTENTION     Enabled flash attention
      OLLAMA_KV_CACHE_TYPE       Quantization type for the K/V cache (default: f16)
      OLLAMA_LLM_LIBRARY         Set LLM library to bypass autodetection
      OLLAMA_GPU_OVERHEAD        Reserve a portion of VRAM per GPU (bytes)
      OLLAMA_LOAD_TIMEOUT        How long to allow model loads to stall before giving up (default "5m")

Relevant log output

OS

macOS

GPU

No response

CPU

No response

Ollama version

0.22.0

extent analysis

TL;DR

The OLLAMA_DEBUG_LOG_REQUESTS environment variable is not listed in the output of ollama serve --help, suggesting a potential documentation issue.

Guidance

  • Review the documentation for ollama serve to ensure all environment variables are properly listed.
  • Check the code changes introduced in https://github.com/ollama/ollama/pull/14106 to see if the variable was intended to be included in the help output.
  • Verify that the OLLAMA_DEBUG_LOG_REQUESTS environment variable is indeed functional by setting it to 1 and checking for the expected logging behavior.
  • Consider submitting a pull request or issue to update the ollama serve --help output to include the missing environment variable.

Notes

The issue seems to be related to documentation rather than a functional problem with the OLLAMA_DEBUG_LOG_REQUESTS variable itself.

Recommendation

Apply workaround: use the OLLAMA_DEBUG_LOG_REQUESTS environment variable as intended, despite it not being listed in the help output, and consider submitting a documentation update.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

ollama - ✅(Solved) Fix `OLLAMA_DEBUG_LOG_REQUESTS` is missing from `ollama serve --help`. [1 pull requests, 1 participants]