@@ -380,13 +380,13 @@ def test_clai_web_generic_agent(mocker: MockerFixture, env: TestEnv):
380380 env .set ('OPENAI_API_KEY' , 'test' )
381381 mock_run_web = mocker .patch ('pydantic_ai._cli.web.run_web_command' , return_value = 0 )
382382
383- assert cli (['web' , '-m' , 'gpt-5' , '-t' , 'web_search' ], prog_name = 'clai' ) == 0
383+ assert cli (['web' , '-m' , 'openai: gpt-5' , '-t' , 'web_search' ], prog_name = 'clai' ) == 0
384384
385385 mock_run_web .assert_called_once_with (
386386 agent_path = None ,
387387 host = '127.0.0.1' ,
388388 port = 7932 ,
389- models = ['gpt-5' ],
389+ models = ['openai: gpt-5' ],
390390 tools = ['web_search' ],
391391 instructions = None ,
392392 mcp = None ,
@@ -424,15 +424,26 @@ def test_clai_web_with_models(mocker: MockerFixture, create_test_module: Callabl
424424 create_test_module (custom_agent = test_agent )
425425
426426 assert (
427- cli (['web' , '--agent' , 'test_module:custom_agent' , '-m' , 'gpt-5' , '-m' , 'claude-sonnet-4-5' ], prog_name = 'clai' )
427+ cli (
428+ [
429+ 'web' ,
430+ '--agent' ,
431+ 'test_module:custom_agent' ,
432+ '-m' ,
433+ 'openai:gpt-5' ,
434+ '-m' ,
435+ 'anthropic:claude-sonnet-4-5' ,
436+ ],
437+ prog_name = 'clai' ,
438+ )
428439 == 0
429440 )
430441
431442 mock_run_web .assert_called_once_with (
432443 agent_path = 'test_module:custom_agent' ,
433444 host = '127.0.0.1' ,
434445 port = 7932 ,
435- models = ['gpt-5' , 'claude-sonnet-4-5' ],
446+ models = ['openai: gpt-5' , 'anthropic: claude-sonnet-4-5' ],
436447 tools = None ,
437448 instructions = None ,
438449 mcp = None ,
@@ -472,13 +483,13 @@ def test_clai_web_generic_with_instructions(mocker: MockerFixture, env: TestEnv)
472483
473484 mock_run_web = mocker .patch ('pydantic_ai._cli.web.run_web_command' , return_value = 0 )
474485
475- assert cli (['web' , '-m' , 'gpt-5' , '-i' , 'You are a helpful coding assistant' ], prog_name = 'clai' ) == 0
486+ assert cli (['web' , '-m' , 'openai: gpt-5' , '-i' , 'You are a helpful coding assistant' ], prog_name = 'clai' ) == 0
476487
477488 mock_run_web .assert_called_once_with (
478489 agent_path = None ,
479490 host = '127.0.0.1' ,
480491 port = 7932 ,
481- models = ['gpt-5' ],
492+ models = ['openai: gpt-5' ],
482493 tools = None ,
483494 instructions = 'You are a helpful coding assistant' ,
484495 mcp = None ,
0 commit comments