Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,12 @@ answerlayer optimize start \
--mode recommendation
```

By default the proposal model also reviews bounded failed-case traces during
failure analysis. Use `--analysis-model MODEL` to select a dedicated reviewer.
The shared `--model` defaults the eval agent, judge, trace analyzer, and
component author. Use `--eval-model`, `--judge-model`, `--analysis-model`, or
`--proposal-model` for explicit role overrides. If `--analysis-model` is
omitted, trace analysis uses the explicit `--proposal-model` before falling
back to the shared model. Without a shared model or `--judge-model`, each case
keeps its configured judge.

Inspect and operate the registry with `answerlayer optimize list`,
`get RUN_ID`, `pause RUN_ID`, `resume RUN_ID`, `stop RUN_ID`, `clone RUN_ID`,
Expand Down
5 changes: 4 additions & 1 deletion src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,7 @@ async function handleOptimization(client, command, positionals, parsed, io) {
promotion_policy: firstValue(parsed.flags.promotionPolicy) || "manual",
models: {
eval_execution: firstValue(parsed.flags.evalModel) || sharedModel,
judge: firstValue(parsed.flags.judgeModel) || sharedModel,
proposal: firstValue(parsed.flags.proposalModel) || sharedModel,
analysis: firstValue(parsed.flags.analysisModel)
|| firstValue(parsed.flags.proposalModel)
Expand Down Expand Up @@ -1646,6 +1647,7 @@ function normalizeFlagName(rawName) {
"--review-policy": "reviewPolicy",
"--promotion-policy": "promotionPolicy",
"--eval-model": "evalModel",
"--judge-model": "judgeModel",
"--analysis-model": "analysisModel",
"--proposal-model": "proposalModel",
"--base-hash": "baseHash",
Expand Down Expand Up @@ -1904,7 +1906,8 @@ Data products:
and --use-semantic-layer or --no-semantic-layer
Optimization:
answerlayer optimize start --name NAME --connection ID --suite ID --model MODEL
[--eval-model MODEL] [--proposal-model MODEL] [--analysis-model MODEL]
[--eval-model MODEL] [--judge-model MODEL] [--analysis-model MODEL]
[--proposal-model MODEL]
[--mode recommendation|supervised|fully_automatic]
[--component entities,relationships,measures,metrics,dimensions,filters]
[--review-policy every_sweep|exceptions_only|end_of_run]
Expand Down
4 changes: 4 additions & 0 deletions test/cli.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,7 @@ test("optimize start freezes explicit policies, budgets, models, and selectors",
assert.equal(body.promotion_policy, "manual");
assert.equal(body.models.analysis, "openai.gpt-5.6-luna");
assert.equal(body.models.proposal, "openai.gpt-5.6-terra");
assert.equal(body.models.judge, "openai.judge-model");
assert.equal(body.budget.max_iterations, 4);
return new Response(JSON.stringify({ id: "run-1", execution_status: "queued" }), {
status: 201,
Expand All @@ -1087,6 +1088,7 @@ test("optimize start freezes explicit policies, budgets, models, and selectors",
"--connection", "connection-1",
"--suite", "suite-1",
"--model", "openai.gpt-5.6-terra",
"--judge-model", "openai.judge-model",
"--analysis-model", "openai.gpt-5.6-luna",
"--mode", "fully_automatic",
"--review-policy", "end_of_run",
Expand All @@ -1111,6 +1113,7 @@ test("optimize start defaults analysis model to the explicit proposal model", as
assert.equal(body.models.eval_execution, "openai.eval-model");
assert.equal(body.models.proposal, "openai.proposal-model");
assert.equal(body.models.analysis, "openai.proposal-model");
assert.equal(body.models.judge, undefined);
return new Response(JSON.stringify({ id: "run-1" }), {
status: 201,
headers: { "content-type": "application/json" },
Expand Down Expand Up @@ -1141,6 +1144,7 @@ test("optimize start defaults analysis model to the shared model", async () => {
assert.equal(body.models.eval_execution, "openai.shared-model");
assert.equal(body.models.proposal, "openai.shared-model");
assert.equal(body.models.analysis, "openai.shared-model");
assert.equal(body.models.judge, "openai.shared-model");
return new Response(JSON.stringify({ id: "run-1" }), {
status: 201,
headers: { "content-type": "application/json" },
Expand Down
Loading