11using MaIN . Core . Hub ;
22using MaIN . Domain . Configuration ;
33using MaIN . Domain . Entities ;
4- using MaIN . Domain . Entities . ProviderParams ;
4+ using MaIN . Domain . Configuration . BackendInferenceParams ;
55using MaIN . Domain . Exceptions ;
66using MaIN . Domain . Models . Concrete ;
77
88namespace MaIN . Core . IntegrationTests ;
99
10- public class ProviderParamsTests : IntegrationTestBase
10+ public class BackendParamsTests : IntegrationTestBase
1111{
1212 private const string TestQuestion = "What is 2+2? Answer with just the number." ;
1313
@@ -19,7 +19,7 @@ public async Task OpenAi_Should_RespondWithParams()
1919 var result = await AIHub . Chat ( )
2020 . WithModel < Gpt4oMini > ( )
2121 . WithMessage ( TestQuestion )
22- . WithInferenceParams ( new OpenAiParams
22+ . WithInferenceParams ( new OpenAiInferenceParams
2323 {
2424 Temperature = 0.3f ,
2525 MaxTokens = 100 ,
@@ -41,7 +41,7 @@ public async Task Anthropic_Should_RespondWithParams()
4141 var result = await AIHub . Chat ( )
4242 . WithModel < ClaudeSonnet4 > ( )
4343 . WithMessage ( TestQuestion )
44- . WithInferenceParams ( new AnthropicParams
44+ . WithInferenceParams ( new AnthropicInferenceParams
4545 {
4646 Temperature = 0.3f ,
4747 MaxTokens = 100 ,
@@ -63,7 +63,7 @@ public async Task Gemini_Should_RespondWithParams()
6363 var result = await AIHub . Chat ( )
6464 . WithModel < Gemini2_0Flash > ( )
6565 . WithMessage ( TestQuestion )
66- . WithInferenceParams ( new GeminiParams
66+ . WithInferenceParams ( new GeminiInferenceParams
6767 {
6868 Temperature = 0.3f ,
6969 MaxTokens = 100 ,
@@ -85,7 +85,7 @@ public async Task DeepSeek_Should_RespondWithParams()
8585 var result = await AIHub . Chat ( )
8686 . WithModel < DeepSeekReasoner > ( )
8787 . WithMessage ( TestQuestion )
88- . WithInferenceParams ( new DeepSeekParams
88+ . WithInferenceParams ( new DeepSeekInferenceParams
8989 {
9090 Temperature = 0.3f ,
9191 MaxTokens = 100 ,
@@ -107,7 +107,7 @@ public async Task GroqCloud_Should_RespondWithParams()
107107 var result = await AIHub . Chat ( )
108108 . WithModel < Llama3_1_8bInstant > ( )
109109 . WithMessage ( TestQuestion )
110- . WithInferenceParams ( new GroqCloudParams
110+ . WithInferenceParams ( new GroqCloudInferenceParams
111111 {
112112 Temperature = 0.3f ,
113113 MaxTokens = 100 ,
@@ -129,7 +129,7 @@ public async Task Xai_Should_RespondWithParams()
129129 var result = await AIHub . Chat ( )
130130 . WithModel < Grok3Beta > ( )
131131 . WithMessage ( TestQuestion )
132- . WithInferenceParams ( new XaiParams
132+ . WithInferenceParams ( new XaiInferenceParams
133133 {
134134 Temperature = 0.3f ,
135135 MaxTokens = 100 ,
@@ -175,7 +175,7 @@ public async Task LocalOllama_Should_RespondWithParams()
175175 var result = await AIHub . Chat ( )
176176 . WithModel < OllamaGemma3_4b > ( )
177177 . WithMessage ( TestQuestion )
178- . WithInferenceParams ( new OllamaParams
178+ . WithInferenceParams ( new OllamaInferenceParams
179179 {
180180 Temperature = 0.3f ,
181181 MaxTokens = 100 ,
@@ -199,7 +199,7 @@ public async Task ClaudOllama_Should_RespondWithParams()
199199 var result = await AIHub . Chat ( )
200200 . WithModel < OllamaGemma3_4b > ( )
201201 . WithMessage ( TestQuestion )
202- . WithInferenceParams ( new OllamaParams
202+ . WithInferenceParams ( new OllamaInferenceParams
203203 {
204204 Temperature = 0.3f ,
205205 MaxTokens = 100 ,
@@ -220,88 +220,88 @@ public async Task ClaudOllama_Should_RespondWithParams()
220220 [ Fact ]
221221 public async Task Self_Should_ThrowWhenGivenWrongParams ( )
222222 {
223- await Assert . ThrowsAsync < InvalidProviderParamsException > ( ( ) =>
223+ await Assert . ThrowsAsync < InvalidBackendParamsException > ( ( ) =>
224224 AIHub . Chat ( )
225225 . WithModel < Gemma2_2b > ( )
226226 . WithMessage ( TestQuestion )
227- . WithInferenceParams ( new OpenAiParams ( ) )
227+ . WithInferenceParams ( new OpenAiInferenceParams ( ) )
228228 . CompleteAsync ( ) ) ;
229229 }
230230
231231 [ Fact ]
232232 public async Task OpenAi_Should_ThrowWhenGivenWrongParams ( )
233233 {
234- await Assert . ThrowsAsync < InvalidProviderParamsException > ( ( ) =>
234+ await Assert . ThrowsAsync < InvalidBackendParamsException > ( ( ) =>
235235 AIHub . Chat ( )
236236 . WithModel < Gpt4oMini > ( )
237237 . WithMessage ( TestQuestion )
238- . WithInferenceParams ( new DeepSeekParams ( ) )
238+ . WithInferenceParams ( new DeepSeekInferenceParams ( ) )
239239 . CompleteAsync ( ) ) ;
240240 }
241241
242242 [ Fact ]
243243 public async Task Anthropic_Should_ThrowWhenGivenWrongParams ( )
244244 {
245- await Assert . ThrowsAsync < InvalidProviderParamsException > ( ( ) =>
245+ await Assert . ThrowsAsync < InvalidBackendParamsException > ( ( ) =>
246246 AIHub . Chat ( )
247247 . WithModel < ClaudeSonnet4 > ( )
248248 . WithMessage ( TestQuestion )
249- . WithInferenceParams ( new OpenAiParams ( ) )
249+ . WithInferenceParams ( new OpenAiInferenceParams ( ) )
250250 . CompleteAsync ( ) ) ;
251251 }
252252
253253 [ Fact ]
254254 public async Task Gemini_Should_ThrowWhenGivenWrongParams ( )
255255 {
256- await Assert . ThrowsAsync < InvalidProviderParamsException > ( ( ) =>
256+ await Assert . ThrowsAsync < InvalidBackendParamsException > ( ( ) =>
257257 AIHub . Chat ( )
258258 . WithModel < Gemini2_0Flash > ( )
259259 . WithMessage ( TestQuestion )
260- . WithInferenceParams ( new AnthropicParams ( ) )
260+ . WithInferenceParams ( new AnthropicInferenceParams ( ) )
261261 . CompleteAsync ( ) ) ;
262262 }
263263
264264 [ Fact ]
265265 public async Task DeepSeek_Should_ThrowWhenGivenWrongParams ( )
266266 {
267- await Assert . ThrowsAsync < InvalidProviderParamsException > ( ( ) =>
267+ await Assert . ThrowsAsync < InvalidBackendParamsException > ( ( ) =>
268268 AIHub . Chat ( )
269269 . WithModel < DeepSeekReasoner > ( )
270270 . WithMessage ( TestQuestion )
271- . WithInferenceParams ( new GeminiParams ( ) )
271+ . WithInferenceParams ( new GeminiInferenceParams ( ) )
272272 . CompleteAsync ( ) ) ;
273273 }
274274
275275 [ Fact ]
276276 public async Task GroqCloud_Should_ThrowWhenGivenWrongParams ( )
277277 {
278- await Assert . ThrowsAsync < InvalidProviderParamsException > ( ( ) =>
278+ await Assert . ThrowsAsync < InvalidBackendParamsException > ( ( ) =>
279279 AIHub . Chat ( )
280280 . WithModel < Llama3_1_8bInstant > ( )
281281 . WithMessage ( TestQuestion )
282- . WithInferenceParams ( new OpenAiParams ( ) )
282+ . WithInferenceParams ( new OpenAiInferenceParams ( ) )
283283 . CompleteAsync ( ) ) ;
284284 }
285285
286286 [ Fact ]
287287 public async Task Xai_Should_ThrowWhenGivenWrongParams ( )
288288 {
289- await Assert . ThrowsAsync < InvalidProviderParamsException > ( ( ) =>
289+ await Assert . ThrowsAsync < InvalidBackendParamsException > ( ( ) =>
290290 AIHub . Chat ( )
291291 . WithModel < Grok3Beta > ( )
292292 . WithMessage ( TestQuestion )
293- . WithInferenceParams ( new AnthropicParams ( ) )
293+ . WithInferenceParams ( new AnthropicInferenceParams ( ) )
294294 . CompleteAsync ( ) ) ;
295295 }
296296
297297 [ Fact ]
298298 public async Task Ollama_Should_ThrowWhenGivenWrongParams ( )
299299 {
300- await Assert . ThrowsAsync < InvalidProviderParamsException > ( ( ) =>
300+ await Assert . ThrowsAsync < InvalidBackendParamsException > ( ( ) =>
301301 AIHub . Chat ( )
302302 . WithModel < OllamaGemma3_4b > ( )
303303 . WithMessage ( TestQuestion )
304- . WithInferenceParams ( new DeepSeekParams ( ) )
304+ . WithInferenceParams ( new DeepSeekInferenceParams ( ) )
305305 . CompleteAsync ( ) ) ;
306306 }
307307
0 commit comments