Repository navigation
v0.5.1
Added
- Prompt version tracking —
tracer.set_prompt(name, version),tracer.clear_prompt(), and thetracer.use_prompt(name, version)context manager tag every trace withprompt_name/prompt_version. The hosted API stores them,GET /v1/tracesfilters byprompt_name/prompt_version, and the dashboard shows the prompt on each trace. - pytest plugin for eval gates —
@cortexops.eval_gate("golden_v1.yaml", fail_on="task_completion < 0.90")turns a test that returns an agent into a golden-dataset gate. Auto-registered via thepytest11entry point; adds thecortexops_evalmarker and an eval summary to the pytest report. Install withpip install "cortexops[pytest]". - Sampling configuration —
CORTEXOPS_SAMPLE_RATEenvironment variable and asample_errorsconstructor flag. Each trace records itssample_rateand whether it was sampled. - Automatic Pro key email (hosted API) — Stripe and PayPal checkouts email the new key automatically (Resend, falling back to SendGrid), with every outcome in the auth audit log. Admins can rotate and re-send a key with
POST /v1/admin/keys/{id}/resend-email.
Fixed
- Unsampled failed runs (
sample_rate < 1.0) raisedValueError: "Trace" object has no field "metadata"instead of the agent's own exception, and were never sent to the hosted API. - Traces now include the tracer's
environment; previously every hosted trace was recorded asdevelopment. fail_onexpressions with trailing text (e.g."task_completion < 0.9 or else") are now rejected instead of being silently truncated.- Hosted API: Stripe webhook retries could create duplicate Pro keys.
Fixed after review
- Hosted API: trace
metadata,prompt_name, andprompt_versionnow go through PII redaction; theprompt_name/prompt_versiontrace filters match only the top-level prompt fields. - Hosted API: admin key resend commits the rotated key before emailing it and rejects non-Pro and expired keys.
- Hosted API: eval ingest commits a new prompt version when the model or temperature changes.
- SDK: prompt name/version lengths are validated in
set_prompt, and async OpenAI Agents / Agno calls are traced. - Hosted API:
/healthreports version 0.5.1.
Full changelog: v0.5.0...v0.5.1 · PR #26