@@ -240,35 +240,28 @@ def test_model_profile():
240240 assert model .profile is not None
241241
242242
243- @pytest .mark .parametrize (
244- 'model_name' ,
245- [
246- pytest .param ('anthropic:claude-sonnet-4-5' , id = 'anthropic' ),
247- pytest .param ('google-gla:gemini-2.0-flash' , id = 'google' ),
248- pytest .param ('groq:llama-3.3-70b-versatile' , id = 'groq' ),
249- pytest .param ('openai:gpt-4o' , id = 'openai' ),
250- pytest .param ('openai-responses:gpt-4o' , id = 'openai-responses' ),
251- pytest .param ('function' , id = 'function' ),
252- pytest .param ('test' , id = 'test' ),
253- ],
254- )
255- def test_supported_builtin_tools (model_name : str ):
256- """Test model.profile.supported_builtin_tools returns proper tool types."""
243+ @pytest .mark .parametrize ('profile_name' , ['base' , 'openai' , 'google' , 'groq' ])
244+ def test_supported_builtin_tools (profile_name : str ):
245+ """Test profile.supported_builtin_tools returns proper tool types."""
257246 from pydantic_ai .builtin_tools import AbstractBuiltinTool
258- from pydantic_ai .models import infer_model
247+ from pydantic_ai .profiles import ModelProfile
259248
260- if model_name == 'function' :
261- from pydantic_ai .models .function import FunctionModel
249+ if profile_name == 'base' :
250+ profile : ModelProfile = ModelProfile ()
251+ elif profile_name == 'openai' :
252+ from pydantic_ai .profiles .openai import OpenAIModelProfile
262253
263- model = FunctionModel ( lambda m , a : None ) # type: ignore
264- elif model_name == 'test ' :
265- from pydantic_ai .models . test import TestModel
254+ profile = OpenAIModelProfile ()
255+ elif profile_name == 'google ' :
256+ from pydantic_ai .profiles . google import GoogleModelProfile
266257
267- model = TestModel ()
258+ profile = GoogleModelProfile ()
268259 else :
269- model = infer_model ( model_name )
260+ from pydantic_ai . profiles . groq import GroqModelProfile
270261
271- result = model .profile .supported_builtin_tools
262+ profile = GroqModelProfile ()
263+
264+ result = profile .supported_builtin_tools
272265 assert isinstance (result , frozenset )
273266 assert all (issubclass (t , AbstractBuiltinTool ) for t in result )
274267
0 commit comments