Skip to content

v0.1.3 (beta)

Pre-release
Pre-release

Choose a tag to compare

@Eltarras Eltarras released this 04 Oct 09:12
· 155 commits to main since this release
6a2c592

thunc 0.1.3 adds a backend for TypeSafe's Jev model, which answers yes/no, label and rating functions in about a third of a second. It also closes a hole in the Codex backend and tightens the empty-body check.

pip install --upgrade thunc

Jev backend (#27)

  • backend="jev" calls TypeSafe's Jev judgment model through the jev CLI. Jev doesn't write text: it answers bool, Literal of strings (up to 255 labels) and Literal of integers (as ordered levels, e.g. Literal[1, 2, 3, 4, 5]). Any other return type raises ThuncError before a request is sent.
  • Fast and cheap: about 0.3 s per call. The jev_inbox example triages 8 tickets (24 calls) in about a second. Routing and rating 3 tickets took 0.9 s on Jev and 9.7 s through Claude Code.
  • Use it next to another backend: pick Jev per function with @thunc.function(backend="jev") and let Claude write the text. The key comes from jev login or JEV_API_KEY, never configure(api_key=...), so it doesn't clash with your other backend's key. Jev is only used when you choose it.
  • Setup guide: Getting started with the Jev backend covers installing the CLI, logging in and the errors you might hit.
  • Examples: jev_hello.py, jev_inbox.py and jev_with_claude.py in examples/.

Codex backend locked down (#25)

  • The codex backend ran with a read-only sandbox, but read-only still let Codex use its own shell, so a call could read any file on your machine. It now runs with Codex's own tools turned off, like the claude-code backend.
  • It also ignores ~/.codex/config.toml, so your MCP servers, plugins and notify command no longer run during thunc calls. Your Codex login still works.

Empty-body check (#24)

  • @thunc.function bodies must be empty, because the model replaces them. The check compared bytecode only, so return 1, return True and raise ValueError slipped through. They now raise TypeError when the function is defined.

Behaviour changes

  • Model settings in ~/.codex/config.toml (such as model_reasoning_effort) no longer apply to thunc's Codex calls. Pick the model with configure(model=...) or model=.
  • A @thunc.function with a body like return 1 now raises TypeError at import, where 0.1.2 accepted it and quietly ignored the code.

Still beta: expect bugs, and the API may change.

Full changelog: v0.1.2...v0.1.3