You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In v1.8.2, when both a provider config (~/.opencodereview/config.json) and environment variables (OCR_LLM_URL / OCR_LLM_TOKEN / OCR_LLM_MODEL) are set, the config file silently wins. In older versions, e.g. v1.3.1, env vars took precedence.
Root cause
internal/llm/resolver.go L71–79 defines the resolution order as:
1. OCR config file ← currently wins
2. OCR environment vars
3. Claude Code environment
4. Shell rc file
Why this is a problem
CI/CD: A stale config.json on a shared runner silently overrides the OCR_LLM_* env vars set by the pipeline — no warning, wrong model used, hard to debug.
Convention: Nearly all CLI tools (aws, gh, docker) follow "env > config file". Users expect export OCR_LLM_MODEL=foo to override a file.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Problem
In v1.8.2, when both a provider config (
~/.opencodereview/config.json) and environment variables (OCR_LLM_URL/OCR_LLM_TOKEN/OCR_LLM_MODEL) are set, the config file silently wins. In older versions, e.g. v1.3.1, env vars took precedence.Root cause
internal/llm/resolver.goL71–79 defines the resolution order as:Why this is a problem
config.jsonon a shared runner silently overrides theOCR_LLM_*env vars set by the pipeline — no warning, wrong model used, hard to debug.export OCR_LLM_MODEL=footo override a file.Proposal
Swap the first two strategies:
Additionally, emit a warning to stderr when both sources are present and one is ignored.
All reactions