33using MaIN . Domain . Entities ;
44using MaIN . Domain . Configuration . BackendInferenceParams ;
55using MaIN . Domain . Exceptions ;
6+ using MaIN . Domain . Models ;
67using MaIN . Domain . Models . Concrete ;
78
89namespace MaIN . Core . IntegrationTests ;
@@ -17,7 +18,7 @@ public async Task OpenAi_Should_RespondWithParams()
1718 SkipIfMissingKey ( LLMApiRegistry . GetEntry ( BackendType . OpenAi ) ? . ApiKeyEnvName ! ) ;
1819
1920 var result = await AIHub . Chat ( )
20- . WithModel < Gpt4oMini > ( )
21+ . WithModel ( Models . OpenAi . Gpt4oMini )
2122 . WithMessage ( TestQuestion )
2223 . WithInferenceParams ( new OpenAiInferenceParams
2324 {
@@ -39,7 +40,7 @@ public async Task Anthropic_Should_RespondWithParams()
3940 SkipIfMissingKey ( LLMApiRegistry . GetEntry ( BackendType . Anthropic ) ? . ApiKeyEnvName ! ) ;
4041
4142 var result = await AIHub . Chat ( )
42- . WithModel < ClaudeSonnet4 > ( )
43+ . WithModel ( Models . Anthropic . ClaudeSonnet4 )
4344 . WithMessage ( TestQuestion )
4445 . WithInferenceParams ( new AnthropicInferenceParams
4546 {
@@ -61,7 +62,7 @@ public async Task Gemini_Should_RespondWithParams()
6162 SkipIfMissingKey ( LLMApiRegistry . GetEntry ( BackendType . Gemini ) ? . ApiKeyEnvName ! ) ;
6263
6364 var result = await AIHub . Chat ( )
64- . WithModel < Gemini2_0Flash > ( )
65+ . WithModel ( Models . Gemini . Gemini2_0Flash )
6566 . WithMessage ( TestQuestion )
6667 . WithInferenceParams ( new GeminiInferenceParams
6768 {
@@ -83,7 +84,7 @@ public async Task DeepSeek_Should_RespondWithParams()
8384 SkipIfMissingKey ( LLMApiRegistry . GetEntry ( BackendType . DeepSeek ) ? . ApiKeyEnvName ! ) ;
8485
8586 var result = await AIHub . Chat ( )
86- . WithModel < DeepSeekReasoner > ( )
87+ . WithModel ( Models . DeepSeek . Reasoner )
8788 . WithMessage ( TestQuestion )
8889 . WithInferenceParams ( new DeepSeekInferenceParams
8990 {
@@ -105,7 +106,7 @@ public async Task GroqCloud_Should_RespondWithParams()
105106 SkipIfMissingKey ( LLMApiRegistry . GetEntry ( BackendType . GroqCloud ) ? . ApiKeyEnvName ! ) ;
106107
107108 var result = await AIHub . Chat ( )
108- . WithModel < Llama3_1_8bInstant > ( )
109+ . WithModel ( Models . Groq . Llama3_1_8bInstant )
109110 . WithMessage ( TestQuestion )
110111 . WithInferenceParams ( new GroqCloudInferenceParams
111112 {
@@ -127,7 +128,7 @@ public async Task Xai_Should_RespondWithParams()
127128 SkipIfMissingKey ( LLMApiRegistry . GetEntry ( BackendType . Xai ) ? . ApiKeyEnvName ! ) ;
128129
129130 var result = await AIHub . Chat ( )
130- . WithModel < Grok3Beta > ( )
131+ . WithModel ( Models . Xai . Grok3Beta )
131132 . WithMessage ( TestQuestion )
132133 . WithInferenceParams ( new XaiInferenceParams
133134 {
@@ -149,7 +150,7 @@ public async Task Self_Should_RespondWithParams()
149150 Skip . If ( ! File . Exists ( "C:/Models/gemma2-2b.gguf" ) , "Local model not found at C:/Models/gemma2-2b.gguf" ) ;
150151
151152 var result = await AIHub . Chat ( )
152- . WithModel < Gemma2_2b > ( )
153+ . WithModel ( Models . Local . Gemma2_2b )
153154 . WithMessage ( TestQuestion )
154155 . WithInferenceParams ( new LocalInferenceParams
155156 {
@@ -173,7 +174,7 @@ public async Task LocalOllama_Should_RespondWithParams()
173174 SkipIfOllamaNotRunning ( ) ;
174175
175176 var result = await AIHub . Chat ( )
176- . WithModel < OllamaGemma3_4b > ( )
177+ . WithModel ( Models . Ollama . Gemma3_4b )
177178 . WithMessage ( TestQuestion )
178179 . WithInferenceParams ( new OllamaInferenceParams
179180 {
@@ -197,7 +198,7 @@ public async Task ClaudOllama_Should_RespondWithParams()
197198 SkipIfMissingKey ( LLMApiRegistry . GetEntry ( BackendType . Ollama ) ? . ApiKeyEnvName ! ) ;
198199
199200 var result = await AIHub . Chat ( )
200- . WithModel < OllamaGemma3_4b > ( )
201+ . WithModel ( Models . Ollama . Gemma3_4b )
201202 . WithMessage ( TestQuestion )
202203 . WithInferenceParams ( new OllamaInferenceParams
203204 {
@@ -222,7 +223,7 @@ public async Task Self_Should_ThrowWhenGivenWrongParams()
222223 {
223224 await Assert . ThrowsAsync < InvalidBackendParamsException > ( ( ) =>
224225 AIHub . Chat ( )
225- . WithModel < Gemma2_2b > ( )
226+ . WithModel ( Models . Local . Gemma2_2b )
226227 . WithMessage ( TestQuestion )
227228 . WithInferenceParams ( new OpenAiInferenceParams ( ) )
228229 . CompleteAsync ( ) ) ;
@@ -233,7 +234,7 @@ public async Task OpenAi_Should_ThrowWhenGivenWrongParams()
233234 {
234235 await Assert . ThrowsAsync < InvalidBackendParamsException > ( ( ) =>
235236 AIHub . Chat ( )
236- . WithModel < Gpt4oMini > ( )
237+ . WithModel ( Models . OpenAi . Gpt4oMini )
237238 . WithMessage ( TestQuestion )
238239 . WithInferenceParams ( new DeepSeekInferenceParams ( ) )
239240 . CompleteAsync ( ) ) ;
@@ -244,7 +245,7 @@ public async Task Anthropic_Should_ThrowWhenGivenWrongParams()
244245 {
245246 await Assert . ThrowsAsync < InvalidBackendParamsException > ( ( ) =>
246247 AIHub . Chat ( )
247- . WithModel < ClaudeSonnet4 > ( )
248+ . WithModel ( Models . Anthropic . ClaudeSonnet4 )
248249 . WithMessage ( TestQuestion )
249250 . WithInferenceParams ( new OpenAiInferenceParams ( ) )
250251 . CompleteAsync ( ) ) ;
@@ -255,7 +256,7 @@ public async Task Gemini_Should_ThrowWhenGivenWrongParams()
255256 {
256257 await Assert . ThrowsAsync < InvalidBackendParamsException > ( ( ) =>
257258 AIHub . Chat ( )
258- . WithModel < Gemini2_0Flash > ( )
259+ . WithModel ( Models . Gemini . Gemini2_0Flash )
259260 . WithMessage ( TestQuestion )
260261 . WithInferenceParams ( new AnthropicInferenceParams ( ) )
261262 . CompleteAsync ( ) ) ;
@@ -266,7 +267,7 @@ public async Task DeepSeek_Should_ThrowWhenGivenWrongParams()
266267 {
267268 await Assert . ThrowsAsync < InvalidBackendParamsException > ( ( ) =>
268269 AIHub . Chat ( )
269- . WithModel < DeepSeekReasoner > ( )
270+ . WithModel ( Models . DeepSeek . Reasoner )
270271 . WithMessage ( TestQuestion )
271272 . WithInferenceParams ( new GeminiInferenceParams ( ) )
272273 . CompleteAsync ( ) ) ;
@@ -277,7 +278,7 @@ public async Task GroqCloud_Should_ThrowWhenGivenWrongParams()
277278 {
278279 await Assert . ThrowsAsync < InvalidBackendParamsException > ( ( ) =>
279280 AIHub . Chat ( )
280- . WithModel < Llama3_1_8bInstant > ( )
281+ . WithModel ( Models . Groq . Llama3_1_8bInstant )
281282 . WithMessage ( TestQuestion )
282283 . WithInferenceParams ( new OpenAiInferenceParams ( ) )
283284 . CompleteAsync ( ) ) ;
@@ -288,7 +289,7 @@ public async Task Xai_Should_ThrowWhenGivenWrongParams()
288289 {
289290 await Assert . ThrowsAsync < InvalidBackendParamsException > ( ( ) =>
290291 AIHub . Chat ( )
291- . WithModel < Grok3Beta > ( )
292+ . WithModel ( Models . Xai . Grok3Beta )
292293 . WithMessage ( TestQuestion )
293294 . WithInferenceParams ( new AnthropicInferenceParams ( ) )
294295 . CompleteAsync ( ) ) ;
@@ -299,7 +300,7 @@ public async Task Ollama_Should_ThrowWhenGivenWrongParams()
299300 {
300301 await Assert . ThrowsAsync < InvalidBackendParamsException > ( ( ) =>
301302 AIHub . Chat ( )
302- . WithModel < OllamaGemma3_4b > ( )
303+ . WithModel ( Models . Ollama . Gemma3_4b )
303304 . WithMessage ( TestQuestion )
304305 . WithInferenceParams ( new DeepSeekInferenceParams ( ) )
305306 . CompleteAsync ( ) ) ;
0 commit comments