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:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user