Skip to content

📦 Montscan v1.3.1

Choose a tag to compare

@sh4den sh4den released this 19 Jul 21:03
· 5 commits to main since this release
9a1c826

What's New

Configurable Ollama Context Window

Vision requests to Ollama could fail with exceeds the available context size once a scanned image plus the naming prompt pushed past Ollama's 4096-token default. Montscan now explicitly requests a larger context window per call, configurable via OLLAMA_NUM_CTX (default 8192).

WebDAV Failure Diagnostics

WebDAV upload failures previously only surfaced a bare status code (e.g. Write foo.pdf: 502), which isn't enough to tell what actually went wrong. Montscan now captures and logs the response body of failed WebDAV requests, exposing the real error returned by the server or reverse proxy.

Changes

  • OLLAMA_NUM_CTX Setting: New environment variable to control the context window (in tokens) requested from Ollama per call, default 8192
  • WebDAV Debug Logging: Failed WebDAV requests (MkdirAll, Write) now log the HTTP status and response body instead of just a status code
  • Documentation Updates: README and .env.example now document OLLAMA_NUM_CTX

Configuration

Raise the Ollama context window if you see exceeds the available context size errors in the Ollama logs:

OLLAMA_NUM_CTX=8192

WebDAV debug logging requires no configuration, it's on by default and only logs when a request fails.

Technical Details

  • Added an Options.NumCtx field to the /api/chat request body in agent/ollama.go
  • Added OllamaNumCtx to config/config.go, read from OLLAMA_NUM_CTX (default 8192)
  • Added a debugTransport http.RoundTripper wrapper in providers/webdav.go that logs response bodies (up to 4KB) for any WebDAV request returning a 4xx/5xx status
  • Updated docker-compose.yml, .env.example, and README.md to document OLLAMA_NUM_CTX

Upgrade Notes

OLLAMA_NUM_CTX defaults to 8192, doubling the context memory Ollama reserves versus its own 4096 default, a negligible increase on typical hardware. No action is required unless you're running Ollama in a memory-constrained environment, in which case set OLLAMA_NUM_CTX=4096 to keep the prior behavior.


Full Changelog: View commits since v1.3.0