Class AutoModeSwitchRequest

java.lang.Object
com.github.copilot.sdk.json.AutoModeSwitchRequest

public class AutoModeSwitchRequest extends Object
Request to switch to auto mode after an eligible rate limit.

This is sent by the server when the agent encounters a rate limit and wants to switch to an alternative model automatically.

Since:
1.0.8
  • Constructor Details

    • AutoModeSwitchRequest

      public AutoModeSwitchRequest()
  • Method Details

    • getErrorCode

      public String getErrorCode()
      Gets the rate-limit error code that triggered the request.
      Returns:
      the error code, or null
    • setErrorCode

      public AutoModeSwitchRequest setErrorCode(String errorCode)
      Sets the rate-limit error code.
      Parameters:
      errorCode - the error code
      Returns:
      this instance for method chaining
    • getRetryAfterSeconds

      public Double getRetryAfterSeconds()
      Gets the seconds until the rate limit resets, when known.
      Returns:
      the retry-after seconds, or null
    • setRetryAfterSeconds

      public AutoModeSwitchRequest setRetryAfterSeconds(Double retryAfterSeconds)
      Sets the seconds until the rate limit resets.
      Parameters:
      retryAfterSeconds - the retry-after seconds
      Returns:
      this instance for method chaining