Repository navigation
v0.1.3 (beta)
Pre-release
Pre-release
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 thuncJev backend (#27)
backend="jev"calls TypeSafe's Jev judgment model through thejevCLI. Jev doesn't write text: it answersbool,Literalof strings (up to 255 labels) andLiteralof integers (as ordered levels, e.g.Literal[1, 2, 3, 4, 5]). Any other return type raisesThuncErrorbefore a request is sent.- Fast and cheap: about 0.3 s per call. The
jev_inboxexample 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 fromjev loginorJEV_API_KEY, neverconfigure(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.pyandjev_with_claude.pyin examples/.
Codex backend locked down (#25)
- The
codexbackend 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 theclaude-codebackend. - It also ignores
~/.codex/config.toml, so your MCP servers, plugins andnotifycommand no longer run during thunc calls. Your Codex login still works.
Empty-body check (#24)
@thunc.functionbodies must be empty, because the model replaces them. The check compared bytecode only, soreturn 1,return Trueandraise ValueErrorslipped through. They now raiseTypeErrorwhen the function is defined.
Behaviour changes
- Model settings in
~/.codex/config.toml(such asmodel_reasoning_effort) no longer apply to thunc's Codex calls. Pick the model withconfigure(model=...)ormodel=. - A
@thunc.functionwith a body likereturn 1now raisesTypeErrorat 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