跳转到主要内容
defineConfig 从根目录的 niceeval.config.ts 默认导出,只放项目级默认值。agent、model、flags、runs 和实验预算写在 experiments/ 下的 defineExperiment 文件里。
import { defineConfig } from "niceeval";

export default defineConfig({
  judge: { model: "gpt-5.4-mini" },
  maxConcurrency: 4,
  timeoutMs: 300_000,
});
judge
JudgeConfig
t.judge.autoevals.* 的默认评判模型和端点。
reporters
Reporter[]
额外 reporter。临时生成 JUnit 可用 CLI 的 --junit <path>
maxConcurrency
number
最大并发 attempt 数。
timeoutMs
number
单个 attempt 的超时时间,单位毫秒。
sandbox
SandboxSpec
默认 sandbox 后端,用 niceeval/sandbox 里的 dockerSandbox() / vercelSandbox() / e2bSandbox() 构造,不再接受 "docker" 这类裸字符串。对 sandbox agent 是必填项(可以直接写在 experiment 上,也可以只写在这里作为项目级兜底:exp.sandbox ?? config.sandbox)——niceeval 不再从环境变量自动探测后端,也没有对应的 CLI flag。起始文件不会自动上传;sandbox eval 在 test(t) 里调用 t.sandbox.uploadDirectory(...)uploadFiles(...)writeFiles(...)
niceeval 把环境准备放在普通代码里:eval 自己需要的文件写在 test(t),agent 自己的准备写在 adapter 的 setup