unrecognizedProperty cache_control
OpenCodeReview Version
v1.8.5 (582953937) linux/amd64
Operating System
Linux (x86_64)
Installation Method
npm (global)
LLM Provider
Anthropic (Claude)
Bug Description
[ocr] Subtask error for pom.xml: LLM completion error: POST "<redacted>": 400 Bad Request {"errorCode":"INVALID_ARGUMENT","errorName":"LanguageModelService:InvalidRequest","errorInstanceId":"b5d73937-d0f4-4dbc-b5ce-1eb5bb3bd40c","parameters":{"unsafeParams":"{unrecognizedProperty=cache_control}","message":"Request contained an unrecognized field"}}
Is it possible to remove this cache_control via configuration?
BTW: ocr llm test was successful
Source: OCR environment
URL: <redacted>
Model: <redacted>
I am Open-Code-Review, a command-line code review assistant developed by Alibaba, designed to help analyze and review code directly in your terminal environment.
✓ Connection test successful
Steps to Reproduce
Expected Behavior
Logs / Error Output
Additional Context
No response
Thanks for reporting this! This is a valid issue — when using a proxy/gateway that doesn't support Anthropic's prompt caching, the cache_control field in the request causes a 400 error.
We plan to support disabling the cache_control field via configuration, for example:
ocr config set llm.prompt_caching false- Interactive provider setup (
ocr config setup) will also include an option to toggle this
This should give users full control over whether prompt caching headers are sent, making OCR compatible with proxies that don't recognize this field.
I'd like to take this — add a config switch (e.g. llm.prompt_caching) so cache_control can be disabled for proxies that reject the field, including the interactive setup toggle.
AI disclosure: I'll use Cursor Cloud Agent (model: grok-4.7) to help; I'll review every line myself before opening the PR.