Problem
Currently, the LLM cache uses a single COSCIENTIST_CACHE_ENABLED flag that controls both reading from and writing to the cache. This creates limitations for certain development and testing workflows.
Current behavior:
COSCIENTIST_CACHE_ENABLED=true → reads from cache AND writes to cache
COSCIENTIST_CACHE_ENABLED=false → no reads, no writes
Unsupported Use Cases
- Write-only mode (populate cache without using it)
- Testing with a new model/prompt and want fresh responses
- Populating cache for future runs without using stale cached data
- Debugging to force fresh LLM calls while still building cache2.
Read-only mode (use cache but don't update it)
- Using existing cache but preventing accidental overwrites
- Testing cache behavior without modifying it
Proposed Solution
Split the cache configuration. Use single variable with explicit modes
**COSCIENTIST_CACHE_MODE=read_write # Options: read_write, read_only, write_only, disabled
Implementation Details
The changes would need to be made in:
src/open_coscientist/cache.py - LLMCache class get() and set() methods, get_cache()
src/open_coscientist/llm.py - All cache.get() and cache.set() calls
Problem
Currently, the LLM cache uses a single
COSCIENTIST_CACHE_ENABLEDflag that controls both reading from and writing to the cache. This creates limitations for certain development and testing workflows.Current behavior:
COSCIENTIST_CACHE_ENABLED=true→ reads from cache AND writes to cacheCOSCIENTIST_CACHE_ENABLED=false→ no reads, no writesUnsupported Use Cases
Read-only mode (use cache but don't update it)
Proposed Solution
Split the cache configuration. Use single variable with explicit modes
**COSCIENTIST_CACHE_MODE=read_write # Options: read_write, read_only, write_only, disabled
Implementation Details
The changes would need to be made in:
src/open_coscientist/cache.py- LLMCache class get() and set() methods, get_cache()src/open_coscientist/llm.py- All cache.get() and cache.set() calls