@@ -117,6 +117,8 @@ describe('od run CLI', () => {
117117 '--message' ,
118118 'Build the settings screen' ,
119119 '--deployment-credential' ,
120+ '--model' ,
121+ 'gpt-5.4-mini' ,
120122 '--json' ,
121123 '--daemon-url' ,
122124 stub . baseUrl ,
@@ -132,16 +134,37 @@ describe('od run CLI', () => {
132134 projectId : 'project-1' ,
133135 message : 'Build the settings screen' ,
134136 agentId : 'byok-opencode' ,
137+ model : 'gpt-5.4-mini' ,
135138 byokCredentialSource : 'deployment' ,
136139 } ) ;
137140 } ) ;
138141
142+ it ( 'rejects a deployment credential run without an explicit model' , async ( ) => {
143+ stub = await startRunStubServer ( true ) ;
144+
145+ const result = await runCli ( [
146+ 'run' ,
147+ 'start' ,
148+ '--project' ,
149+ 'project-1' ,
150+ '--deployment-credential' ,
151+ '--json' ,
152+ '--daemon-url' ,
153+ stub . baseUrl ,
154+ ] ) ;
155+
156+ expect ( result . code ) . toBe ( 2 ) ;
157+ expect ( result . stderr ) . toContain ( '--deployment-credential requires --model <id>' ) ;
158+ expect ( stub . requests ) . toEqual ( [ ] ) ;
159+ } ) ;
160+
139161 it ( 'documents the deployment credential selector in run help' , async ( ) => {
140162 const result = await runCli ( [ 'run' , '--help' ] ) ;
141163
142164 expect ( result . code ) . toBe ( 0 ) ;
143165 expect ( result . stdout ) . toContain ( '--deployment-credential' ) ;
144166 expect ( result . stdout ) . toContain ( 'BYOK OpenCode agent' ) ;
167+ expect ( result . stdout ) . toContain ( 'requires --model <id>' ) ;
145168 } ) ;
146169
147170 it ( 'continues a resumable run through the normal run creation API' , async ( ) => {
0 commit comments