# `mix pixir.smoke.prompt_cache`
[🔗](https://github.com/Ranvier-Technologies/pixir/blob/main/lib/mix/tasks/pixir.smoke.prompt_cache.ex#L1)

Probes whether the Provider reports prompt-cache usage for comparable long-prefix
requests.

This is a manual, opt-in, real-network smoke. It does not prove every future Session
will hit cache; it verifies the current backend/model path returns usage accounting
and reports whether `cached_tokens` were observed.

Usage:

    mix pixir.smoke.prompt_cache --dry-run --json
    mix pixir.smoke.prompt_cache --json
    mix pixir.smoke.prompt_cache --model gpt-5.5 --reasoning-effort low --json
    mix pixir.smoke.prompt_cache --prompt-cache-retention 24h --json
    mix pixir.smoke.prompt_cache --help

Options:

  * `--model MODEL` - Provider model. Default: `gpt-5.5`.
  * `--reasoning-effort EFFORT` - one of `low`, `medium`, `high`, `xhigh`.
    Default: `low`.
  * `--cache-key KEY` - prompt-cache key to reuse across the two requests.
  * `--prompt-cache-retention VALUE` - explicit retention request, one of `24h` or
    `in_memory`. On the ChatGPT/Codex backend Pixir's Provider gates this field until
    support is proven.
  * `--dry-run` - validate and print the planned probe without auth or network.
  * `--json` - print machine-readable evidence or errors.
  * `--help` - print this help and exit.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
