diff --git a/app/MindWork AI Studio/Models/Matching/ModelId.cs b/app/MindWork AI Studio/Models/Matching/ModelId.cs index 72bb910c..dcbb4712 100644 --- a/app/MindWork AI Studio/Models/Matching/ModelId.cs +++ b/app/MindWork AI Studio/Models/Matching/ModelId.cs @@ -28,13 +28,12 @@ public readonly struct ModelId(string modelId) : IEquatable /// private const int MAX_STACK_ALLOCATED_MODEL_ID_LENGTH = 256; - private readonly string originalId = modelId ?? string.Empty; private readonly string normalizedId = Normalize(modelId); /// /// The ID exactly as the provider reported it. This is what a person sees. /// - public string Original => this.originalId ?? string.Empty; + public string Original => modelId ?? string.Empty; /// /// The ID in lowercase, with every separator written as a single hyphen. diff --git a/app/MindWork AI Studio/Models/Matching/RuleSpecificity.cs b/app/MindWork AI Studio/Models/Matching/RuleSpecificity.cs index 87423957..6b6e09bb 100644 --- a/app/MindWork AI Studio/Models/Matching/RuleSpecificity.cs +++ b/app/MindWork AI Studio/Models/Matching/RuleSpecificity.cs @@ -53,7 +53,6 @@ public readonly record struct RuleSpecificity(int ExplicitRank, int Kind, int Pa MatchKind.EXACT => 3, MatchKind.PREFIX => 2, MatchKind.SEGMENT => 1, - MatchKind.SUBSTRING => 0, _ => 0, }; diff --git a/app/MindWork AI Studio/Models/ModelProfileChange.cs b/app/MindWork AI Studio/Models/ModelProfileChange.cs index 734c5afb..28a093d8 100644 --- a/app/MindWork AI Studio/Models/ModelProfileChange.cs +++ b/app/MindWork AI Studio/Models/ModelProfileChange.cs @@ -64,9 +64,14 @@ public sealed record ModelProfileChange /// carried them could say that a model both always reasons and reasons on request. A rule which /// declares one has still made a mistake, which is why the tests and the verification run look /// for it instead of relying on this line to hide it. + /// + /// Every member of a profile is named below, so the copy could be written as a new profile + /// instead. It stays a copy on purpose: the day a profile learns something this change does not + /// know about yet, a modifier has to hand that on rather than reset it to nothing. /// /// What is known so far. - /// What is known afterwards. + /// What is known afterward. + // ReSharper disable once WithExpressionModifiesAllMembers public ModelProfile ApplyTo(in ModelProfile profile) => profile with { Capabilities = (profile.Capabilities | this.Adds) & ~this.Removes & ~ModelProfile.REASONING_VOCABULARY, diff --git a/app/MindWork AI Studio/Models/ModelRuleBuilder.cs b/app/MindWork AI Studio/Models/ModelRuleBuilder.cs index 6f4376ef..a6564a6b 100644 --- a/app/MindWork AI Studio/Models/ModelRuleBuilder.cs +++ b/app/MindWork AI Studio/Models/ModelRuleBuilder.cs @@ -227,11 +227,11 @@ public sealed class ModelRuleBuilder(string patternText, ModelRuleKind ruleKind, /// Worth preferring over the plain form in a family with more than one generation: naming the /// rule survives somebody reordering the file, while "the one before" does not. /// - /// The text of the rule to inherit from. + /// The text of the rule to inherit from. /// The rule, to go on stating. - public ModelRuleBuilder InheritsFrom(string patternText) + public ModelRuleBuilder InheritsFrom(string inheritedPatternText) { - this.inheritsFromText = patternText; + this.inheritsFromText = inheritedPatternText; return this; } diff --git a/app/MindWork AI Studio/Models/OpenAI/Gpt4oFamily.cs b/app/MindWork AI Studio/Models/OpenAI/Gpt4oFamily.cs index ac25b788..c17b144b 100644 --- a/app/MindWork AI Studio/Models/OpenAI/Gpt4oFamily.cs +++ b/app/MindWork AI Studio/Models/OpenAI/Gpt4oFamily.cs @@ -1,4 +1,5 @@ using static AIStudio.Provider.Capability; +// ReSharper disable InconsistentNaming namespace AIStudio.Models.OpenAI; @@ -7,7 +8,7 @@ namespace AIStudio.Models.OpenAI; /// /// /// The previous rules never named this family. Its models reached the last line of the OpenAI -/// function, the one which answers for everything nobody wrote a rule for, and that line happened +/// function, the one that answers for everything nobody wrote a rule for, and that line happened /// to describe GPT-4o exactly. Writing it down changes no answer and takes the family out of the /// fallback, where a wrong answer looks like no answer. /// diff --git a/app/Tests/Models/ZAI/GlmFamilyTests.cs b/app/Tests/Models/ZAI/GlmFamilyTests.cs index 79c313f8..5f75f6ce 100644 --- a/app/Tests/Models/ZAI/GlmFamilyTests.cs +++ b/app/Tests/Models/ZAI/GlmFamilyTests.cs @@ -1,5 +1,6 @@ using AIStudio.Models.Registry; using AIStudio.Provider; +// ReSharper disable InconsistentNaming namespace AIStudio.Tests.Models.ZAI; @@ -8,7 +9,7 @@ namespace AIStudio.Tests.Models.ZAI; /// /// /// Z AI marks its vision models by gluing a "v" to the version number: glm-4v, glm-4.1v, glm-4.5v. -/// That is not a name part, so no pattern can ask about it and the family works it out of the name +/// That is not a name part, so no pattern can ask about it, and the family works it out of the name /// instead -- the second of the two places in the rebuilt rules where a capability is calculated. /// /// These need tests of their own because the corpus cannot tell the calculation apart from a