mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-09-28 06:43:38 +00:00
51 lines
2.2 KiB
C#
51 lines
2.2 KiB
C#
using static AIStudio.Provider.Capability;
|
|
|
|
namespace AIStudio.Models.OpenAI;
|
|
|
|
/// <summary>
|
|
/// The o-series: o1, o3, o4 and their minis, the models which reason before they answer.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Every one of them always reasons; what differs is how much else they can do, and the minis are
|
|
/// consistently the ones which can do less. That the mini is not simply a smaller version of its
|
|
/// generation is why each of them is stated in full: o1-mini has neither images nor tools and
|
|
/// answers only through the chat completion API, while o3-mini has tools but no images.
|
|
///
|
|
/// The minis need no ordering: their patterns are longer, so they win over the generation they
|
|
/// belong to without anybody saying which rule to try first.
|
|
/// </remarks>
|
|
public sealed class OSeriesFamily : ModelFamily
|
|
{
|
|
/// <inheritdoc />
|
|
public override ModelVendor Vendor => ModelVendor.OPEN_AI;
|
|
|
|
/// <inheritdoc />
|
|
public override ModelSource Source => new("https://platform.openai.com/docs/models", new DateOnly(2026, 9, 11), "Ported unchanged from the rules in ProviderExtensions.OpenAI.cs, one rule per generation and one per mini.");
|
|
|
|
/// <inheritdoc />
|
|
protected override void Declare(ModelFamilyBuilder builder)
|
|
{
|
|
builder.Rule("o1").AsPrefix()
|
|
.Capabilities(TEXT_INPUT | MULTIPLE_IMAGE_INPUT | TEXT_OUTPUT | FUNCTION_CALLING)
|
|
.Apis(RESPONSES_API)
|
|
.Reasoning(ReasoningSupport.ALWAYS);
|
|
|
|
builder.Rule("o1-mini").AsPrefix()
|
|
.Capabilities(TEXT_INPUT | TEXT_OUTPUT)
|
|
.Apis(CHAT_COMPLETION_API)
|
|
.Reasoning(ReasoningSupport.ALWAYS);
|
|
|
|
builder.Rule("o3").AsPrefix()
|
|
.Capabilities(TEXT_INPUT | MULTIPLE_IMAGE_INPUT | TEXT_OUTPUT | FUNCTION_CALLING | WEB_SEARCH)
|
|
.Apis(RESPONSES_API)
|
|
.Reasoning(ReasoningSupport.ALWAYS);
|
|
|
|
builder.Rule("o3-mini").AsPrefix()
|
|
.Capabilities(TEXT_INPUT | TEXT_OUTPUT | FUNCTION_CALLING)
|
|
.Apis(RESPONSES_API)
|
|
.Reasoning(ReasoningSupport.ALWAYS);
|
|
|
|
// The one mini which is not cut down: it is the o3 generation under another number.
|
|
builder.Rule("o4-mini").AsPrefix().InheritsFrom("o3");
|
|
}
|
|
} |