< Summary

Information
Class: Orchestrator.Commands.Operations.Matchday.BaseSettings
Assembly: Orchestrator
File(s): /home/runner/work/KicktippAi/KicktippAi/src/Orchestrator/Commands/Operations/Matchday/BaseSettings.cs
Line coverage
75%
Covered lines: 6
Uncovered lines: 2
Coverable lines: 8
Total lines: 122
Line coverage: 75%
Branch coverage
100%
Covered branches: 6
Total branches: 6
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_IsRepredictMode()100%22100%
Validate()100%4471.43%

File(s)

/home/runner/work/KicktippAi/KicktippAi/src/Orchestrator/Commands/Operations/Matchday/BaseSettings.cs

#LineLine coverage
 1using System.ComponentModel;
 2using EHonda.KicktippAi.Core;
 3using Spectre.Console;
 4using Spectre.Console.Cli;
 5
 6namespace Orchestrator.Commands.Operations.Matchday;
 7
 8public class BaseSettings : CommandSettings
 9{
 10    [CommandArgument(0, "<MODEL>")]
 11    [Description("The OpenAI model to use for prediction")]
 12    public string? Model { get; set; }
 13
 14    [CommandOption("-c|--community")]
 15    [Description("The Kicktipp community to use (e.g., ehonda-test-buli)")]
 16    public required string Community { get; set; }
 17
 18    [CommandOption("--community-context")]
 19    [Description("The community context for filtering predictions (defaults to community name if not specified)")]
 20    public string? CommunityContext { get; set; }
 21
 22    [CommandOption("--competition")]
 23    [Description("Competition identifier (defaults from community, e.g., fifa-world-cup-2026 for ehonda-dev-wm26)")]
 24    public string? Competition { get; set; }
 25
 26    [CommandOption("--reasoning-effort")]
 27    [Description("Optional OpenAI reasoning effort (none, minimal, low, medium, high, xhigh)")]
 28    public string? ReasoningEffort { get; set; }
 29
 30    [CommandOption("--max-output-tokens")]
 31    [Description("Optional maximum output token cap for prediction generation")]
 32    public int? MaxOutputTokenCount { get; set; }
 33
 34    [CommandOption("--prompt-source")]
 35    [Description("Prompt source to use: local or langfuse")]
 36    public string? PromptSource { get; set; }
 37
 38    [CommandOption("--langfuse-prompt-name")]
 39    [Description("Langfuse hosted prompt name when --prompt-source langfuse is used")]
 40    public string? LangfusePromptName { get; set; }
 41
 42    [CommandOption("--langfuse-prompt-label")]
 43    [Description("Langfuse hosted prompt label when --prompt-source langfuse is used")]
 44    public string? LangfusePromptLabel { get; set; }
 45
 46    [CommandOption("--langfuse-prompt-version")]
 47    [Description("Optional Langfuse hosted prompt version when --prompt-source langfuse is used")]
 48    public int? LangfusePromptVersion { get; set; }
 49
 50    [CommandOption("-v|--verbose")]
 51    [Description("Enable verbose output to show detailed information")]
 52    [DefaultValue(false)]
 53    public bool Verbose { get; set; }
 54
 55    [CommandOption("--override-kicktipp")]
 56    [Description("Override existing predictions on Kicktipp (default: false)")]
 57    [DefaultValue(false)]
 58    public bool OverrideKicktipp { get; set; }
 59
 60    [CommandOption("--override-database")]
 61    [Description("Override existing predictions in the database (default: false)")]
 62    [DefaultValue(false)]
 63    public bool OverrideDatabase { get; set; }
 64
 65    [CommandOption("--agent")]
 66    [Description("Agent mode - hide prediction details from output (for automated environments)")]
 67    [DefaultValue(false)]
 68    public bool Agent { get; set; }
 69
 70    [CommandOption("--dry-run")]
 71    [Description("Dry run mode - no changes will be made to database or Kicktipp")]
 72    [DefaultValue(false)]
 73    public bool DryRun { get; set; }
 74
 75    [CommandOption("--show-context-documents")]
 76    [Description("Show the content of context documents used for prediction")]
 77    [DefaultValue(false)]
 78    public bool ShowContextDocuments { get; set; }
 79
 80    [CommandOption("--with-justification")]
 81    [Description("Include model justification text alongside predictions (non-agent mode only)")]
 82    [DefaultValue(false)]
 83    public bool WithJustification { get; set; }
 84
 85    [CommandOption("--estimated-costs")]
 86    [Description("Model to estimate costs for (e.g., o1) - shows what costs would be if using that model with same token
 87    public string? EstimatedCostsModel { get; set; }
 88
 89    [CommandOption("--repredict")]
 90    [Description("Enable reprediction mode - create new predictions with incremented reprediction index (cannot be used 
 91    [DefaultValue(false)]
 92    public bool Repredict { get; set; }
 93
 94    [CommandOption("--max-repredictions")]
 95    [Description("Maximum number of repredictions allowed (0-based index). Implies --repredict. Example: 2 allows repred
 96    public int? MaxRepredictions { get; set; }
 97
 98    /// <summary>
 99    /// Gets whether reprediction mode is enabled (either explicitly via --repredict or implicitly via --max-repredictio
 100    /// </summary>
 1101    public bool IsRepredictMode => Repredict || MaxRepredictions.HasValue;
 102
 103    public override ValidationResult Validate()
 104    {
 1105        if (string.IsNullOrWhiteSpace(Model))
 106        {
 0107            return ValidationResult.Error("MODEL is required");
 108        }
 109
 1110        if (!PredictionModelConfig.IsValidReasoningEffort(ReasoningEffort))
 111        {
 0112            return ValidationResult.Error("--reasoning-effort must be one of: none, minimal, low, medium, high, xhigh");
 113        }
 114
 1115        if (MaxOutputTokenCount is < 1)
 116        {
 1117            return ValidationResult.Error("--max-output-tokens must be at least 1 when provided");
 118        }
 119
 1120        return ValidationResult.Success();
 121    }
 122}

Methods/Properties

get_IsRepredictMode()
Validate()