π¦ ClawHub
Responses Third-Party Prompt Cache Patch
by @tsunheimat
Patch an installed OpenClaw dist bundle so third-party OpenAI-compatible Responses endpoints keep prompt_cache_key and prompt_cache_retention instead of havi...
TERMINAL
clawhub install responses-third-party-prompt-cache-patchπ About This Skill
name: responses-third-party-prompt-cache-patch description: Patch an installed OpenClaw dist bundle so third-party OpenAI-compatible Responses endpoints keep prompt_cache_key and prompt_cache_retention instead of having them stripped. Use when the user wants a local patch on a machine running OpenClaw, not an upstream refactor or config change, and needs a workflow with dry-run, backup, rollback, syntax validation, and upgrade-aware reapply.
Responses Third Party Prompt Cache Patch
Patch the installed OpenClaw dist bundle so shouldStripResponsesPromptCache(model) stops deleting prompt_cache_key and prompt_cache_retention for third-party OpenAI-compatible Responses endpoints.
Source: https://github.com/tsunheimat/openclaw-responses-prompt-cache-patch
Quick install for OpenClaw
clawhub install responses-third-party-prompt-cache-patch --workdir ~/.openclaw/workspace
Risks
dist/.Quick start
Run from this skill directory:
python3 scripts/patch_prompt_cache.py --dry-run
python3 scripts/patch_prompt_cache.py
openclaw gateway restart
Roll back
python3 scripts/revert_prompt_cache.py
openclaw gateway restart
Target selection
openclaw executable.--root /path/to/openclaw to patch a copied fixture or a different installation.dist/pi-embedded-*.js first, then fall back to other dist/*.js bundles only if the target function moved.What the scripts do
scripts/patch_prompt_cache.py
--dry-runshouldStripResponsesPromptCache(model)node --check after writingscripts/revert_prompt_cache.py
--dry-runnode --checkRecommended verification flow
1. Run --dry-run on the real installation.
2. Copy the target bundle into a fixture and run --root for real apply testing.
3. Run apply again to confirm idempotency.
4. Run rollback on the same fixture.
π‘ Examples
Run from this skill directory:
python3 scripts/patch_prompt_cache.py --dry-run
python3 scripts/patch_prompt_cache.py
openclaw gateway restart