Refactored constants in ProviderOpenRouter.

This commit is contained in:
Thorsten Sommer 2025-12-15 19:15:27 +01:00
parent 5b62c7f7ed
commit dd06a1a0a8
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -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<ProviderOpenRouter> LOGGER = Program.LOGGER_FACTORY.CreateLogger<ProviderOpenRouter>();
#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
{