Class ResolvedConfig

java.lang.Object
com.alibaba.dashscope.config.ResolvedConfig

public final class ResolvedConfig extends Object
Fully-resolved client configuration, produced once per client by ConfigResolver.
  • Method Details

    • getApiKey

      public String getApiKey()
      Resolved API key; may be null (failure surfaces at request time as SdkException).
    • getBaseUrl

      public String getBaseUrl()
      HTTP service root, e.g. https://dashscope.aliyuncs.com/api/v1.
    • getWsBaseUrl

      public String getWsBaseUrl()
      WebSocket service root, e.g. wss://dashscope.aliyuncs.com/api-ws/v1/inference.
    • getWorkspace

      public String getWorkspace()
    • getRegion

      public String getRegion()
    • getTimeout

      public Duration getTimeout()
      Single-request timeout (design §3: one of the three timeout semantics).
    • getMaxRetries

      public int getMaxRetries()
    • isRaiseOnError

      public boolean isRaiseOnError()
      true (default): failures raise DashScopeException; false: 2.x-style isError() returns.
    • getHttpClient

      public okhttp3.OkHttpClient getHttpClient()
      Externally injected OkHttpClient; null means the SDK builds and owns one.
    • getMaxRequests

      public int getMaxRequests()
    • getMaxRequestsPerHost

      public int getMaxRequestsPerHost()
      Dispatcher cap on concurrent requests per host.
    • getMaxIdleConnections

      public int getMaxIdleConnections()
      Connection-pool cap on idle keep-alive connections.
    • getKeepAlive

      public Duration getKeepAlive()
    • getWsPingInterval

      public Duration getWsPingInterval()
      WebSocket ping interval (audio design §12#1). Duration.ZERO = off (aligned with Python); behind NATs or proxies that silently drop idle connections, 20–30 s is recommended so half-open connections are detected instead of hanging forever.
    • getNetworkLoggingLevel

      public String getNetworkLoggingLevel()
      Network logging level (2.x parity): one of NONE / BASIC / HEADERS / BODY, resolved from DASHSCOPE_NETWORK_LOGGING_LEVEL; invalid values fall back to NONE.