Skip to content

v0.7.0 (beta)

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 16 Oct 15:10
2c45245

thunc 0.7.0 makes recordings survive a thunc upgrade. A recording is now named by what your code says about a call, not by the text thunc sends the model, so a later release that rewords thunc's prompts keeps your recordings, and CI, working. Recordings made with 0.4 to 0.6 still replay. A program written for 0.6 runs unchanged.

pip install --upgrade thunc

What changed (how recordings are matched)

  • Before: a recording's name was a hash of the text sent to the model, which includes thunc's own system prompt and its wording of the return type. A release that reworded either would have left every recording unmatched, and CI would fail with "No recorded answer".
  • Calls are now matched on what your code wrote: the function, instructions, inputs, return type and system=.
  • Agent runs are matched on the same, plus the agent, task and tools. A built-in tool added in a later release doesn't count, so new tools don't rename recordings.
  • Inputs are turned into JSON values by a fixed function of their own, with sets sorted. Changing how thunc shows inputs to the model won't rename recordings, and a set input now gets the same name on every run; before, its varying order changed the name.

Your existing recordings (the promise)

  • Recordings made with 0.4 to 0.6 are still found under their old names, so nothing needs re-recording.
  • THUNC_RECORD=missing leaves them as they are. THUNC_RECORD=1 records them again under their new names and removes the old files.
  • A test pins the names of a set of calls and agent runs in both formats, so a change that would lose recordings fails before it ships.

Tested

  • Offline tests on Python 3.10–3.14 on Ubuntu and on Windows, also run on macOS, and the Temporal integration tests. New tests cover:
    • Both name formats, pinned. The 0.6 names were computed with 0.6's code.
    • A reworded system prompt and type description still replaying.
    • Calls and agent runs recorded the 0.6 way still replaying.
    • Re-recording moving a recording to its new name.
    • New built-in tools leaving run names alone.

Behavior changes

  • Answers recorded from now on are saved under new file names. A recordings folder written by 0.7 replays under 0.7 and later. Under 0.6 it doesn't replay, so upgrade thunc wherever those recordings are replayed, CI included.
  • Re-recording with THUNC_RECORD=1 deletes each recording's 0.6-named file once its new one is saved.

Full changelog: v0.6.0...v0.7.0