File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ export interface AgentRunOptions {
1919 skills ?: string [ ] ;
2020 /** Override the default per-invocation timeout. */
2121 timeoutMs ?: number ;
22+ /** Override the model for this specific invocation (e.g. a review-only model). */
23+ model ?: string ;
24+ /** Override the provider for this specific invocation. */
25+ provider ?: string ;
2226}
2327
2428export interface AgentRunResult {
Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ export class HermesAgentService {
2121 ) { }
2222
2323 async run ( opts : AgentRunOptions ) : Promise < AgentRunResult > {
24- const model = this . config . get ( 'HERMES_MODEL' ) || undefined ;
24+ const model = opts . model ?? this . config . get ( 'HERMES_MODEL' ) ?? undefined ;
25+ const provider = opts . provider ?? this . config . get ( 'HERMES_PROVIDER' ) ?? undefined ;
2526 const sandboxMode = this . config . get ( 'SANDBOX_MODE' ) ;
2627 const hermesHome = this . config . get ( 'HERMES_HOME' ) || undefined ;
2728
@@ -37,7 +38,7 @@ export class HermesAgentService {
3738 cwd : opts . cwd ,
3839 prompt : opts . prompt ,
3940 model,
40- provider : this . config . get ( 'HERMES_PROVIDER' ) || undefined ,
41+ provider,
4142 toolsets : opts . toolsets ,
4243 skills : opts . skills ,
4344 } ) ;
Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ export const envSchema = z.object({
2727 HERMES_HOME : z . string ( ) . optional ( ) ,
2828 HERMES_MODEL : z . string ( ) . optional ( ) ,
2929 HERMES_PROVIDER : z . string ( ) . optional ( ) ,
30+ HERMES_REVIEW_MODEL : z . string ( ) . optional ( ) ,
31+ HERMES_REVIEW_PROVIDER : z . string ( ) . optional ( ) ,
3032 HERMES_TIMEOUT_MS : intFromString ( 7_200_000 ) ,
3133
3234 // orchestration policy
Original file line number Diff line number Diff line change @@ -578,6 +578,8 @@ export class OrchestratorService {
578578 phase : 'REVIEW' ,
579579 cwd : ws . dir ,
580580 prompt : reviewPrompt ,
581+ model : this . config . get ( 'HERMES_REVIEW_MODEL' ) || undefined ,
582+ provider : this . config . get ( 'HERMES_REVIEW_PROVIDER' ) || undefined ,
581583 } ) ;
582584 if ( res . status !== 'SUCCEEDED' ) {
583585 throw new Error ( `review agent ${ res . status } ; ${ res . stderr . slice ( 0 , 300 ) } ` ) ;
@@ -613,6 +615,8 @@ export class OrchestratorService {
613615 phase : 'REVISE' ,
614616 cwd : ws . dir ,
615617 prompt : revisePrompt ,
618+ model : this . config . get ( 'HERMES_REVIEW_MODEL' ) || undefined ,
619+ provider : this . config . get ( 'HERMES_REVIEW_PROVIDER' ) || undefined ,
616620 } ) ;
617621 if ( rev . status !== 'SUCCEEDED' ) {
618622 // Don't let a failed/timed-out revise kill the whole task — the workspace is
You can’t perform that action at this time.
0 commit comments