fix(agents): retry empty compatible turns

This commit is contained in:
Peter Steinberger
2026-04-27 11:41:31 +01:00
parent edb3e84898
commit fd9d32f022
8 changed files with 116 additions and 2 deletions

View File

@@ -109,6 +109,20 @@ describe("registerAgentCommands", () => {
);
});
it("accepts a model override for one-shot agent runs", async () => {
await runCli(["agent", "--message", "hi", "--agent", "ops", "--model", "openai/gpt-5.4"]);
expect(agentCliCommandMock).toHaveBeenCalledWith(
expect.objectContaining({
message: "hi",
agent: "ops",
model: "openai/gpt-5.4",
}),
runtime,
{ deps: true },
);
});
it("runs agents add and computes hasFlags based on explicit options", async () => {
await runCli(["agents", "add", "alpha"]);
expect(agentsAddCommandMock).toHaveBeenNthCalledWith(

View File

@@ -28,6 +28,7 @@ export function registerAgentCommands(program: Command, args: { agentChannelOpti
.option("-t, --to <number>", "Recipient number in E.164 used to derive the session key")
.option("--session-id <id>", "Use an explicit session id")
.option("--agent <id>", "Agent id (overrides routing bindings)")
.option("--model <id>", "Model override for this run (provider/model or model id)")
.option(
"--thinking <level>",
"Thinking level: off | minimal | low | medium | high | xhigh | adaptive | max where supported",