hermes-agent/website/docs/reference
kshitij 457c7b76cd
feat(openrouter): add response caching support (#19132)
Enable OpenRouter's response caching feature (beta) via X-OpenRouter-Cache
headers. When enabled, identical API requests return cached responses for
free (zero billing), reducing both latency and cost.

Configuration via config.yaml:
  openrouter:
    response_cache: true       # default: on
    response_cache_ttl: 300    # 1-86400 seconds

Changes:
- Add openrouter config section to DEFAULT_CONFIG (response_cache + TTL)
- Add build_or_headers() in auxiliary_client.py that builds attribution
  headers plus optional cache headers based on config
- Replace inline _OR_HEADERS dicts with build_or_headers() at all 5 sites:
  run_agent.py __init__, _apply_client_headers_for_base_url(), and
  auxiliary_client.py _try_openrouter() + _to_async_client()
- Add _check_openrouter_cache_status() method to AIAgent that reads
  X-OpenRouter-Cache-Status from streaming response headers and logs
  HIT/MISS status
- Document in cli-config.yaml.example
- Add 28 tests (22 unit + 6 integration)

Ref: https://openrouter.ai/docs/guides/features/response-caching
2026-05-03 01:54:24 -07:00
..
_category_.json feat: add documentation website (Docusaurus) 2026-03-05 05:24:55 -08:00
cli-commands.md fix(curator): defer first run and add --dry-run preview (#18373) (#18389) 2026-05-01 09:49:59 -07:00
environment-variables.md feat(openrouter): add response caching support (#19132) 2026-05-03 01:54:24 -07:00
faq.md docs(faq): Update docs on backups 2026-04-24 15:14:08 -07:00
mcp-config-reference.md docs: comprehensive documentation audit — fix 9 HIGH, 20+ MEDIUM gaps (#4087) 2026-03-30 17:15:21 -07:00
model-catalog.md feat(models): remote model catalog manifest for OpenRouter + Nous Portal (#16033) 2026-04-26 05:46:43 -07:00
optional-skills-catalog.md docs(sidebar): collapse exploding skills tree to a single Skills node (#18259) 2026-04-30 23:08:22 -07:00
profile-commands.md docs: clarify profiles vs workspaces 2026-04-19 02:00:46 -07:00
skills-catalog.md docs(sidebar): collapse exploding skills tree to a single Skills node (#18259) 2026-04-30 23:08:22 -07:00
slash-commands.md docs: add Persistent Goals (/goal) feature page (#18275) 2026-04-30 23:16:54 -07:00
tools-reference.md docs: resync reference, user-guide, developer-guide, and messaging pages against code (#17738) 2026-04-29 20:55:59 -07:00
toolsets-reference.md docs: resync reference, user-guide, developer-guide, and messaging pages against code (#17738) 2026-04-29 20:55:59 -07:00