fix(workflow-utils): omit --model/--provider when not explicitly set

Hermes role defaulted model/provider to 'auto', causing 404 on
custom providers. Now defaults to undefined and only passes
--model/--provider args when explicitly provided.

Fixes #222
This commit is contained in:
2026-04-28 06:31:22 +00:00
parent 8a1d61985d
commit 1efdc4dcd1
3 changed files with 12 additions and 10 deletions
+8 -6
View File
@@ -9,8 +9,8 @@ import { type SpawnEnv, type SpawnError, spawnSafe } from "./spawn-safe.js";
*/
export type HermesAgentOptions = {
prompt: string;
model: string;
provider: string;
model: string | null;
provider: string | null;
skills: string[];
/** When true, suppresses interactive UI noise. */
quiet: boolean;
@@ -38,13 +38,15 @@ export async function hermesAgent(
"-q",
options.prompt,
"--yolo",
"--model",
options.model,
"--provider",
options.provider,
"--max-turns",
String(options.maxTurns),
];
if (options.model) {
args.push("--model", options.model);
}
if (options.provider) {
args.push("--provider", options.provider);
}
for (const s of options.skills) {
args.push("-s", s);
}
@@ -1,8 +1,8 @@
import type { HermesRoleDefaults, HermesRoleRequired } from "./role-types.js";
const HERMES_DEFAULTS: HermesRoleDefaults = {
model: "auto",
provider: "auto",
model: null,
provider: null,
skills: [],
quiet: true,
maxTurns: 90,
+2 -2
View File
@@ -40,8 +40,8 @@ export type HermesRoleRequired<T> = {
};
export type HermesRoleDefaults = {
model: string;
provider: string;
model: string | null;
provider: string | null;
skills: string[];
quiet: boolean;
maxTurns: number;