8 writes to ModelId
Microsoft.Extensions.AI.Abstractions (1)
ChatCompletion\ChatOptions.cs (1)
82ModelId = ModelId,
Microsoft.Extensions.AI.Abstractions.Tests (2)
ChatCompletion\ChatOptionsTests.cs (2)
76options.ModelId = "modelId"; 136options.ModelId = "modelId";
Microsoft.Extensions.AI.Ollama.Tests (2)
OllamaChatClientIntegrationTests.cs (1)
44ModelId = "llama3:8b",
OllamaChatClientTests.cs (1)
267ModelId = "llama3.1",
Microsoft.Extensions.AI.OpenAI (1)
OpenAIModelMapper.ChatCompletion.cs (1)
150result.ModelId = _getModelIdAccessor.Invoke(options, null)?.ToString();
Microsoft.Extensions.AI.Tests (2)
ChatCompletion\ConfigureOptionsChatClientTests.cs (1)
35ChatOptions? providedOptions = nullProvidedOptions ? null : new() { ModelId = "test" };
ChatCompletion\OpenTelemetryChatClientTests.cs (1)
122ModelId = "replacementmodel",
34 references to ModelId
Microsoft.Extensions.AI (3)
ChatCompletion\OpenTelemetryChatClient.cs (3)
129string? requestModelId = options?.ModelId ?? _modelId; 160string? requestModelId = options?.ModelId ?? _modelId; 217string? modelId = options?.ModelId ?? _modelId;
Microsoft.Extensions.AI.Abstractions (2)
ChatCompletion\ChatClientMetadata.cs (1)
38/// An individual request may override this value via <see cref="ChatOptions.ModelId"/>.
ChatCompletion\ChatOptions.cs (1)
82ModelId = ModelId,
Microsoft.Extensions.AI.Abstractions.Tests (5)
ChatCompletion\ChatOptionsTests.cs (5)
24Assert.Null(options.ModelId); 39Assert.Null(clone.ModelId); 90Assert.Equal("modelId", options.ModelId); 105Assert.Equal("modelId", clone.ModelId); 159Assert.Equal("modelId", deserialized.ModelId);
Microsoft.Extensions.AI.AzureAIInference (4)
AzureAIInferenceChatClient.cs (2)
38/// <param name="modelId">The ID of the model to use. If null, it can be provided per request via <see cref="ChatOptions.ModelId"/>.</param> 294Model = options?.ModelId ?? Metadata.ModelId ?? throw new InvalidOperationException("No model id was provided when either constructing the client or in the chat options.")
AzureAIInferenceExtensions.cs (2)
13/// <param name="modelId">The ID of the model to use. If null, it can be provided per request via <see cref="ChatOptions.ModelId"/>.</param> 21/// <param name="modelId">The ID of the model to use. If null, it can be provided per request via <see cref="ChatOptions.ModelId"/>.</param>
Microsoft.Extensions.AI.Ollama (10)
OllamaChatClient.cs (6)
40/// The ID of the model to use. This ID can also be overridden per request via <see cref="ChatOptions.ModelId"/>. 41/// Either this parameter or <see cref="ChatOptions.ModelId"/> must provide a valid model ID. 52/// The ID of the model to use. This ID can also be overridden per request via <see cref="ChatOptions.ModelId"/>. 53/// Either this parameter or <see cref="ChatOptions.ModelId"/> must provide a valid model ID. 102ModelId = response.Model ?? options?.ModelId ?? Metadata.ModelId, 284Model = options?.ModelId ?? Metadata.ModelId ?? string.Empty,
OllamaEmbeddingGenerator.cs (4)
27/// The ID of the model to use. This ID can also be overridden per request via <see cref="ChatOptions.ModelId"/>. 28/// Either this parameter or <see cref="ChatOptions.ModelId"/> must provide a valid model ID. 39/// The ID of the model to use. This ID can also be overridden per request via <see cref="ChatOptions.ModelId"/>. 40/// Either this parameter or <see cref="ChatOptions.ModelId"/> must provide a valid model ID.
Microsoft.Extensions.AI.OpenAI (1)
OpenAIModelMapper.ChatMessage.cs (1)
25ModelId = chatOptions.ModelId,
Microsoft.Extensions.AI.OpenAI.Tests (6)
OpenAISerializationTests.cs (6)
37Assert.Equal("gpt-4o-mini", request.Options.ModelId); 70Assert.Equal("gpt-4o-mini", request.Options.ModelId); 135Assert.Equal("gpt-4o-mini", request.Options.ModelId); 237Assert.Equal("gpt-4o-mini", request.Options.ModelId); 329Assert.Equal("gpt-4o-mini", request.Options.ModelId); 397Assert.Equal("gpt-4o-mini", request.Options.ModelId);
Microsoft.Extensions.AI.Tests (3)
ChatCompletion\ConfigureOptionsChatClientTests.cs (3)
65Assert.Null(options.ModelId); 69Assert.Equal(providedOptions!.ModelId, options.ModelId);