code-context-engine icon indicating copy to clipboard operation
code-context-engine copied to clipboard

Possibility to configure external Ollama server

Open roycornelissen opened this issue 7 months ago • 1 comments

First off: thanks for creating this, very promising and helpful!

I noticed that CCE scans for a local install of Ollama. I have a Mac running Ollama in my network for this kind of stuff, is it possible to configure that in my config when no local is installed or as a fallback? Couldn't really find an option for it in the configuration file.

There would need to be some kind of graceful degradation I guess for when that server is not available.

roycornelissen avatar May 04 '26 06:05 roycornelissen

Shipped — opened PR #25.

Adds compression.ollama_url to config (defaults to http://localhost:11434) plus a CCE_OLLAMA_URL env var that wins over the config value, so you can either set it once globally or override per-shell:

# ~/.cce/config.yaml
compression:
  ollama_url: http://your-mac.local:11434
# or
export CCE_OLLAMA_URL=http://your-mac.local:11434

The graceful-degradation you asked about is already there: Compressor probes the endpoint every 30s and falls back to truncation-only compression when it can't reach the server, so a flaky remote link downgrades compression quality but doesn't break anything.

A couple of small UX wins also rolled in:

  • cce services now reports the configured host (e.g. nas.local:11434 (external)), and shows (remote, unreachable) when a configured remote isn't responding — so you can tell at a glance whether compression is degraded.
  • cce start ollama refuses (with a clear message) when a remote URL is configured, instead of silently spawning a local daemon nothing in CCE talks to.

Will land once it gets review. Thanks for the suggestion!

fazleelahhee avatar May 04 '26 07:05 fazleelahhee