📦 Montscan v1.3.1
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_CTXSetting: New environment variable to control the context window (in tokens) requested from Ollama per call, default8192- 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.examplenow documentOLLAMA_NUM_CTX
Configuration
Raise the Ollama context window if you see exceeds the available context size errors in the Ollama logs:
OLLAMA_NUM_CTX=8192WebDAV debug logging requires no configuration, it's on by default and only logs when a request fails.
Technical Details
- Added an
Options.NumCtxfield to the/api/chatrequest body inagent/ollama.go - Added
OllamaNumCtxtoconfig/config.go, read fromOLLAMA_NUM_CTX(default8192) - Added a
debugTransporthttp.RoundTripperwrapper inproviders/webdav.gothat logs response bodies (up to 4KB) for any WebDAV request returning a 4xx/5xx status - Updated
docker-compose.yml,.env.example, andREADME.mdto documentOLLAMA_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