## Purpose Define the shared data models and API contract for system prompt and model settings — ModelSettings class, ChatRequest extensions, and backend handling. ## Requirements ### Requirement: ModelSettings shared model The Shared project SHALL define a `ModelSettings` class with nullable properties: `Temperature` (double?), `TopP` (double?), `MaxTokens` (int?). Null values indicate "use server default". #### Scenario: All fields null - **WHEN** a ModelSettings instance has all null fields - **THEN** the backend uses Semantic Kernel default values for all parameters #### Scenario: Partial override - **WHEN** a ModelSettings instance has Temperature set but TopP and MaxTokens null - **THEN** only Temperature is overridden; other parameters use defaults ### Requirement: System prompt in chat request The `ChatRequest` SHALL accept an optional `SystemPrompt` (string?) property. When present and non-empty, the backend SHALL insert it as the first system message in the ChatHistory before user/assistant messages. #### Scenario: System prompt provided - **WHEN** a ChatRequest includes a non-empty SystemPrompt - **THEN** the ChatHistory starts with a system message containing that text, followed by the conversation messages #### Scenario: System prompt absent - **WHEN** a ChatRequest has a null or empty SystemPrompt - **THEN** the ChatHistory contains only user and assistant messages (no system message) ### Requirement: Model settings in chat request The `ChatRequest` SHALL accept an optional `Settings` (ModelSettings?) property. When present, the backend SHALL apply non-null values to `OpenAIPromptExecutionSettings` before calling the Semantic Kernel. #### Scenario: Temperature override - **WHEN** a ChatRequest includes Settings with Temperature = 0.5 - **THEN** the OpenAIPromptExecutionSettings.Temperature is set to 0.5 #### Scenario: No settings provided - **WHEN** a ChatRequest has null Settings - **THEN** the backend uses default OpenAIPromptExecutionSettings (only FunctionChoiceBehavior.Auto is set)