Documentation
¶
Index ¶
- Constants
- func BuildDefaultMaxTurnsExpression() string
- func BuildModelOverrideExpression(primaryVar, enterpriseDefaultVar, builtinFallback string) string
- func BuildModelOverrideExpressionEmptyFallback(primaryVar, enterpriseDefaultVar string) string
- func ResolveDefaultDetectionModel(fallback string) string
- func ResolveDefaultMaxAICredits(fallback int64) int64
- func ResolveDefaultMaxDailyAICredits(fallback string) string
- func ResolveDefaultMaxEffectiveTokens(fallback int64) int64
- func ResolveDefaultMaxTurns(fallback string) string
- func ResolveDefaultTimeoutMinutes(fallback int) int
- func ResolveDefaultUTC(fallback string) string
Constants ¶
const ( // DefaultMaxEffectiveTokens is the enterprise override for AWF apiProxy.maxEffectiveTokens // when max-effective-tokens is not explicitly configured in workflow frontmatter. DefaultMaxEffectiveTokens = "GH_AW_DEFAULT_MAX_EFFECTIVE_TOKENS" // DefaultMaxDailyAICredits is the enterprise override for the top-level // max-daily-ai-credits guardrail when it is not explicitly configured in // workflow frontmatter. DefaultMaxDailyAICredits = "GH_AW_DEFAULT_MAX_DAILY_AI_CREDITS" // DefaultMaxAICredits is the enterprise override for AWF apiProxy.maxAiCredits // when max-ai-credits is not explicitly configured in workflow frontmatter. DefaultMaxAICredits = "GH_AW_DEFAULT_MAX_AI_CREDITS" // DefaultMaxTurns is the enterprise override for max-turns when it is not // explicitly configured in workflow frontmatter. DefaultMaxTurns = "GH_AW_DEFAULT_MAX_TURNS" // DefaultTimeoutMinutes is the enterprise override for top-level timeout-minutes // when it is not explicitly configured in workflow frontmatter. DefaultTimeoutMinutes = "GH_AW_DEFAULT_TIMEOUT_MINUTES" // DefaultDetectionModel is the enterprise override for selecting the detection // job model when threat-detection.engine.model is not set. DefaultDetectionModel = "GH_AW_DEFAULT_DETECTION_MODEL" // DefaultUTC is the enterprise override for the project home timezone used // when rendering local times in CLI output. DefaultUTC = "GH_AW_DEFAULT_UTC" // DefaultModelCopilot is the enterprise override for Copilot fallback model selection. DefaultModelCopilot = "GH_AW_DEFAULT_MODEL_COPILOT" // DefaultModelClaude is the enterprise override for Claude fallback model selection. DefaultModelClaude = "GH_AW_DEFAULT_MODEL_CLAUDE" // DefaultModelCodex is the enterprise override for Codex fallback model selection. DefaultModelCodex = "GH_AW_DEFAULT_MODEL_CODEX" )
Variables ¶
This section is empty.
Functions ¶
func BuildDefaultMaxTurnsExpression ¶ added in v0.78.0
func BuildDefaultMaxTurnsExpression() string
BuildDefaultMaxTurnsExpression builds a vars expression that resolves max-turns at runtime from the GH_AW_DEFAULT_MAX_TURNS GitHub variable. An empty string is returned as the fallback so that an unset variable is treated as "no limit".
func BuildModelOverrideExpression ¶
BuildModelOverrideExpression builds a vars expression with primary model var, enterprise default model var, and built-in fallback model.
func BuildModelOverrideExpressionEmptyFallback ¶
BuildModelOverrideExpressionEmptyFallback builds a vars expression with primary model var, enterprise default model var, and empty string fallback.
func ResolveDefaultDetectionModel ¶
ResolveDefaultDetectionModel returns fallback when the env var is unset, otherwise returns the trimmed override value.
func ResolveDefaultMaxAICredits ¶ added in v0.78.3
ResolveDefaultMaxAICredits returns the resolved max AI credits default, checking the enterprise env var GH_AW_DEFAULT_MAX_AI_CREDITS. Falls back to fallback (built-in default) when the env var is unset or invalid.
func ResolveDefaultMaxDailyAICredits ¶ added in v0.78.2
ResolveDefaultMaxDailyAICredits returns the resolved daily AI Credits guardrail default, checking the enterprise env var GH_AW_DEFAULT_MAX_DAILY_AI_CREDITS. Falls back to fallback (built-in default) when the env var is unset or invalid.
A value of -1 is preserved to allow explicitly disabling the guardrail.
func ResolveDefaultMaxEffectiveTokens ¶
ResolveDefaultMaxEffectiveTokens returns fallback when the env var is unset/invalid, otherwise returns the parsed override.
func ResolveDefaultMaxTurns ¶
ResolveDefaultMaxTurns returns fallback when the env var is unset/invalid, otherwise returns the parsed override as a string.
func ResolveDefaultTimeoutMinutes ¶
ResolveDefaultTimeoutMinutes returns fallback when the env var is unset/invalid, otherwise returns the parsed override.
func ResolveDefaultUTC ¶ added in v0.77.5
ResolveDefaultUTC returns fallback when the env var is unset, otherwise returns the trimmed override value.
Types ¶
This section is empty.