Onchain Routerby AgenticFI Base Mainnet
Base mainnet · USDC paymentsAny verified wallet can pay. Check every payment term and set a local spending limit before signing.

Developer documentation

Local response caching

What is cached, when a cache hit costs nothing new, and how to preserve recovery.

Page tools

Caching is implemented in the public-alpha local OpenAI proxy. The public API, direct SDK, CLI, and MCP do not provide this response cache. This is not provider prompt-prefix caching or a cached-token price discount.

Eligible text only

The proxy can reuse an identical successful text answer for up to ten minutes inside the same wallet, agent, session, policy, origin, and catalog. It keeps bounded memory: at most 200 entries, 1 MiB per item, and 16 MiB serialized data in total. Shutdown clears it.

Tools, media, streaming, refusals, incomplete output, unknown extensions, and confirmation-only policies are excluded. Repeated stochastic prompts can return the same answer; refresh when you need a new sample or current information.

Cache hit meaning

x-onchain-router-cache: HIT and x-onchain-router-charge-atomic: 0 mean no new paid execution. The source receipt identifies the original request. There is no new settlement or receipt; body usage belongs to the original inference.

Control and recovery

  • An explicit Idempotency-Key always bypasses the cache. Keep stable keys for requests that need durable recovery.
  • Cache-Control: no-cache requests a fresh answer.
  • Cache-Control: no-store, cache: false, or no_cache: true bypasses cache reads and writes.
  • Proxy --no-cache disables it for the process.

Do not omit a recovery key just to get cache hits. Simultaneous fresh misses may each execute; this is not request coalescing. See local proxy.

Reviewed 2026-09-01Catalog c1f92fac4f1d

Search guides, endpoint references, models, and pricing.