mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-11 23:49:01 +02:00
* fix: default cross-model workflows to frontier models * chore: bump version and changelog (v1.82.1.0) Co-Authored-By: OpenAI Codex <noreply@openai.com> * fix: repair frontier eval budgets and workflow instructions Preserve frontier models and quality thresholds while fixing truncated judge output, ordered section expansion, consent checks, QA scoring, and ship audit gates. Add regression coverage and refresh generated docs. Co-Authored-By: OpenAI Codex <noreply@openai.com> * fix: resolve workflow gaps exposed by frontier evals Clarify plan-review ordering and fallback modes, preserve deploy readiness gates, honor configured merge methods, correct benchmark and canary contracts, and restore vendored installs on setup failure. Cover recovery with real-shell regressions. Co-Authored-By: OpenAI Codex <noreply@openai.com> * fix: use agent capture budgets for deploy evals Multi-turn deploy and benchmark sessions were incorrectly limited to the single-call judge timeout. Use the existing capture tier and leave outer-test cleanup headroom, with a free policy regression test. Keep all behavioral assertions and frontier models unchanged. Co-Authored-By: OpenAI Codex <noreply@openai.com> * fix: clarify retro workflow and evaluate compare instructions Include compare mode in the frontier judge excerpt, define metric sources and snapshot ordering, and preserve the existing prompt-size budget. Co-authored-by: OpenAI Codex <noreply@openai.com> * fix: make documentation release review and publication consistent Review before commit, clarify changelog safeguards and unavailable reviewer modes, and preserve raw PR bodies across separate shell calls. Keep title sync in one shell and add regression coverage. Co-authored-by: OpenAI Codex <noreply@openai.com> --------- Co-authored-by: OpenAI Codex <noreply@openai.com>
51 lines
2.2 KiB
TypeScript
51 lines
2.2 KiB
TypeScript
/**
|
|
* Host-neutral eval/harness model resolution (fork port wave 2, G cluster).
|
|
*
|
|
* Model IDs were hardcoded at six call sites across the eval helpers and the
|
|
* distill bin, so an environment that pins a different model (CI cost
|
|
* control, a model migration, an air-gapped proxy alias) had to patch source.
|
|
* One resolution point, env-overridable:
|
|
*
|
|
* GSTACK_EVAL_MODEL_<KIND> (e.g. GSTACK_EVAL_MODEL_WARMUP) — per-kind
|
|
* GSTACK_EVAL_MODEL — global
|
|
* explicit argument — caller wins
|
|
* per-kind default — last resort
|
|
*
|
|
* Kinds and their defaults:
|
|
* capture — AskUserQuestion SDK capture runs: current frontier Claude model
|
|
* warmup — PTY warm-up ping (cheapest thing that answers): haiku
|
|
* distill — free-text distillation (cheap, structured): haiku (pinned)
|
|
* judge — LLM-judge rubric calls: current frontier Claude model
|
|
*/
|
|
|
|
export const CLAUDE_FRONTIER_EVAL_MODEL = "claude-fable-5-1";
|
|
|
|
// `as const satisfies` keeps EvalModelKind the literal union
|
|
// 'capture' | 'warmup' | 'distill' — a `Record<string, string>` annotation
|
|
// would widen it to string and let any typo through the type gate.
|
|
const DEFAULTS = {
|
|
// Keep eval capture/judge on the current frontier Claude model by default.
|
|
// Tests needing a cheaper or historical ruler pass it explicitly or set
|
|
// GSTACK_EVAL_MODEL_CAPTURE / GSTACK_EVAL_MODEL_JUDGE / GSTACK_EVAL_MODEL.
|
|
capture: CLAUDE_FRONTIER_EVAL_MODEL,
|
|
warmup: "claude-haiku-4-5",
|
|
distill: "claude-haiku-4-5-20251001",
|
|
judge: CLAUDE_FRONTIER_EVAL_MODEL,
|
|
} as const satisfies Record<string, string>;
|
|
|
|
export type EvalModelKind = keyof typeof DEFAULTS;
|
|
|
|
export function resolveEvalModel(
|
|
kind: EvalModelKind,
|
|
explicit?: string | null,
|
|
env: NodeJS.ProcessEnv = process.env,
|
|
): string {
|
|
if (explicit) return explicit;
|
|
const perKind = env[`GSTACK_EVAL_MODEL_${kind.toUpperCase()}`];
|
|
if (perKind) return perKind;
|
|
if (env.GSTACK_EVAL_MODEL) return env.GSTACK_EVAL_MODEL;
|
|
const fallback = DEFAULTS[kind];
|
|
if (!fallback) throw new Error(`resolveEvalModel: unknown kind "${kind}"`);
|
|
return fallback;
|
|
}
|