mirror of
https://github.com/garrytan/gbrain.git
synced 2026-07-29 19:01:39 +00:00
Rework of #1988 against the post-#2981 cache-breakpoint placement. - ChatTouchpoint.supports_prompt_cache may now be function-valued (per-model-id); OpenRouter scopes it to anthropic/claude-* routes, so those stop classifying as degraded:no_caching. capabilities.ts + gateway's supportsCache gate handle both forms (fail-closed). - The system-block cache breakpoint additionally rides providerOptions.openaiCompatible on openai-compatible recipes (the anthropic key never reaches the compat wire); a new chat-scoped recipe fetch shim (compat.chatFetch) lifts the marker into OpenRouter's documented content-part cache_control shape before the request leaves the process. chatFetch deliberately does NOT displace the embedding path's asymmetric input_type shim the way compat.fetch would. Co-authored-by: tmchow <tmchow@users.noreply.github.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>