Skip to content

Releases

0.3.0

Choose a tag to compare

@satchmakua satchmakua released this 29 Nov 21:45
f867b9e
  • Your application as the target. A model id of python:module.path:function runs 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 new input field (any YAML
    value) or its prompt, may be async, and returns a string, a Completion, or anything
    JSON can hold. Modules resolve from the working directory. A target that raises, or
    calls sys.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 FILE and --replay FILE on run, baseline and gate. 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 the Completion from
    gatecheck.complete(), which is priced by its model.
  • gatecheck.recording has 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.
  • Completion gains an optional cost_usd, for a provider that knows what a call cost.

0.2.0

Choose a tag to compare

@satchmakua satchmakua released this 28 Nov 21:12
2903ced
  • httpx instead of requests. Every provider, Ollama included, sends through one shared
    httpx.Client. Runtime dependencies are now httpx, pyyaml and jsonschema.
  • gatecheck.set_client(client) routes every provider call through your own httpx
    client (a proxy, custom TLS, or a recording client such as kinescope.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 a Completion. Completion is 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), and temperature is 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
    requests exceptions. Both are subclasses of httpx.HTTPError.
  • Custom CA bundles: REQUESTS_CA_BUNDLE and CURL_CA_BUNDLE are no longer read. Set
    SSL_CERT_FILE or SSL_CERT_DIR, or pass your own client to set_client().
  • Proxies: HTTP_PROXY, HTTPS_PROXY, ALL_PROXY and NO_PROXY are read once, when
    the client is created. On Windows the system proxy is used but its bypass list is not,
    so set NO_PROXY=localhost,127.0.0.1 if a system proxy sits in front of a local Ollama.
  • Redirects are not followed. A 3xx from a provider endpoint raises.