Rebuilt how AI Studio knows what a model can do (#960)
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
Build and Release / Verify (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-09-13 14:17:25 +02:00
1 parent d21e09dd1e
commit d85b4e71b6
287 files changed
+18341 -3677

No files matched your search

@@ -0,0 +1,29 @@
using AIStudio.Provider;
using static AIStudio.Provider.Capability;
namespace AIStudio.Models.Alibaba;
/// <summary>
/// Alibaba's embedding models, which turn text into a vector and answer nothing.
/// </summary>
/// <remarks>
/// The previous rules answered for these with the Model Studio default and told them they call
/// functions. The prefix is Alibaba's own: the app filters the catalog by "text-embedding-" to find
/// them, which is also why the rule may be written that broadly -- bound to this provider, it can
/// only ever meet the models Alibaba names that way.
/// </remarks>
public sealed class ModelStudioEmbeddingFamily : ModelFamily
{
/// <inheritdoc />
public override ModelVendor Vendor => ModelVendor.ALIBABA;
/// <inheritdoc />
public override ModelSource Source => new("https://www.alibabacloud.com/help/en/model-studio/embedding", new DateOnly(2026, 9, 11), "Provider/AlibabaCloud/ProviderAlibabaCloud.cs adds these in GetEmbeddingModels and filters the catalog by the prefix \"text-embedding-\".");
/// <inheritdoc />
protected override void Declare(ModelFamilyBuilder builder) =>
builder.Rule("text-embedding").AsPrefix().OnlyOn(LLMProviders.ALIBABA_CLOUD)
.Capabilities(TEXT_INPUT | EMBEDDING)
.Kind(ModelKind.EMBEDDING);
}
@@ -0,0 +1,24 @@
using AIStudio.Provider;
using static AIStudio.Provider.Capability;
namespace AIStudio.Models.Alibaba;
/// <summary>
/// QVQ, the thinking-only model which also looks at pictures.
/// </summary>
public sealed class ModelStudioQvqFamily : ModelFamily
{
/// <inheritdoc />
public override ModelVendor Vendor => ModelVendor.ALIBABA;
/// <inheritdoc />
public override ModelSource Source => new("https://www.alibabacloud.com/help/en/model-studio/models", new DateOnly(2026, 9, 11), "Ported unchanged from the rules in ProviderExtensions.Alibaba.cs: images in, thinking which cannot be switched off, and no tools.");
/// <inheritdoc />
protected override void Declare(ModelFamilyBuilder builder) =>
builder.Rule("qvq").AsSegment().OnlyOn(LLMProviders.ALIBABA_CLOUD)
.Capabilities(TEXT_INPUT | MULTIPLE_IMAGE_INPUT | TEXT_OUTPUT)
.Apis(CHAT_COMPLETION_API)
.Reasoning(ReasoningSupport.ALWAYS);
}
@@ -0,0 +1,83 @@
using AIStudio.Provider;
using static AIStudio.Provider.Capability;
namespace AIStudio.Models.Alibaba;
/// <summary>
/// The Qwen models Alibaba Cloud Model Studio serves.
/// </summary>
/// <remarks>
/// Everything called Model Studio here is bound to Alibaba Cloud, and that is the point of it.
/// Model Studio sells commercial models -- qwen-max, qwen3.7-max, qwq-plus -- which carry the
/// family names of the open weights without being them, and it answers differently for several
/// names the open weights share with it. The old rules kept the two apart by having two functions;
/// here they are kept apart by saying which provider a rule speaks for. The unbound families next
/// to these are the open weights, which answer everywhere else.
///
/// The first rule is the catalog's own fallback, and it is written as a plain substring on purpose:
/// a substring is the weakest thing a rule can be, so every other rule here beats it without anyone
/// arranging that. It also has to be one, because "qwen2.5-72b-instruct" does not contain "qwen" as
/// a whole name part -- the version grows straight out of the family name.
/// </remarks>
public sealed class ModelStudioQwenFamily : ModelFamily
{
/// <inheritdoc />
public override ModelVendor Vendor => ModelVendor.ALIBABA;
/// <inheritdoc />
public override ModelSource Source => new("https://www.alibabacloud.com/help/en/model-studio/models", new DateOnly(2026, 9, 12), "Capabilities ported unchanged from ProviderExtensions.Alibaba.cs, which follow Alibaba's own list of models that call functions. Alibaba's announcement of Qwen3.8-Max states a window of up to one million tokens; the other Qwen models are served at sizes their list does not state per model.");
/// <inheritdoc />
protected override void Declare(ModelFamilyBuilder builder)
{
builder.Rule("qwen").AsSubstring().OnlyOn(LLMProviders.ALIBABA_CLOUD)
.Capabilities(TEXT_INPUT | TEXT_OUTPUT | FUNCTION_CALLING)
.Apis(CHAT_COMPLETION_API);
// Qwen 3 thinks when asked to:
builder.Rule("qwen3").AsPrefix().OnlyOn(LLMProviders.ALIBABA_CLOUD).Inherits()
.Reasoning(ReasoningSupport.OPTIONAL);
builder.Rule("qwen3.5").AsPrefix().OnlyOn(LLMProviders.ALIBABA_CLOUD).InheritsFrom("qwen3")
.Capabilities(MULTIPLE_IMAGE_INPUT);
builder.Rule("qwen3.6").AsPrefix().OnlyOn(LLMProviders.ALIBABA_CLOUD).InheritsFrom("qwen3")
.Capabilities(MULTIPLE_IMAGE_INPUT | VIDEO_INPUT)
.Reasoning(ReasoningSupport.ALWAYS);
//
// Qwen 3.7 thinks unless it is told not to, and it started out reading nothing but text.
// Vision arrived in the middle of the series, so only the June snapshot may be told that
// it sees: the rolling max alias still answers as the May one.
//
builder.Rule("qwen3.7").AsPrefix().OnlyOn(LLMProviders.ALIBABA_CLOUD).InheritsFrom("qwen3")
.Reasoning(ReasoningSupport.ON_BY_DEFAULT);
builder.Rule("qwen3.7").AsPrefix().AlsoContains("preview").OnlyOn(LLMProviders.ALIBABA_CLOUD).Inherits()
.Reasoning(ReasoningSupport.ALWAYS);
builder.Rule("qwen3.7").AsPrefix().AlsoContains("2026-05-17").OnlyOn(LLMProviders.ALIBABA_CLOUD).Inherits();
builder.Rule("qwen3.7").AsPrefix().AlsoContains("2026-06-08").OnlyOn(LLMProviders.ALIBABA_CLOUD)
.Capabilities(TEXT_INPUT | MULTIPLE_IMAGE_INPUT | VIDEO_INPUT | TEXT_OUTPUT | FUNCTION_CALLING)
.Apis(CHAT_COMPLETION_API)
.Reasoning(ReasoningSupport.ON_BY_DEFAULT);
// Qwen 3.8, whose 27B checkpoint is what the tier without a size resolves to:
builder.Rule("qwen3.8").AsPrefix().OnlyOn(LLMProviders.ALIBABA_CLOUD).InheritsFrom("qwen3")
.Capabilities(MULTIPLE_IMAGE_INPUT)
.Reasoning(ReasoningSupport.ON_BY_DEFAULT);
builder.Rule("qwen3.8-flash").AsPrefix().OnlyOn(LLMProviders.ALIBABA_CLOUD).Inherits()
.Capabilities(VIDEO_INPUT);
//
// Unlike the open-weight checkpoint of the same name, the Max model keeps its vision when
// it is reached through Model Studio:
//
builder.Rule("qwen3.8-max").AsPrefix().OnlyOn(LLMProviders.ALIBABA_CLOUD).InheritsFrom("qwen3.8-flash")
.Reasoning(ReasoningSupport.ALWAYS)
.ContextWindow(1_000_000);
}
}
@@ -0,0 +1,32 @@
using AIStudio.Provider;
using static AIStudio.Provider.Capability;
namespace AIStudio.Models.Alibaba;
/// <summary>
/// The Qwen Omni models, which take everything in and answer in text or in speech.
/// </summary>
/// <remarks>
/// Alibaba lists the Qwen3 Omni series among the models which call functions and leaves the older
/// ones off that list, which is the whole difference between the two rules below.
/// </remarks>
public sealed class ModelStudioQwenOmniFamily : ModelFamily
{
/// <inheritdoc />
public override ModelVendor Vendor => ModelVendor.ALIBABA;
/// <inheritdoc />
public override ModelSource Source => new("https://www.alibabacloud.com/help/en/model-studio/models", new DateOnly(2026, 9, 11), "Ported unchanged from the rules in ProviderExtensions.Alibaba.cs: every modality in, text and speech out, tool calling from Qwen3 on.");
/// <inheritdoc />
protected override void Declare(ModelFamilyBuilder builder)
{
builder.Rule("qwen").AsSubstring().AlsoContains("omni").OnlyOn(LLMProviders.ALIBABA_CLOUD)
.Capabilities(TEXT_INPUT | MULTIPLE_IMAGE_INPUT | AUDIO_INPUT | SPEECH_INPUT | VIDEO_INPUT | TEXT_OUTPUT | SPEECH_OUTPUT)
.Apis(CHAT_COMPLETION_API);
builder.Rule("qwen3").AsPrefix().AlsoContains("omni").OnlyOn(LLMProviders.ALIBABA_CLOUD).Inherits()
.Capabilities(FUNCTION_CALLING);
}
}
@@ -0,0 +1,32 @@
using AIStudio.Provider;
using static AIStudio.Provider.Capability;
namespace AIStudio.Models.Alibaba;
/// <summary>
/// The Qwen VL models, the ones built to look at pictures.
/// </summary>
/// <remarks>
/// As with the Omni series, Alibaba names only the Qwen3 VL models as function callers and the
/// older ones not at all.
/// </remarks>
public sealed class ModelStudioQwenVisionFamily : ModelFamily
{
/// <inheritdoc />
public override ModelVendor Vendor => ModelVendor.ALIBABA;
/// <inheritdoc />
public override ModelSource Source => new("https://www.alibabacloud.com/help/en/model-studio/models", new DateOnly(2026, 9, 11), "Ported unchanged from the rules in ProviderExtensions.Alibaba.cs: images in, and tool calling from Qwen3 on.");
/// <inheritdoc />
protected override void Declare(ModelFamilyBuilder builder)
{
builder.Rule("qwen").AsSubstring().AlsoContains("vl").OnlyOn(LLMProviders.ALIBABA_CLOUD)
.Capabilities(TEXT_INPUT | MULTIPLE_IMAGE_INPUT | TEXT_OUTPUT)
.Apis(CHAT_COMPLETION_API);
builder.Rule("qwen3").AsPrefix().AlsoContains("vl").OnlyOn(LLMProviders.ALIBABA_CLOUD).Inherits()
.Capabilities(FUNCTION_CALLING);
}
}
@@ -0,0 +1,34 @@
using AIStudio.Provider;
using static AIStudio.Provider.Capability;
namespace AIStudio.Models.Alibaba;
/// <summary>
/// QwQ as Model Studio serves it, which is qwq-plus.
/// </summary>
/// <remarks>
/// This is the contradiction the provider-bound rules were built for. What Model Studio sells under
/// this name is a commercial thinking-only model built on Qwen 2.5; QwQ-32B, which everybody else
/// serves, is the open-weight model. They share a family name and nothing else, and the old rules
/// could only keep them apart by living in two different functions.
///
/// Neither of them appears in Alibaba's list of models which call functions, and the model card of
/// the open weights does not mention tools at all, which is why no such ability is stated here.
/// Anybody who knows better turns it on in the expert settings.
/// </remarks>
public sealed class ModelStudioQwqFamily : ModelFamily
{
/// <inheritdoc />
public override ModelVendor Vendor => ModelVendor.ALIBABA;
/// <inheritdoc />
public override ModelSource Source => new("https://www.alibabacloud.com/help/en/model-studio/models", new DateOnly(2026, 9, 11), "Ported unchanged from the rules in ProviderExtensions.Alibaba.cs: text in, text out, thinking which cannot be switched off, and no tools.");
/// <inheritdoc />
protected override void Declare(ModelFamilyBuilder builder) =>
builder.Rule("qwq").AsSegment().OnlyOn(LLMProviders.ALIBABA_CLOUD)
.Capabilities(TEXT_INPUT | TEXT_OUTPUT)
.Apis(CHAT_COMPLETION_API)
.Reasoning(ReasoningSupport.ALWAYS);
}
@@ -0,0 +1,77 @@
using static AIStudio.Provider.Capability;
namespace AIStudio.Models.Alibaba;
/// <summary>
/// Qwen as everybody except Alibaba Cloud serves it: the open weights.
/// </summary>
/// <remarks>
/// The counterpart to the Model Studio families next door, and the reason those are bound to their
/// provider. Alibaba sells commercial models under the same family names, and for several of them
/// it promises something else than the published checkpoint does. Nothing here is bound: these
/// rules answer wherever the weights are run, which is every gateway and every engine somebody
/// starts on their own machine.
///
/// The whole line calls functions, from Qwen 2.5 on, and the Coder checkpoints are built for
/// exactly that. Thinking is not promised by the fallback: the older generations cannot do it, and
/// which of the newer ones think by default differs per checkpoint, so those say it one by one.
/// </remarks>
public sealed class QwenFamily : ModelFamily
{
/// <inheritdoc />
public override ModelVendor Vendor => ModelVendor.ALIBABA;
/// <inheritdoc />
public override ModelSource Source => new("https://huggingface.co/Qwen", new DateOnly(2026, 9, 11), "Ported unchanged from the Qwen block of ProviderExtensions.OpenSource.cs, which is the one answering everywhere but Alibaba Cloud.");
/// <inheritdoc />
protected override void Declare(ModelFamilyBuilder builder)
{
//
// A substring, because the version grows straight out of the family name: there is no name
// part "qwen" in "qwen2.5-72b-instruct". It is also the weakest thing a rule can be, which
// is what lets every rule below beat it without anybody arranging an order.
//
builder.Rule("qwen").AsSubstring()
.Capabilities(TEXT_INPUT | TEXT_OUTPUT | FUNCTION_CALLING)
.Apis(CHAT_COMPLETION_API);
// The VL checkpoints are the ones built to look at pictures:
builder.Rule("qwen").AsSubstring().AlsoContains("vl").Inherits()
.Capabilities(MULTIPLE_IMAGE_INPUT);
// Qwen 3.5 sees, and thinks when the request asks it to:
builder.Rule("qwen3.5").AsPrefix()
.Capabilities(TEXT_INPUT | MULTIPLE_IMAGE_INPUT | TEXT_OUTPUT | FUNCTION_CALLING)
.Apis(CHAT_COMPLETION_API)
.Reasoning(ReasoningSupport.OPTIONAL);
builder.Rule("qwen3.6").AsPrefix().Inherits()
.Reasoning(ReasoningSupport.ON_BY_DEFAULT);
//
// The 3.8 tier without a size is the 27B checkpoint: that is what a rolling tag such as
// "qwen3.8:latest" resolves to, so it is what the tier may promise.
//
builder.Rule("qwen3.8").AsPrefix().InheritsFrom("qwen3.6");
// Flash-Next is the published checkpoint and Flash the production model; both watch videos:
builder.Rule("qwen3.8-flash").AsPrefix().InheritsFrom("qwen3.8")
.Capabilities(VIDEO_INPUT);
//
// Blablador writes the 27B checkpoint in two further ways, and no normalization turns
// either into the canonical name: it separates the family from the version ("Qwen 3.8-27B
// with DFlash on haicluster"), and its short alias drops the dot ("alias-qwen38-27b").
//
builder.Rule("qwen-3.8-27b").AsSegment().InheritsFrom("qwen3.8");
builder.Rule("qwen38-27b").AsSegment().InheritsFrom("qwen3.8");
// The big 3.8 checkpoint reads nothing but text, and it thinks whatever it is asked:
builder.Rule("qwen3.8-2.4t-a95b").AsPrefix()
.Capabilities(TEXT_INPUT | TEXT_OUTPUT | FUNCTION_CALLING)
.Apis(CHAT_COMPLETION_API)
.Reasoning(ReasoningSupport.ALWAYS);
}
}
@@ -0,0 +1,31 @@
using static AIStudio.Provider.Capability;
namespace AIStudio.Models.Alibaba;
/// <summary>
/// QwQ as everybody except Alibaba Cloud serves it: the open weights built on Qwen 2.5.
/// </summary>
/// <remarks>
/// The other half of the contradiction the provider-bound rules exist for. What Model Studio sells
/// as "qwq-plus" is a commercial model; QwQ-32B, which the gateways and the local engines serve, is
/// the published checkpoint. The two share a family name and nothing else.
///
/// Both answer the same here, and for the same reason: neither the model card nor Alibaba's list of
/// models which call functions mentions tools at all. Anybody who knows better says so in the
/// expert settings.
/// </remarks>
public sealed class QwqFamily : ModelFamily
{
/// <inheritdoc />
public override ModelVendor Vendor => ModelVendor.ALIBABA;
/// <inheritdoc />
public override ModelSource Source => new("https://huggingface.co/Qwen/QwQ-32B", new DateOnly(2026, 9, 11), "Ported unchanged from the QwQ check of ProviderExtensions.OpenSource.cs: text in, text out, thinking which cannot be switched off, and no tools.");
/// <inheritdoc />
protected override void Declare(ModelFamilyBuilder builder) =>
builder.Rule("qwq").AsSegment()
.Capabilities(TEXT_INPUT | TEXT_OUTPUT)
.Apis(CHAT_COMPLETION_API)
.Reasoning(ReasoningSupport.ALWAYS);
}