Added a way for organizations to prohibit providers (#1105)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-10-22 18:57:12 +02:00
1 parent 052868b24e
commit 7ba5f01388
38 files changed
+1488 -629

No files matched your search

@@ -1,5 +1,6 @@
using System.Linq.Expressions;
using AIStudio.Provider;
using AIStudio.Tools.PluginSystem;
namespace AIStudio.Settings.DataModel;
@@ -192,6 +193,17 @@ public sealed class DataApp(Expression<Func<Data, DataApp>>? configSelection = n
/// </summary>
public bool AllowUserToAddTranscriptionProvider { get; set; } = ManagedConfiguration.Register(configSelection, n => n.AllowUserToAddTranscriptionProvider, true);
/// <summary>
/// The providers an organization prohibited, for LLMs, embeddings, and transcriptions alike.
/// </summary>
/// <remarks>
/// A prohibition names the operator of an API, not a family of models: prohibiting the API of a
/// model maker leaves its models reachable through a hub or a self-hosted server. Providers the
/// user set up before stay in the settings, so they are back once the prohibition ends, but
/// AI Studio neither offers nor contacts them, see SettingsManager.IsProviderProhibited.
/// </remarks>
public HashSet<LLMProviders> ProhibitedProviders { get; set; } = ManagedConfiguration.Register(configSelection, n => n.ProhibitedProviders, []);
/// <summary>
/// Should the user be allowed to add mailboxes?
/// </summary>