Interface Pilot

All Superinterfaces:
org.aeonbits.owner.Config, EngineProperties<Pilot>, Serializable

@Sources({"system:properties","file:src/main/resources/properties/custom.properties","file:src/main/resources/properties/default/custom.properties","classpath:custom.properties"}) public interface Pilot extends EngineProperties<Pilot>
Configuration for optional SHAFT Pilot AI providers.

AI is disabled by default. Credentials are never configured here; providers resolve them from the named environment variables only after the caller has explicitly enabled AI and approved the relevant processing location.

  • Method Details

    • enabled

      @Key("pilot.ai.enabled") @DefaultValue("false") boolean enabled()
      Returns:
      whether optional AI execution is enabled
    • provider

      @Key("pilot.ai.provider") @DefaultValue("none") String provider()
      Returns:
      selected provider identifier
    • localConsent

      @Key("pilot.ai.consent.local") @DefaultValue("false") boolean localConsent()
      Returns:
      whether local inference is approved
    • onPremConsent

      @Key("pilot.ai.consent.onPrem") @DefaultValue("false") boolean onPremConsent()
      Returns:
      whether explicitly classified on-prem inference is approved
    • remoteConsent

      @Key("pilot.ai.consent.remote") @DefaultValue("false") boolean remoteConsent()
      Returns:
      whether remote inference is approved
    • allowedEvidenceCategories

      @Key("pilot.ai.allowedEvidenceCategories") @DefaultValue("") String allowedEvidenceCategories()
      Returns:
      comma-separated approved evidence categories
    • telemetryEnabled

      @Key("pilot.ai.telemetry.enabled") @DefaultValue("false") boolean telemetryEnabled()
      Returns:
      whether optional external telemetry is enabled
    • timeoutSeconds

      @Key("pilot.ai.timeoutSeconds") @DefaultValue("300") int timeoutSeconds()
      Returns:
      maximum provider timeout in seconds

      Raised from 30 (issue #4361): autobot_provider_chat has declared a 300-second per-request timeout since its introduction, but this global ceiling -- left at its original default -- silently clamped every request back down to 30 seconds (AiExecutionService#effectiveTimeout takes min(requested, this value), and AbstractHttpAiProvider applies the result as the HTTP request timeout). Once #4113 let the full 8,000-token output budget reach the wire, reasoning-model code generation legitimately runs past 30 seconds, surfacing as status=TIMEOUT ("Provider request timed out.") in the live Gemini E2E. 300 lets the already-declared per-call timeout actually take effect; callers that request less (or nothing -- AiRequest defaults to 30 seconds) are unaffected because the ceiling only ever lowers a request's own timeout. Callers that deliberately request the configured ceiling itself (PilotNaturalActionPlanner) inherit the raise; set this property lower to restore a tighter bound everywhere.

    • maxRequestBytes

      @Key("pilot.ai.maxRequestBytes") @DefaultValue("1048576") int maxRequestBytes()
      Returns:
      maximum serialized request size
    • maxInputTokens

      @Key("pilot.ai.maxInputTokens") @DefaultValue("16000") int maxInputTokens()
      Returns:
      maximum estimated input tokens
    • maxOutputTokens

      @Key("pilot.ai.maxOutputTokens") @DefaultValue("8000") int maxOutputTokens()
      Returns:
      maximum output tokens

      Raised from 2,000 (issue #4113): autobot_provider_chat has requested an 8,000-token per-call budget since #3371, but this global ceiling -- left at its original default -- silently clamped every request back down to 2,000 (outputTokenLimit() and AiExecutionService#inheritedLimit both take min(requested, this value)). Reasoning models spend thinking tokens from the same budget, so 2,000 routinely truncated a full generated test class before the answer JSON completed (finishReason=MAX_TOKENS). 8,000 lets the already-declared per-call budget actually reach the wire, with wide headroom below Gemini 3.5 Flash's documented 65,000-token output ceiling.

    • maxCostUsd

      @Key("pilot.ai.maxCostUsd") @DefaultValue("0") String maxCostUsd()
      Returns:
      maximum accepted provider-reported cost in USD
    • retryMaxAttempts

      @Key("pilot.ai.retryMaxAttempts") @DefaultValue("2") int retryMaxAttempts()
      Returns:
      maximum provider execution attempts
    • maxConcurrency

      @Key("pilot.ai.maxConcurrency") @DefaultValue("2") int maxConcurrency()
      Returns:
      maximum concurrent calls per provider
    • circuitBreakerFailureThreshold

      @Key("pilot.ai.circuitBreaker.failureThreshold") @DefaultValue("3") int circuitBreakerFailureThreshold()
      Returns:
      failures required to open the circuit
    • circuitBreakerCooldownSeconds

      @Key("pilot.ai.circuitBreaker.cooldownSeconds") @DefaultValue("60") int circuitBreakerCooldownSeconds()
      Returns:
      circuit-open cooldown in seconds
    • redactionSelectors

      @Key("pilot.ai.redaction.selectors") @DefaultValue("input[type=password],[autocomplete=current-password],[autocomplete=new-password]") String redactionSelectors()
      Returns:
      comma-separated CSS selectors to redact
    • redactionAttributes

      @Key("pilot.ai.redaction.attributes") @DefaultValue("authorization,cookie,set-cookie,password,passwd,secret,token,api-key,apikey,access-key") String redactionAttributes()
      Returns:
      comma-separated structured or DOM attributes to redact
    • redactionPatterns

      @Key("pilot.ai.redaction.patterns") @DefaultValue("") String redactionPatterns()
      Returns:
      double-semicolon-separated custom regular expressions
    • openAiEndpoint

      @Key("pilot.ai.openai.endpoint") @DefaultValue("https://api.openai.com/v1/responses") String openAiEndpoint()
      Returns:
      OpenAI Responses endpoint
    • openAiModel

      @Key("pilot.ai.openai.model") @DefaultValue("") String openAiModel()
      Returns:
      configured OpenAI model
    • openAiApiKeyEnvironmentVariable

      @Key("pilot.ai.openai.apiKeyEnvironmentVariable") @DefaultValue("OPENAI_API_KEY") String openAiApiKeyEnvironmentVariable()
      Returns:
      environment variable containing the OpenAI credential
    • openAiProcessingLocation

      @Key("pilot.ai.openai.processingLocation") @DefaultValue("remote") String openAiProcessingLocation()
      Returns:
      explicit OpenAI endpoint processing location
    • anthropicEndpoint

      @Key("pilot.ai.anthropic.endpoint") @DefaultValue("https://api.anthropic.com/v1/messages") String anthropicEndpoint()
      Returns:
      Anthropic Messages endpoint
    • anthropicModel

      @Key("pilot.ai.anthropic.model") @DefaultValue("") String anthropicModel()
      Returns:
      configured Anthropic model
    • anthropicApiKeyEnvironmentVariable

      @Key("pilot.ai.anthropic.apiKeyEnvironmentVariable") @DefaultValue("ANTHROPIC_API_KEY") String anthropicApiKeyEnvironmentVariable()
      Returns:
      environment variable containing the Anthropic credential
    • anthropicProcessingLocation

      @Key("pilot.ai.anthropic.processingLocation") @DefaultValue("remote") String anthropicProcessingLocation()
      Returns:
      explicit Anthropic endpoint processing location
    • anthropicVersion

      @Key("pilot.ai.anthropic.version") @DefaultValue("2023-06-01") String anthropicVersion()
      Returns:
      Anthropic API contract version
    • geminiEndpoint

      @Key("pilot.ai.gemini.endpoint") @DefaultValue("https://generativelanguage.googleapis.com/v1beta/models") String geminiEndpoint()
      Returns:
      Gemini models endpoint
    • geminiModel

      @Key("pilot.ai.gemini.model") @DefaultValue("gemini-3.5-flash") String geminiModel()
      Returns:
      configured Gemini model
    • geminiApiKeyEnvironmentVariable

      @Key("pilot.ai.gemini.apiKeyEnvironmentVariable") @DefaultValue("GEMINI_API_KEY") String geminiApiKeyEnvironmentVariable()
      Returns:
      environment variable containing the Gemini credential
    • geminiProcessingLocation

      @Key("pilot.ai.gemini.processingLocation") @DefaultValue("remote") String geminiProcessingLocation()
      Returns:
      explicit Gemini endpoint processing location
    • githubEndpoint

      @Key("pilot.ai.github.endpoint") @DefaultValue("https://models.github.ai/inference/chat/completions") String githubEndpoint()
      Returns:
      GitHub Models chat-completions endpoint
    • githubModel

      @Key("pilot.ai.github.model") @DefaultValue("") String githubModel()
      Returns:
      configured GitHub Models model
    • githubApiKeyEnvironmentVariable

      @Key("pilot.ai.github.apiKeyEnvironmentVariable") @DefaultValue("GITHUB_TOKEN") String githubApiKeyEnvironmentVariable()
      Returns:
      environment variable containing the GitHub credential
    • githubProcessingLocation

      @Key("pilot.ai.github.processingLocation") @DefaultValue("remote") String githubProcessingLocation()
      Returns:
      explicit GitHub Models endpoint processing location
    • ollamaEndpoint

      @Key("pilot.ai.ollama.endpoint") @DefaultValue("http://127.0.0.1:11434/api/chat") String ollamaEndpoint()
      Returns:
      Ollama chat endpoint
    • ollamaModel

      @Key("pilot.ai.ollama.model") @DefaultValue("") String ollamaModel()
      Returns:
      configured Ollama model
    • ollamaProcessingLocation

      @Key("pilot.ai.ollama.processingLocation") @DefaultValue("local") String ollamaProcessingLocation()
      Returns:
      explicit Ollama endpoint processing location
    • ollamaApiKeyEnvironmentVariable

      @Key("pilot.ai.ollama.apiKeyEnvironmentVariable") @DefaultValue("") String ollamaApiKeyEnvironmentVariable()
      Returns:
      optional environment variable containing an on-prem Ollama gateway credential
    • ollamaApiKeyHeader

      @Key("pilot.ai.ollama.apiKeyHeader") @DefaultValue("Authorization") String ollamaApiKeyHeader()
      Returns:
      optional Ollama gateway credential header
    • ollamaApiKeyPrefix

      @Key("pilot.ai.ollama.apiKeyPrefix") @DefaultValue("Bearer ") String ollamaApiKeyPrefix()
      Returns:
      optional Ollama gateway credential prefix
    • lmStudioEndpoint

      @Key("pilot.ai.lmstudio.endpoint") @DefaultValue("http://127.0.0.1:1234/v1/responses") String lmStudioEndpoint()
      Returns:
      LM Studio OpenAI-compatible Responses endpoint
    • lmStudioModel

      @Key("pilot.ai.lmstudio.model") @DefaultValue("") String lmStudioModel()
      Returns:
      configured LM Studio model
    • lmStudioApiKeyEnvironmentVariable

      @Key("pilot.ai.lmstudio.apiKeyEnvironmentVariable") @DefaultValue("") String lmStudioApiKeyEnvironmentVariable()
      Returns:
      optional LM Studio gateway credential environment variable
    • set

      default Pilot.SetProperty set()
      Returns a fluent builder for current-thread overrides.
      Specified by:
      set in interface EngineProperties<Pilot>
      Returns:
      current-thread property builder