From dd06a1a0a8d258282a5be6500bc68e7f40caaef4 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Mon, 15 Dec 2025 19:15:27 +0100 Subject: [PATCH] Refactored constants in ProviderOpenRouter. --- .../Provider/OpenRouter/ProviderOpenRouter.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/MindWork AI Studio/Provider/OpenRouter/ProviderOpenRouter.cs b/app/MindWork AI Studio/Provider/OpenRouter/ProviderOpenRouter.cs index b0c70aa4..f6006952 100644 --- a/app/MindWork AI Studio/Provider/OpenRouter/ProviderOpenRouter.cs +++ b/app/MindWork AI Studio/Provider/OpenRouter/ProviderOpenRouter.cs @@ -11,6 +11,9 @@ namespace AIStudio.Provider.OpenRouter; public sealed class ProviderOpenRouter() : BaseProvider("https://openrouter.ai/api/v1/", LOGGER) { + private const string PROJECT_WEBSITE = "https://github.com/MindWorkAI/AI-Studio"; + private const string PROJECT_NAME = "MindWork AI Studio"; + private static readonly ILogger LOGGER = Program.LOGGER_FACTORY.CreateLogger(); #region Implementation of IProvider @@ -38,11 +41,7 @@ public sealed class ProviderOpenRouter() : BaseProvider("https://openrouter.ai/a // Parse the API parameters: var apiParameters = this.ParseAdditionalApiParameters(); - - // Extract custom header values from API parameters if present - const string PROJECT_WEBSITE = "https://github.com/MindWorkAI/AI-Studio"; - const string PROJECT_NAME = "MindWork AI Studio"; - + // Build the list of messages: var messages = await chatThread.Blocks.BuildMessages(async n => new Message {