Execution Modes
Set the Icho action states using the mode parameter in the cassette manager:
with cassette("tests/cassettes", mode="replay"): response = model.invoke(...)
ModeBehavior Description
auto (default)Replays if a matching cassette exists. Otherwise, sends a live request, records the response to a cassette, and returns.
recordAlways runs live requests, records the response, and overwrites the existing cassette files.
replayNever hits the live API. Raises a
CassetteNotFoundError if no matching cassette exists. Perfect for offline sandbox environments and CI.liveCompletely bypasses Icho cassettes, routing all requests directly to live external services.
