Repository navigation
Releases
Releases · satchmakua/gatecheck
0.3.0
- Your application as the target. A model id of
python:module.path:functionruns your
own code, so a suite evaluates a whole pipeline with the same tasks, graders, baselines
and gate as a bare model. The function gets the task's newinputfield (any YAML
value) or its prompt, may beasync, and returns a string, aCompletion, or anything
JSON can hold. Modules resolve from the working directory. A target that raises, or
callssys.exit(), is one failed task. Async targets share one event loop for the whole
run. The completion cache is never used for a target. --record FILEand--replay FILEonrun,baselineandgate. Recording saves
every httpx call the run makes to one Kinescope bundle. Replaying answers them from the
file: no key, no network, and no tokens or cost reported. A replay that no longer matches
its recording lists the divergences and fails. Recorded and replayed runs go one task at
a time and don't use the completion cache. Needs the new optional extra,
pip install "gatecheck[record]"(Python 3.11+).- What a target costs. While recording, a target is priced from the calls its function
made: plain chat calls to OpenAI, Anthropic and Gemini, for models in the pricing table.
Without a recording a target reports $0, unless it returns theCompletionfrom
gatecheck.complete(), which is priced by its model. gatecheck.recordinghas the same thing for Python:record(path),replay(path).- Built-in providers don't ask for an API key during a replay. Nothing is sent, so a
gate has to work where there are no secrets. - A judge grader on a
python:target needs its own judge model (judge_model, or
--judge-model), since a function can't judge its own output. - Suite files are read as UTF-8, and structured output keeps non-ASCII text as it is.
Completiongains an optionalcost_usd, for a provider that knows what a call cost.
0.2.0
- httpx instead of requests. Every provider, Ollama included, sends through one shared
httpx.Client. Runtime dependencies are nowhttpx,pyyamlandjsonschema. gatecheck.set_client(client)routes every provider call through your own httpx
client (a proxy, custom TLS, or a recording client such askinescope.http_client()).
set_client(None)restores the default. Recording a run with Kinescope needs kinescope
0.0.3 or later: gatecheck runs tasks on a thread pool, and older Kinescope stores refuse
writes from worker threads.gatecheck.complete(model_id, system, user, **options), a public call to any
registered provider that returns aCompletion.Completionis exported from the
package root.- Support for the current Claude models. Fable 5.2, Opus 5.5, Sonnet 5.5 and Haiku 5.5
are priced (unlisted models were reported as $0), andtemperatureis no longer sent to
the Claude models that reject it, which had failed every judge call to them with a 400. - Retry and backoff behave as before: timeouts, failed or dropped connections and the
statuses 429, 500, 502, 503, 504 and 529 are retried; anything else fails at once.
Upgrading from 0.1
- HTTP errors are httpx's (
httpx.HTTPStatusError,httpx.TransportError), not
requestsexceptions. Both are subclasses ofhttpx.HTTPError. - Custom CA bundles:
REQUESTS_CA_BUNDLEandCURL_CA_BUNDLEare no longer read. Set
SSL_CERT_FILEorSSL_CERT_DIR, or pass your own client toset_client(). - Proxies:
HTTP_PROXY,HTTPS_PROXY,ALL_PROXYandNO_PROXYare read once, when
the client is created. On Windows the system proxy is used but its bypass list is not,
so setNO_PROXY=localhost,127.0.0.1if a system proxy sits in front of a local Ollama. - Redirects are not followed. A 3xx from a provider endpoint raises.