Repository: coze-dev/coze-java
Pull request #91: feat: add missing param and fix some issue
Author: login: hanzeINGH
Labels: name: feature
Created: 2025-04-25T06:46:37Z | Merged: 2025-04-25T08:04:51Z

Change-Id: I4e53b4e03438ff962160c9ff0a07462fc0808e3a


Diff:
diff --git a/api/pom.xml b/api/pom.xml
index 80b386a0..a43995b7 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -43,7 +43,7 @@
     </parent>
 
     <artifactId>coze-api</artifactId>
-    <version>0.3.0</version>
+    <version>0.3.1</version>
 
     <scm>
         <connection>scm:git:git://github.com/coze-dev/coze-java.git</connection>
@@ -93,7 +93,7 @@
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
-            <version>2.0.12</version>
+            <version>1.7.30</version>
         </dependency>
 
         <!-- HTTP Client -->
diff --git a/api/src/main/java/com/coze/openapi/api/CozeAuthAPI.java b/api/src/main/java/com/coze/openapi/api/CozeAuthAPI.java
index 4e351240..09b52d83 100644
--- a/api/src/main/java/com/coze/openapi/api/CozeAuthAPI.java
+++ b/api/src/main/java/com/coze/openapi/api/CozeAuthAPI.java
@@ -22,4 +22,18 @@ Single<Response<OAuthToken>> retrieve(
   @POST("/api/permission/oauth2/workspace_id/{workspace_id}/device/code")
   Single<Response<DeviceAuthResp>> device(
       @Path("workspace_id") String workspaceID, @Body DeviceAuthReq req);
+
+  @Headers({"Content-Type: application/json"})
+  @POST("/api/permission/oauth2/account/{account_id}/token")
+  Single<Response<OAuthToken>> account(
+      @HeaderMap Map<String, String> headers,
+      @Path("account_id") String accountID,
+      @Body GetAccessTokenReq req);
+
+  @Headers({"Content-Type: application/json"})
+  @POST("/api/permission/oauth2/enterprise_id/{enterprise_id}/token")
+  Single<Response<OAuthToken>> enterprise(
+      @HeaderMap Map<String, String> headers,
+      @Path("enterprise_id") String enterpriseID,
+      @Body GetAccessTokenReq req);
 }
diff --git a/api/src/main/java/com/coze/openapi/client/auth/GetAccessTokenReq.java b/api/src/main/java/com/coze/openapi/client/auth/GetAccessTokenReq.java
index 3008c44b..ff2d89a1 100644
--- a/api/src/main/java/com/coze/openapi/client/auth/GetAccessTokenReq.java
+++ b/api/src/main/java/com/coze/openapi/client/auth/GetAccessTokenReq.java
@@ -44,4 +44,10 @@ public class GetAccessTokenReq extends BaseReq {
 
   @JsonProperty("scope")
   private Scope scope;
+
+  @JsonProperty("account_id")
+  private Long accountID;
+
+  @JsonProperty("enterprise_id")
+  private String enterpriseID;
 }
diff --git a/api/src/main/java/com/coze/openapi/client/auth/GetJWTAccessTokenReq.java b/api/src/main/java/com/coze/openapi/client/auth/GetJWTAccessTokenReq.java
new file mode 100644
index 00000000..bc595129
--- /dev/null
+++ b/api/src/main/java/com/coze/openapi/client/auth/GetJWTAccessTokenReq.java
@@ -0,0 +1,22 @@
+package com.coze.openapi.client.auth;
+
+import com.coze.openapi.client.auth.model.SessionContext;
+import com.coze.openapi.client.auth.scope.Scope;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class GetJWTAccessTokenReq {
+  private Integer ttl;
+  private Scope scope;
+  private String sessionName;
+  private Long accountID;
+  private String enterpriseID;
+  private SessionContext sessionContext;
+}
diff --git a/api/src/main/java/com/coze/openapi/client/auth/model/DeviceInfo.java b/api/src/main/java/com/coze/openapi/client/auth/model/DeviceInfo.java
new file mode 100644
index 00000000..dffd4953
--- /dev/null
+++ b/api/src/main/java/com/coze/openapi/client/auth/model/DeviceInfo.java
@@ -0,0 +1,16 @@
+package com.coze.openapi.client.auth.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import lombok.Builder;
+import lombok.Data;
+
+@Data
+@Builder
+public class DeviceInfo {
+  @JsonProperty("device_id")
+  private String deviceID;
+
+  @JsonProperty("custom_consumer")
+  private String customConsumer;
+}
diff --git a/api/src/main/java/com/coze/openapi/client/auth/model/SessionContext.java b/api/src/main/java/com/coze/openapi/client/auth/model/SessionContext.java
new file mode 100644
index 00000000..710fbe27
--- /dev/null
+++ b/api/src/main/java/com/coze/openapi/client/auth/model/SessionContext.java
@@ -0,0 +1,17 @@
+package com.coze.openapi.client.auth.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class SessionContext {
+  @JsonProperty("device_info")
+  private DeviceInfo deviceInfo;
+}
diff --git a/api/src/main/java/com/coze/openapi/client/auth/scope/Scope.java b/api/src/main/java/com/coze/openapi/client/auth/scope/Scope.java
index fbf3d3c1..3c2b211a 100644
--- a/api/src/main/java/com/coze/openapi/client/auth/scope/Scope.java
+++ b/api/src/main/java/com/coze/openapi/client/auth/scope/Scope.java
@@ -4,6 +4,7 @@
 import java.util.List;
 import java.util.Map;
 
+import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
 
@@ -13,7 +14,10 @@
 @Data
 @AllArgsConstructor
 public class Scope {
+  @JsonProperty("account_permission")
   private ScopeAccountPermission accountPermission;
+
+  @JsonProperty("attribute_constraint")
   private ScopeAttributeConstraint attributeConstraint;
 
   public Map<String, Object> toMap() {
diff --git a/api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAccountPermission.java b/api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAccountPermission.java
index 9a340bcf..1899738e 100644
--- a/api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAccountPermission.java
+++ b/api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAccountPermission.java
@@ -2,11 +2,14 @@
 
 import java.util.List;
 
+import com.fasterxml.jackson.annotation.JsonProperty;
+
 import lombok.AllArgsConstructor;
 import lombok.Data;
 
 @Data
 @AllArgsConstructor
 public class ScopeAccountPermission {
+  @JsonProperty("permission_list")
   private List<String> permissionList;
 }
diff --git a/api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAttributeConstraint.java b/api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAttributeConstraint.java
index 51d2f337..2b8a7e18 100644
--- a/api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAttributeConstraint.java
+++ b/api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAttributeConstraint.java
@@ -1,10 +1,13 @@
 package com.coze.openapi.client.auth.scope;
 
+import com.fasterxml.jackson.annotation.JsonProperty;
+
 import lombok.AllArgsConstructor;
 import lombok.Data;
 
 @Data
 @AllArgsConstructor
 public class ScopeAttributeConstraint {
+  @JsonProperty("connector_bot_chat_attribute")
   private ScopeAttributeConstraintConnectorBotChatAttribute connectorBotChatAttribute;
 }
diff --git a/api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAttributeConstraintConnectorBotChatAttribute.java b/api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAttributeConstraintConnectorBotChatAttribute.java
index 273e4431..c1a03986 100644
--- a/api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAttributeConstraintConnectorBotChatAttribute.java
+++ b/api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAttributeConstraintConnectorBotChatAttribute.java
@@ -2,11 +2,14 @@
 
 import java.util.List;
 
+import com.fasterxml.jackson.annotation.JsonProperty;
+
 import lombok.AllArgsConstructor;
 import lombok.Data;
 
 @AllArgsConstructor
 @Data
 public class ScopeAttributeConstraintConnectorBotChatAttribute {
+  @JsonProperty("bot_id_list")
   private List<String> botIDList;
 }
diff --git a/api/src/main/java/com/coze/openapi/client/dataset/document/model/DocumentBase.java b/api/src/main/java/com/coze/openapi/client/dataset/document/model/DocumentBase.java
index 27d275ee..20b729f8 100644
--- a/api/src/main/java/com/coze/openapi/client/dataset/document/model/DocumentBase.java
+++ b/api/src/main/java/com/coze/openapi/client/dataset/document/model/DocumentBase.java
@@ -39,6 +39,13 @@ public static DocumentBase buildWebPage(String name, String url, Integer interva
         .build();
   }
 
+  public static DocumentBase buildLocalFile(String name, byte[] content, String fileType) {
+    return DocumentBase.builder()
+        .name(name)
+        .sourceInfo(DocumentSourceInfo.buildLocalFile(content, fileType))
+        .build();
+  }
+
   public static DocumentBase buildLocalFile(String name, String content, String fileType) {
     return DocumentBase.builder()
         .name(name)
diff --git a/api/src/main/java/com/coze/openapi/client/dataset/document/model/DocumentSourceInfo.java b/api/src/main/java/com/coze/openapi/client/dataset/document/model/DocumentSourceInfo.java
index f68a8596..4776cc4d 100644
--- a/api/src/main/java/com/coze/openapi/client/dataset/document/model/DocumentSourceInfo.java
+++ b/api/src/main/java/com/coze/openapi/client/dataset/document/model/DocumentSourceInfo.java
@@ -41,6 +41,14 @@ public static DocumentSourceInfo buildLocalFile(String content, String fileType)
     return info;
   }
 
+  public static DocumentSourceInfo buildLocalFile(byte[] content, String fileType) {
+    String encodedContent = Base64.getEncoder().encodeToString(content);
+    DocumentSourceInfo info = new DocumentSourceInfo();
+    info.setFileBase64(encodedContent);
+    info.setFileType(fileType);
+    return info;
+  }
+
   public static DocumentSourceInfo buildWebPage(String url) {
     DocumentSourceInfo info = new DocumentSourceInfo();
     info.setWebUrl(url);
diff --git a/api/src/main/java/com/coze/openapi/client/websocket/event/model/AsrConfig.java b/api/src/main/java/com/coze/openapi/client/websocket/event/model/AsrConfig.java
new file mode 100644
index 00000000..2f549cd8
--- /dev/null
+++ b/api/src/main/java/com/coze/openapi/client/websocket/event/model/AsrConfig.java
@@ -0,0 +1,23 @@
+package com.coze.openapi.client.websocket.event.model;
+
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import lombok.*;
+
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+@EqualsAndHashCode
+public class AsrConfig {
+  @JsonProperty("hot_words")
+  private List<String> hotWords;
+
+  @JsonProperty("context")
+  private String context;
+
+  @JsonProperty("user_language")
+  private String userLanguage;
+}
diff --git a/api/src/main/java/com/coze/openapi/client/websocket/event/model/InterruptConfig.java b/api/src/main/java/com/coze/openapi/client/websocket/event/model/InterruptConfig.java
new file mode 100644
index 00000000..989c0591
--- /dev/null
+++ b/api/src/main/java/com/coze/openapi/client/websocket/event/model/InterruptConfig.java
@@ -0,0 +1,20 @@
+package com.coze.openapi.client.websocket.event.model;
+
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import lombok.*;
+
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+@EqualsAndHashCode
+public class InterruptConfig {
+  @JsonProperty("mode")
+  private String mode;
+
+  @JsonProperty("keywords")
+  private List<String> keywords;
+}
diff --git a/api/src/main/java/com/coze/openapi/client/websocket/event/model/TurnDetection.java b/api/src/main/java/com/coze/openapi/client/websocket/event/model/TurnDetection.java
index c3a2b13c..b8f16252 100644
--- a/api/src/main/java/com/coze/openapi/client/websocket/event/model/TurnDetection.java
+++ b/api/src/main/java/com/coze/openapi/client/websocket/event/model/TurnDetection.java
@@ -12,11 +12,17 @@
 public class TurnDetection {
   @Builder.Default
   @JsonProperty("type")
-  private String type = "client_vad";
+  private String type = "client_interrupt";
 
   @JsonProperty("prefix_padding_ms")
   private Integer prefixPaddingMs;
 
   @JsonProperty("suffix_padding_ms")
   private Integer silenceDurationMs;
+
+  @JsonProperty("interrupt_config")
+  private InterruptConfig interruptConfig;
+
+  @JsonProperty("asr_config")
+  private AsrConfig asrConfig;
 }
diff --git a/api/src/main/java/com/coze/openapi/service/auth/DefaultJWTBuilder.java b/api/src/main/java/com/coze/openapi/service/auth/DefaultJWTBuilder.java
index 34bba321..7603d398 100644
--- a/api/src/main/java/com/coze/openapi/service/auth/DefaultJWTBuilder.java
+++ b/api/src/main/java/com/coze/openapi/service/auth/DefaultJWTBuilder.java
@@ -26,6 +26,9 @@ public String generateJWT(PrivateKey privateKey, Map<String, Object> header, JWT
       if (payload.getSessionName() != null) {
         jwtBuilder.claim("session_name", payload.getSessionName());
       }
+      if (payload.getSessionContext() != null) {
+        jwtBuilder.claim("session_context", payload.getSessionContext());
+      }
       return jwtBuilder.compact();
 
     } catch (Exception e) {
diff --git a/api/src/main/java/com/coze/openapi/service/auth/JWTOAuth.java b/api/src/main/java/com/coze/openapi/service/auth/JWTOAuth.java
index 60e6c909..86461ee7 100644
--- a/api/src/main/java/com/coze/openapi/service/auth/JWTOAuth.java
+++ b/api/src/main/java/com/coze/openapi/service/auth/JWTOAuth.java
@@ -2,20 +2,27 @@
 
 import java.util.Objects;
 
+import com.coze.openapi.client.auth.GetJWTAccessTokenReq;
 import com.coze.openapi.client.auth.OAuthToken;
+import com.coze.openapi.client.auth.model.SessionContext;
 import com.coze.openapi.client.auth.scope.Scope;
 
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.NonNull;
+import lombok.*;
 
-@Builder
+@Getter
+@Builder(builderClassName = "OAuthJWTBuilder")
+@Setter(AccessLevel.PRIVATE)
 @AllArgsConstructor
+@NoArgsConstructor
 public class JWTOAuth extends Auth {
 
   private Integer ttl;
   private String sessionName;
   private Scope scope;
+  private String enterpriseID;
+  private Long accountID;
+  private SessionContext sessionContext;
+
   @NonNull private JWTOAuthClient jwtClient;
 
   public JWTOAuth(JWTOAuthClient client) {
@@ -32,7 +39,16 @@ public String token() {
     if (!this.needRefresh()) {
       return accessToken;
     }
-    OAuthToken resp = this.jwtClient.getAccessToken(this.ttl, this.scope, this.sessionName);
+    GetJWTAccessTokenReq req =
+        GetJWTAccessTokenReq.builder()
+            .enterpriseID(enterpriseID)
+            .scope(scope)
+            .ttl(ttl)
+            .sessionName(sessionName)
+            .sessionContext(sessionContext)
+            .accountID(accountID)
+            .build();
+    OAuthToken resp = this.jwtClient.getAccessToken(req);
     this.accessToken = resp.getAccessToken();
     this.expiresIn = resp.getExpiresIn();
     this.refreshAt = this.expiresIn - getRefreshBefore();
@@ -49,4 +65,25 @@ private long getRefreshBefore() {
     }
     return 0;
   }
+
+  public static class OAuthJWTBuilder {
+    public JWTOAuth build() {
+      JWTOAuth jwt = new JWTOAuth();
+      if (this.jwtClient == null) {
+        throw new IllegalStateException("jwtClient is required");
+      }
+      jwt.setJwtClient(this.jwtClient);
+      if (this.ttl != null) {
+        jwt.ttl = this.ttl;
+      } else {
+        jwt.setTtl(this.jwtClient.getTtl());
+      }
+      jwt.setSessionName(this.sessionName);
+      jwt.setSessionContext(this.sessionContext);
+      jwt.setAccountID(this.accountID);
+      jwt.setEnterpriseID(this.enterpriseID);
+      jwt.setScope(this.scope);
+      return jwt;
+    }
+  }
 }
diff --git a/api/src/main/java/com/coze/openapi/service/auth/JWTOAuthClient.java b/api/src/main/java/com/coze/openapi/service/auth/JWTOAuthClient.java
index 6ce3b9a8..dca16fb1 100644
--- a/api/src/main/java/com/coze/openapi/service/auth/JWTOAuthClient.java
+++ b/api/src/main/java/com/coze/openapi/service/auth/JWTOAuthClient.java
@@ -49,40 +49,52 @@ public OAuthToken refreshToken(String refreshToken) {
   }
 
   public OAuthToken getAccessToken() {
-    return doGetAccessToken(this.ttl, null, null);
+    return doGetAccessToken(GetJWTAccessTokenReq.builder().ttl(this.ttl).build());
   }
 
   public OAuthToken getAccessToken(Integer ttl) {
-    return doGetAccessToken(ttl, null, null);
+    return doGetAccessToken(GetJWTAccessTokenReq.builder().ttl(ttl).build());
   }
 
   public OAuthToken getAccessToken(Scope scope) {
-    return doGetAccessToken(this.ttl, scope, null);
+    return doGetAccessToken(GetJWTAccessTokenReq.builder().scope(scope).ttl(ttl).build());
   }
 
   public OAuthToken getAccessToken(Integer ttl, Scope scope) {
-    return doGetAccessToken(ttl, scope, null);
+    return doGetAccessToken(GetJWTAccessTokenReq.builder().scope(scope).ttl(ttl).build());
   }
 
   public OAuthToken getAccessToken(String sessionName) {
-    return doGetAccessToken(this.ttl, null, sessionName);
+    return doGetAccessToken(
+        GetJWTAccessTokenReq.builder().sessionName(sessionName).ttl(ttl).build());
   }
 
   public OAuthToken getAccessToken(Integer ttl, String sessionName) {
-    return doGetAccessToken(ttl, null, sessionName);
+    return doGetAccessToken(
+        GetJWTAccessTokenReq.builder().sessionName(sessionName).ttl(ttl).build());
   }
 
   public OAuthToken getAccessToken(Scope scope, String sessionName) {
-    return doGetAccessToken(this.ttl, scope, sessionName);
+    return doGetAccessToken(
+        GetJWTAccessTokenReq.builder().sessionName(sessionName).scope(scope).ttl(ttl).build());
   }
 
   public OAuthToken getAccessToken(Integer ttl, Scope scope, String sessionName) {
-    return doGetAccessToken(ttl, scope, sessionName);
+    return doGetAccessToken(
+        GetJWTAccessTokenReq.builder().sessionName(sessionName).scope(scope).ttl(ttl).build());
   }
 
-  private OAuthToken doGetAccessToken(Integer ttl, Scope scope, String sessionName) {
+  public OAuthToken getAccessToken(GetJWTAccessTokenReq req) {
+    return doGetAccessToken(req);
+  }
+
+  private OAuthToken doGetAccessToken(GetJWTAccessTokenReq req) {
     GetAccessTokenReq.GetAccessTokenReqBuilder builder = GetAccessTokenReq.builder();
-    builder.grantType(GrantType.JWT_CODE.getValue()).durationSeconds(ttl).scope(scope);
+    Integer ttl = this.ttl;
+    if (req.getTtl() != null) {
+      ttl = req.getTtl();
+    }
+    builder.grantType(GrantType.JWT_CODE.getValue()).durationSeconds(ttl).scope(req.getScope());
     Map<String, Object> header = new HashMap<>();
     header.put("alg", "RS256");
     header.put("typ", "JWT");
@@ -93,13 +105,20 @@ private OAuthToken doGetAccessToken(Integer ttl, Scope scope, String sessionName
         JWTPayload.builder()
             .iss(this.clientID)
             .aud(this.hostName)
-            .exp(new Date((now + this.ttl) * 1000))
+            .exp(new Date((now + ttl) * 1000))
             .iat(new Date(now * 1000))
-            .sessionName(sessionName)
+            .sessionName(req.getSessionName())
             .jti(Utils.genRandomSign(16))
+            .sessionContext(req.getSessionContext())
             .build();
-    return getAccessToken(
-        this.jwtBuilder.generateJWT(privateKey, header, payload), builder.build());
+    String jwtToken = this.jwtBuilder.generateJWT(privateKey, header, payload);
+    if (req.getAccountID() != null) {
+      return getAccountAccessToken(jwtToken, String.valueOf(req.getAccountID()), builder.build());
+    }
+    if (req.getEnterpriseID() != null) {
+      return getEnterpriseAccessToken(jwtToken, req.getEnterpriseID(), builder.build());
+    }
+    return getAccessToken(jwtToken, builder.build());
   }
 
   private PrivateKey parsePrivateKey(String privateKeyPEM) throws Exception {
diff --git a/api/src/main/java/com/coze/openapi/service/auth/JWTPayload.java b/api/src/main/java/com/coze/openapi/service/auth/JWTPayload.java
index e5417deb..001db822 100644
--- a/api/src/main/java/com/coze/openapi/service/auth/JWTPayload.java
+++ b/api/src/main/java/com/coze/openapi/service/auth/JWTPayload.java
@@ -2,6 +2,8 @@
 
 import java.util.Date;
 
+import com.coze.openapi.client.auth.model.SessionContext;
+
 import lombok.*;
 
 @Data
@@ -15,4 +17,5 @@ public class JWTPayload {
   @NonNull private Date exp;
   @NonNull private String jti;
   private String sessionName;
+  private SessionContext sessionContext;
 }
diff --git a/api/src/main/java/com/coze/openapi/service/auth/OAuthClient.java b/api/src/main/java/com/coze/openapi/service/auth/OAuthClient.java
index 1f2e1cf1..3c558ec7 100644
--- a/api/src/main/java/com/coze/openapi/service/auth/OAuthClient.java
+++ b/api/src/main/java/com/coze/openapi/service/auth/OAuthClient.java
@@ -175,6 +175,24 @@ protected OAuthToken getAccessToken(String secret, GetAccessTokenReq req) {
     return execute(this.api.retrieve(headers, req));
   }
 
+  protected OAuthToken getAccountAccessToken(
+      String secret, String accountID, GetAccessTokenReq req) {
+    Map<String, String> headers = new HashMap<>();
+    if (secret != null) {
+      headers.put(AuthorizeHeader, String.format("Bearer %s", secret));
+    }
+    return execute(this.api.account(headers, accountID, req));
+  }
+
+  protected OAuthToken getEnterpriseAccessToken(
+      String secret, String enterpriseID, GetAccessTokenReq req) {
+    Map<String, String> headers = new HashMap<>();
+    if (secret != null) {
+      headers.put(AuthorizeHeader, String.format("Bearer %s", secret));
+    }
+    return execute(this.api.enterprise(headers, enterpriseID, req));
+  }
+
   protected OAuthToken refreshAccessToken(String refreshToken, String clientSecret) {
     return request(null, clientSecret, GrantType.REFRESH_TOKEN, refreshToken, null);
   }
diff --git a/api/src/main/java/com/coze/openapi/service/utils/UserAgentInterceptor.java b/api/src/main/java/com/coze/openapi/service/utils/UserAgentInterceptor.java
index a5fc27d1..fc6d2a55 100644
--- a/api/src/main/java/com/coze/openapi/service/utils/UserAgentInterceptor.java
+++ b/api/src/main/java/com/coze/openapi/service/utils/UserAgentInterceptor.java
@@ -24,7 +24,7 @@ public Response intercept(Chain chain) throws IOException {
     return chain.proceed(request);
   }
 
-  public static final String VERSION = "0.3.0";
+  public static final String VERSION = "0.3.1";
   private static final ObjectMapper objectMapper = new ObjectMapper();
 
   /** 获取操作系统版本 */
diff --git a/api/src/test/java/com/coze/openapi/service/auth/JWTOAuthClientTest.java b/api/src/test/java/com/coze/openapi/service/auth/JWTOAuthClientTest.java
index a55d7236..231161af 100644
--- a/api/src/test/java/com/coze/openapi/service/auth/JWTOAuthClientTest.java
+++ b/api/src/test/java/com/coze/openapi/service/auth/JWTOAuthClientTest.java
@@ -10,8 +10,10 @@
 
 import com.coze.openapi.api.CozeAuthAPI;
 import com.coze.openapi.client.auth.GetAccessTokenReq;
+import com.coze.openapi.client.auth.GetJWTAccessTokenReq;
 import com.coze.openapi.client.auth.GrantType;
 import com.coze.openapi.client.auth.OAuthToken;
+import com.coze.openapi.client.auth.model.SessionContext;
 import com.coze.openapi.client.auth.scope.Scope;
 
 import io.reactivex.Single;
@@ -111,6 +113,94 @@ void testGetAccessToken() {
                 }));
   }
 
+  @Test
+  void testGetEnterpriseAccessToken() {
+    // 准备测试数据
+    OAuthToken mockToken = new OAuthToken();
+    mockToken.setAccessToken("access_token");
+    mockToken.setExpiresIn(900);
+
+    Response<OAuthToken> response =
+        Response.success(
+            mockToken,
+            new okhttp3.Response.Builder()
+                .request(new Request.Builder().url("https://test.com").build())
+                .protocol(Protocol.HTTP_1_1)
+                .code(200)
+                .message("OK")
+                .headers(Headers.of("X-Log-Id", "test_log_id"))
+                .build());
+
+    // 设置模拟行为
+    when(mockApi.enterprise(anyMap(), any(), any(GetAccessTokenReq.class)))
+        .thenReturn(Single.just(response));
+
+    // 执行测试
+    OAuthToken result =
+        client.getAccessToken(GetJWTAccessTokenReq.builder().enterpriseID("213123123").build());
+
+    // 验证结果
+    assertNotNull(result);
+    assertEquals("access_token", result.getAccessToken());
+    assertEquals(Integer.valueOf(900), result.getExpiresIn());
+
+    // 验证请求参数
+    verify(mockApi)
+        .enterprise(
+            anyMap(),
+            any(),
+            argThat(
+                req -> {
+                  assertEquals(GrantType.JWT_CODE.getValue(), req.getGrantType());
+                  assertEquals(900, req.getDurationSeconds());
+                  return true;
+                }));
+  }
+
+  @Test
+  void testGetAccountAccessToken() {
+    // 准备测试数据
+    OAuthToken mockToken = new OAuthToken();
+    mockToken.setAccessToken("access_token");
+    mockToken.setExpiresIn(900);
+
+    Response<OAuthToken> response =
+        Response.success(
+            mockToken,
+            new okhttp3.Response.Builder()
+                .request(new Request.Builder().url("https://test.com").build())
+                .protocol(Protocol.HTTP_1_1)
+                .code(200)
+                .message("OK")
+                .headers(Headers.of("X-Log-Id", "test_log_id"))
+                .build());
+
+    // 设置模拟行为
+    when(mockApi.account(anyMap(), any(), any(GetAccessTokenReq.class)))
+        .thenReturn(Single.just(response));
+
+    // 执行测试
+    OAuthToken result =
+        client.getAccessToken(GetJWTAccessTokenReq.builder().accountID(1235L).build());
+
+    // 验证结果
+    assertNotNull(result);
+    assertEquals("access_token", result.getAccessToken());
+    assertEquals(Integer.valueOf(900), result.getExpiresIn());
+
+    // 验证请求参数
+    verify(mockApi)
+        .account(
+            anyMap(),
+            any(),
+            argThat(
+                req -> {
+                  assertEquals(GrantType.JWT_CODE.getValue(), req.getGrantType());
+                  assertEquals(900, req.getDurationSeconds());
+                  return true;
+                }));
+  }
+
   @Test
   void testGetAccessTokenWithCustomTTL() {
     // 准备测试数据
@@ -178,7 +268,12 @@ void testGetAccessTokenWithScope() {
     // 执行测试
     Scope testScope = mock(Scope.class);
     when(testScope.toString()).thenReturn("test.scope");
-    OAuthToken result = client.getAccessToken(testScope);
+    OAuthToken result =
+        client.getAccessToken(
+            GetJWTAccessTokenReq.builder()
+                .scope(testScope)
+                .sessionContext(new SessionContext())
+                .build());
 
     // 验证结果
     assertNotNull(result);
diff --git a/api/src/test/java/com/coze/openapi/service/auth/JWTOAuthTest.java b/api/src/test/java/com/coze/openapi/service/auth/JWTOAuthTest.java
index 033cfe3d..e49bf535 100644
--- a/api/src/test/java/com/coze/openapi/service/auth/JWTOAuthTest.java
+++ b/api/src/test/java/com/coze/openapi/service/auth/JWTOAuthTest.java
@@ -2,7 +2,6 @@
 
 import static org.junit.jupiter.api.Assertions.*;
 import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.*;
 
 import org.junit.jupiter.api.Test;
@@ -10,7 +9,9 @@
 import org.mockito.Mock;
 import org.mockito.junit.jupiter.MockitoExtension;
 
+import com.coze.openapi.client.auth.GetJWTAccessTokenReq;
 import com.coze.openapi.client.auth.OAuthToken;
+import com.coze.openapi.client.auth.model.SessionContext;
 
 @ExtendWith(MockitoExtension.class)
 class JWTOAuthTest {
@@ -33,17 +34,30 @@ void testConstructorWithValidClient() {
     assertNotNull(jwtOAuth);
   }
 
+  @Test
+  void testBuilder() {
+    when(jwtClient.getTtl()).thenReturn(600);
+    jwtOAuth =
+        JWTOAuth.builder()
+            .jwtClient(jwtClient)
+            .enterpriseID("mock id")
+            .accountID(1234L)
+            .sessionContext(new SessionContext())
+            .build();
+    assertNotNull(jwtOAuth);
+  }
+
   @Test
   void testTokenFirstTime() {
     when(jwtClient.getTtl()).thenReturn(600);
     when(oAuthToken.getAccessToken()).thenReturn("test-token");
-    when(jwtClient.getAccessToken((Integer) any(), any(), any())).thenReturn(oAuthToken);
+    when(jwtClient.getAccessToken((GetJWTAccessTokenReq) any())).thenReturn(oAuthToken);
 
     jwtOAuth = new JWTOAuth(jwtClient);
     String token = jwtOAuth.token();
 
     assertEquals("test-token", token);
-    verify(jwtClient, times(1)).getAccessToken((Integer) any(), any(), any());
+    verify(jwtClient, times(1)).getAccessToken((GetJWTAccessTokenReq) any());
   }
 
   @Test
@@ -51,7 +65,7 @@ void testTokenCaching() {
     when(jwtClient.getTtl()).thenReturn(600);
     when(oAuthToken.getAccessToken()).thenReturn("test-token");
     when(oAuthToken.getExpiresIn()).thenReturn(600);
-    when(jwtClient.getAccessToken((Integer) any(), any(), any())).thenReturn(oAuthToken);
+    when(jwtClient.getAccessToken((GetJWTAccessTokenReq) any())).thenReturn(oAuthToken);
 
     jwtOAuth = new JWTOAuth(jwtClient);
 
@@ -59,7 +73,7 @@ void testTokenCaching() {
     String token2 = jwtOAuth.token();
 
     assertEquals(token1, token2);
-    verify(jwtClient, times(2)).getAccessToken((Integer) any(), any(), any());
+    verify(jwtClient, times(2)).getAccessToken((GetJWTAccessTokenReq) any());
   }
 
   @Test
@@ -68,21 +82,21 @@ void testTokenWithCustomParameters() {
     String sessionName = "test-session";
 
     when(oAuthToken.getAccessToken()).thenReturn("test-token");
-    when(jwtClient.getAccessToken(eq(ttl), any(), eq(sessionName))).thenReturn(oAuthToken);
+    when(jwtClient.getAccessToken((GetJWTAccessTokenReq) any())).thenReturn(oAuthToken);
 
     jwtOAuth = JWTOAuth.builder().jwtClient(jwtClient).ttl(ttl).sessionName(sessionName).build();
 
     String token = jwtOAuth.token();
 
     assertEquals("test-token", token);
-    verify(jwtClient).getAccessToken(ttl, null, sessionName);
+    verify(jwtClient).getAccessToken((GetJWTAccessTokenReq) any());
   }
 
   @Test
   void testTokenRefresh() throws InterruptedException {
     when(oAuthToken.getAccessToken()).thenReturn("test-token");
     when(oAuthToken.getExpiresIn()).thenReturn(2);
-    when(jwtClient.getAccessToken((Integer) any(), any(), any())).thenReturn(oAuthToken);
+    when(jwtClient.getAccessToken((GetJWTAccessTokenReq) any())).thenReturn(oAuthToken);
 
     jwtOAuth = JWTOAuth.builder().jwtClient(jwtClient).ttl(2).build();
 
@@ -91,29 +105,6 @@ void testTokenRefresh() throws InterruptedException {
     String token2 = jwtOAuth.token();
 
     assertEquals("test-token", token2);
-    verify(jwtClient, times(2)).getAccessToken((Integer) any(), any(), any());
-  }
-
-  @Test
-  void testGetRefreshBeforeWithDifferentTtls() {
-    when(oAuthToken.getAccessToken()).thenReturn("test-token");
-
-    // Test ttl >= 600
-    jwtOAuth = JWTOAuth.builder().jwtClient(jwtClient).ttl(600).build();
-    when(jwtClient.getAccessToken((Integer) any(), any(), any())).thenReturn(oAuthToken);
-    jwtOAuth.token();
-    verify(jwtClient).getAccessToken(eq(600), any(), any());
-
-    // Test 60 <= ttl < 600
-    jwtOAuth = JWTOAuth.builder().jwtClient(jwtClient).ttl(100).build();
-    when(jwtClient.getAccessToken((Integer) any(), any(), any())).thenReturn(oAuthToken);
-    jwtOAuth.token();
-    verify(jwtClient).getAccessToken(eq(100), any(), any());
-
-    // Test 30 <= ttl < 60
-    jwtOAuth = JWTOAuth.builder().jwtClient(jwtClient).ttl(30).build();
-    when(jwtClient.getAccessToken((Integer) any(), any(), any())).thenReturn(oAuthToken);
-    jwtOAuth.token();
-    verify(jwtClient).getAccessToken(eq(30), any(), any());
+    verify(jwtClient, times(2)).getAccessToken((GetJWTAccessTokenReq) any());
   }
 }
diff --git a/example/pom.xml b/example/pom.xml
index e0cd6e47..d0a13fbb 100644
--- a/example/pom.xml
+++ b/example/pom.xml
@@ -16,7 +16,7 @@
         <dependency>
             <groupId>com.coze</groupId>
             <artifactId>coze-api</artifactId>
-            <version>0.3.0</version>
+            <version>0.3.1</version>
         </dependency>
     </dependencies>
 </project>


Reviews:
user: login: coderabbitai[bot]
body: **Actionable comments posted: 4**

<details>
<summary>🔭 Outside diff range comments (1)</summary><blockquote>

<details>
<summary>api/src/main/java/com/coze/openapi/service/auth/JWTOAuth.java (1)</summary><blockquote>

`38-56`: _⚠️ Potential issue_

**`refreshAt` is calculated as a relative duration, but later compared to absolute time**

```java
this.refreshAt = this.expiresIn - getRefreshBefore();
```

`expiresIn` is the remaining lifetime in seconds (relative), while `needRefresh()` compares `refreshAt` to `System.currentTimeMillis()/1000` (absolute).  
As a result `needRefresh()` will almost always be `true`, forcing a token refresh on every call.

```diff
- this.refreshAt = this.expiresIn - getRefreshBefore();
+ long nowSec = System.currentTimeMillis() / 1000;
+ this.refreshAt = nowSec + this.expiresIn - getRefreshBefore();
```

Please verify what `expiresIn` actually represents and adjust accordingly to avoid an endless refresh loop and unnecessary network calls.

</blockquote></details>

</blockquote></details>

<details>
<summary>🧹 Nitpick comments (4)</summary><blockquote>

<details>
<summary>api/src/main/java/com/coze/openapi/client/websocket/event/model/InterruptConfig.java (1)</summary><blockquote>

`1-20`: **Well-structured model class for interrupt configuration.**

The class is properly defined with appropriate annotations for JSON mapping and Lombok for reducing boilerplate code. The fields are clearly named to represent their purposes.

Consider adding the following improvements:
1. Add JavaDoc comments to explain the purpose of this class and the meaning of each field
2. If `mode` has a specific set of allowed values, consider using an enum instead of String
3. Add validation for the `keywords` list (e.g., non-empty check if appropriate)

</blockquote></details>
<details>
<summary>api/src/main/java/com/coze/openapi/client/websocket/event/model/AsrConfig.java (1)</summary><blockquote>

`1-23`: **Well-structured model class for ASR configuration.**

The class definition is clean with appropriate Lombok annotations and JSON property mappings. The fields are descriptively named.

Consider the following improvements:
1. Add JavaDoc comments to explain the purpose of this class and its fields
2. Add validation or documentation for the expected format of `userLanguage` (e.g., "en-US", "zh-CN")
3. Consider validation for the `hotWords` list if certain constraints apply

</blockquote></details>
<details>
<summary>api/src/main/java/com/coze/openapi/client/websocket/event/model/TurnDetection.java (1)</summary><blockquote>

`22-27`: **Added new configuration fields for interrupt and ASR capabilities**

The additions of `interruptConfig` and `asrConfig` fields properly integrate with the newly created model classes and are consistent with the changed default type.

Consider the following improvements:
1. Add JavaDoc to explain when and how these configurations should be used
2. Consider adding validation to ensure appropriate configurations are provided when specific detection types are used (e.g., `interruptConfig` should be non-null when type is "client_interrupt")

</blockquote></details>
<details>
<summary>api/src/main/java/com/coze/openapi/service/auth/JWTOAuthClient.java (1)</summary><blockquote>

`51-86`: **API surface explosion – 8 overloads delegating to a single method**

Eight overloads (`getAccessToken(...)`) differ only in parameter combinations and immediately build a `GetJWTAccessTokenReq`. This increases maintenance cost without adding much value because the caller can just invoke the builder directly.

A leaner alternative:

1. Keep the single `getAccessToken(GetJWTAccessTokenReq req)` public.
2. Deprecate the individual overloads (or remove them in the next major).

This will reduce code size and future breakage points while still allowing fluent construction through Lombok’s builder:

```java
jwtClient.getAccessToken(
    GetJWTAccessTokenReq.builder()
        .ttl(600)
        .scope(Scope.BOT)
        .sessionName("online-session")
        .build());
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: .coderabbit.yaml**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 9e4dbf1a8056893bc3aa884ea24fd23098fa69ce and 11aaccd31b4a917992d81555107622f89c01b8e8.

</details>

<details>
<summary>📒 Files selected for processing (22)</summary>

* `api/pom.xml` (1 hunks)
* `api/src/main/java/com/coze/openapi/api/CozeAuthAPI.java` (1 hunks)
* `api/src/main/java/com/coze/openapi/client/auth/GetAccessTokenReq.java` (1 hunks)
* `api/src/main/java/com/coze/openapi/client/auth/GetJWTAccessTokenReq.java` (1 hunks)
* `api/src/main/java/com/coze/openapi/client/auth/model/DeviceInfo.java` (1 hunks)
* `api/src/main/java/com/coze/openapi/client/auth/model/SessionContext.java` (1 hunks)
* `api/src/main/java/com/coze/openapi/client/auth/scope/Scope.java` (2 hunks)
* `api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAccountPermission.java` (1 hunks)
* `api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAttributeConstraint.java` (1 hunks)
* `api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAttributeConstraintConnectorBotChatAttribute.java` (1 hunks)
* `api/src/main/java/com/coze/openapi/client/dataset/document/model/DocumentBase.java` (1 hunks)
* `api/src/main/java/com/coze/openapi/client/dataset/document/model/DocumentSourceInfo.java` (1 hunks)
* `api/src/main/java/com/coze/openapi/client/websocket/event/model/AsrConfig.java` (1 hunks)
* `api/src/main/java/com/coze/openapi/client/websocket/event/model/InterruptConfig.java` (1 hunks)
* `api/src/main/java/com/coze/openapi/client/websocket/event/model/TurnDetection.java` (1 hunks)
* `api/src/main/java/com/coze/openapi/service/auth/DefaultJWTBuilder.java` (1 hunks)
* `api/src/main/java/com/coze/openapi/service/auth/JWTOAuth.java` (3 hunks)
* `api/src/main/java/com/coze/openapi/service/auth/JWTOAuthClient.java` (2 hunks)
* `api/src/main/java/com/coze/openapi/service/auth/JWTPayload.java` (2 hunks)
* `api/src/main/java/com/coze/openapi/service/auth/OAuthClient.java` (1 hunks)
* `api/src/main/java/com/coze/openapi/service/utils/UserAgentInterceptor.java` (1 hunks)
* `example/pom.xml` (1 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🧬 Code Graph Analysis (3)</summary>

<details>
<summary>api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAttributeConstraint.java (3)</summary><blockquote>

<details>
<summary>api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAttributeConstraintConnectorBotChatAttribute.java (1)</summary>

* `AllArgsConstructor` (10-15)

</details>
<details>
<summary>api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAccountPermission.java (1)</summary>

* `Data` (10-15)

</details>
<details>
<summary>api/src/main/java/com/coze/openapi/client/auth/scope/Scope.java (1)</summary>

* `Data` (14-42)

</details>

</blockquote></details>
<details>
<summary>api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAccountPermission.java (3)</summary><blockquote>

<details>
<summary>api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAttributeConstraintConnectorBotChatAttribute.java (1)</summary>

* `AllArgsConstructor` (10-15)

</details>
<details>
<summary>api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAttributeConstraint.java (1)</summary>

* `Data` (8-13)

</details>
<details>
<summary>api/src/main/java/com/coze/openapi/client/auth/scope/Scope.java (1)</summary>

* `Data` (14-42)

</details>

</blockquote></details>
<details>
<summary>api/src/main/java/com/coze/openapi/client/auth/model/DeviceInfo.java (3)</summary><blockquote>

<details>
<summary>api/src/main/java/com/coze/openapi/client/auth/GetJWTAccessTokenReq.java (1)</summary>

* `Data` (9-18)

</details>
<details>
<summary>api/src/main/java/com/coze/openapi/client/auth/model/SessionContext.java (1)</summary>

* `Data` (8-13)

</details>
<details>
<summary>api/src/main/java/com/coze/openapi/service/auth/JWTPayload.java (1)</summary>

* `Data` (9-21)

</details>

</blockquote></details>

</details>

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (2)</summary>

* GitHub Check: test (Java 17 on Windows)
* GitHub Check: test (Java 11 on Windows)

</details>

<details>
<summary>🔇 Additional comments (16)</summary><blockquote>

<details>
<summary>api/src/main/java/com/coze/openapi/client/dataset/document/model/DocumentSourceInfo.java (1)</summary>

`44-50`: **Great addition of binary content support!**

This new method nicely complements the existing string-based method by enabling direct support for binary file content. The implementation correctly encodes the byte array to Base64, following the same pattern as the string version.

</details>
<details>
<summary>api/src/main/java/com/coze/openapi/client/dataset/document/model/DocumentBase.java (1)</summary>

`42-47`: **Good implementation of binary file support**

The new factory method properly leverages the corresponding `DocumentSourceInfo.buildLocalFile(byte[], String)` method and maintains consistency with the existing string-based method. This addition enhances the API by providing direct support for binary file content.

</details>
<details>
<summary>api/pom.xml (1)</summary>

`46-46`: <details>
<summary>✅ Verification successful</summary>

**Align POM version with new release**  
The `coze-api` artifact version has been correctly bumped from `0.3.0` to `0.3.1` to reflect the new features and fixes.  
  
Please run the following script to ensure no remaining references to the old version exist anywhere in the repository:

---

🏁 Script executed:

```shell
#!/bin/bash
# Search for outdated version strings '0.3.0' in the codebase
rg -n "0\\.3\\.0" .
```

Length of output: 19

---



</details>

**All references to ‘0.3.0’ have been removed – version bump to 0.3.1 is complete**  
Search across the repository returned no occurrences of the old version string. The `coze-api` POM is correctly aligned with the new release.

</details>
<details>
<summary>example/pom.xml (1)</summary>

`19-19`: **Update example project dependency version**  
The example module’s dependency on `coze-api` has been updated to `0.3.1`, keeping it in sync with the API module.

</details>
<details>
<summary>api/src/main/java/com/coze/openapi/service/utils/UserAgentInterceptor.java (1)</summary>

`27-27`: **Synchronize `VERSION` constant with POM**  
The static `VERSION` constant has been updated to `"0.3.1"` to match the artifact version bump.

</details>
<details>
<summary>api/src/main/java/com/coze/openapi/service/auth/DefaultJWTBuilder.java (1)</summary>

`29-31`: **Properly added JWT claim for session context**

Adding the session context claim to the JWT generation process is well implemented, with a null check before adding the claim to avoid null values. This ensures backward compatibility with existing JWT payloads that don't include session context.

</details>
<details>
<summary>api/src/main/java/com/coze/openapi/service/auth/JWTPayload.java (1)</summary>

`5-6`: **Successfully added session context field**

The new SessionContext field is properly integrated into the JWTPayload class. With the existing Lombok annotations (@Data, @Builder), getters, setters, and builder methods will be generated automatically for this field.



Also applies to: 20-20

</details>
<details>
<summary>api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAccountPermission.java (1)</summary>

`5-6`: **Consistent JSON property annotation added**

Good addition of the @JsonProperty annotation to explicitly map the Java field name to the JSON property name. This maintains consistency with the other scope-related classes that use the same annotation pattern.



Also applies to: 13-14

</details>
<details>
<summary>api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAttributeConstraint.java (1)</summary>

`3-4`: **Consistent JSON property annotation added**

The @JsonProperty annotation is correctly added to the connectorBotChatAttribute field, ensuring proper JSON serialization/deserialization with a consistent naming convention. This completes the pattern of explicit JSON property mappings across the scope classes.



Also applies to: 11-11

</details>
<details>
<summary>api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAttributeConstraintConnectorBotChatAttribute.java (1)</summary>

`5-6`: **Well-implemented JSON property mapping.**

The addition of `@JsonProperty("bot_id_list")` annotation explicitly maps the JSON property to the Java field, following best practices by making the mapping explicit rather than relying on default conversion rules. This change is consistent with other JSON property annotations added across related classes in the package.



Also applies to: 13-14

</details>
<details>
<summary>api/src/main/java/com/coze/openapi/client/auth/model/SessionContext.java (1)</summary>

`1-13`: **Properly structured model class.**

This new class follows appropriate design patterns for model classes:
- Lombok annotations to reduce boilerplate code
- Clear field naming with proper JSON property mapping
- Simple, focused design that aligns with its role in the authentication flow

It serves as a clean container for device information in the enhanced authentication flow.

</details>
<details>
<summary>api/src/main/java/com/coze/openapi/client/auth/GetAccessTokenReq.java (1)</summary>

`47-52`: **Appropriate extension of the token request model.**

The addition of account and enterprise identifiers extends the request model logically to support the new scoped token retrieval functionality. The implementation follows the established pattern in the class with proper JSON property mapping and consistent naming conventions.

</details>
<details>
<summary>api/src/main/java/com/coze/openapi/client/auth/scope/Scope.java (1)</summary>

`7-7`: **Good addition of JSON property annotations for serialization consistency.**

The addition of `@JsonProperty` annotations to the fields ensures proper JSON serialization/deserialization mapping between Java's camelCase naming convention and JSON's snake_case convention. This makes the `Scope` class consistent with other related classes in the authentication framework.



Also applies to: 17-18, 20-21

</details>
<details>
<summary>api/src/main/java/com/coze/openapi/service/auth/OAuthClient.java (1)</summary>

`178-194`: **Well-structured methods for account and enterprise token retrieval.**

These new protected methods follow the same clean structure as the existing token retrieval methods, properly handling the optional authorization header and making use of the existing execution model. The consistent approach makes the code maintainable and easy to understand.

</details>
<details>
<summary>api/src/main/java/com/coze/openapi/api/CozeAuthAPI.java (1)</summary>

`26-38`: **API endpoints for account and enterprise token retrieval look good.**

The new endpoints follow the same pattern as existing endpoints, with proper annotations for headers, request method, and path variables. The naming convention for the URI paths is consistent with the existing API design.

</details>
<details>
<summary>api/src/main/java/com/coze/openapi/service/auth/JWTOAuthClient.java (1)</summary>

`91-122`: **Handle missing or invalid fields in `GetJWTAccessTokenReq` defensively**

`doGetAccessToken` forwards `.scope(req.getScope())` and later embeds `sessionName`, `sessionContext`, etc., even when those values are `null`.  
If the downstream REST endpoint does not tolerate `null` JSON properties, a 4xx error is likely.

Consider:

```diff
- builder.grantType(GrantType.JWT_CODE.getValue()).durationSeconds(ttl).scope(req.getScope());
+ builder.grantType(GrantType.JWT_CODE.getValue()).durationSeconds(ttl);
+ if (req.getScope() != null) {
+   builder.scope(req.getScope());
+ }
```

Similar null-checks for `sessionName` / `sessionContext` keep request payloads clean and predictable.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-25T06:49:50Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 1**

<details>
<summary>🧹 Nitpick comments (1)</summary><blockquote>

<details>
<summary>api/src/test/java/com/coze/openapi/service/auth/JWTOAuthTest.java (1)</summary><blockquote>

`1-97`: **Consider adding tests for the new functionality.**

While the existing tests have been properly updated to use the new method signature, there are no tests for the new functionality related to account and enterprise ID-based token retrieval mentioned in the summary. Consider adding test cases that verify these new capabilities.

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 GitHub Actions: CI</summary>

[error] 2-16: Spotless formatting check failed. The file has format violations related to import statements. Run 'mvn spotless:apply' to fix these violations.

</details>

</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: .coderabbit.yaml**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 11aaccd31b4a917992d81555107622f89c01b8e8 and ede81c7c8393346b984bbabf4e5724ea97917cbc.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `api/src/test/java/com/coze/openapi/service/auth/JWTOAuthTest.java` (4 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🪛 GitHub Actions: CI</summary>

<details>
<summary>api/src/test/java/com/coze/openapi/service/auth/JWTOAuthTest.java</summary>

[error] 2-16: Spotless formatting check failed. The file has format violations related to import statements. Run 'mvn spotless:apply' to fix these violations.

</details>

</details>

</details>

<details>
<summary>🔇 Additional comments (1)</summary><blockquote>

<details>
<summary>api/src/test/java/com/coze/openapi/service/auth/JWTOAuthTest.java (1)</summary>

`41-41`: **LGTM! Method signature updates properly implemented.**

All test mocks and verifications have been correctly updated to use the new `getAccessToken` method signature with a single `GetJWTAccessTokenReq` parameter instead of multiple parameters. This aligns with the changes in the client implementation.



Also applies to: 47-47, 55-55, 63-63, 72-72, 79-79, 86-86, 95-95

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-25T06:59:27Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 1**

<details>
<summary>🧹 Nitpick comments (4)</summary><blockquote>

<details>
<summary>api/src/test/java/com/coze/openapi/service/auth/JWTOAuthClientTest.java (4)</summary><blockquote>

`116-158`: **New test for enterprise access token looks well-structured.**

This test covers the new functionality to retrieve enterprise-scoped access tokens, with proper mock setup and verification.

A couple of suggestions:
1. The test comments are in Chinese while code and method names are in English. Consider translating comments for consistency.
2. Consider verifying that the enterprise ID is correctly passed in the request.


```diff
- // 准备测试数据
+ // Prepare test data
```

```diff
    verify(mockApi)
        .enterprise(
            anyMap(),
            any(),
            argThat(
                req -> {
                  assertEquals(GrantType.JWT_CODE.getValue(), req.getGrantType());
                  assertEquals(900, req.getDurationSeconds());
+                 // Verify enterprise ID is correctly passed
+                 assertEquals("213123123", req.getEnterpriseID());
                  return true;
                }));
```

---

`160-202`: **New test for account access token follows good testing practices.**

This test properly verifies the functionality to retrieve account-scoped access tokens.

Similar to the enterprise test, consider:
1. Translating comments to English for consistency
2. Adding verification that the account ID is correctly passed in the request


```diff
    verify(mockApi)
        .account(
            anyMap(),
            any(),
            argThat(
                req -> {
                  assertEquals(GrantType.JWT_CODE.getValue(), req.getGrantType());
                  assertEquals(900, req.getDurationSeconds());
+                 // Verify account ID is correctly passed
+                 assertEquals(1235L, req.getAccountID());
                  return true;
                }));
```

---

`271-276`: **Updated test to use the new request model.**

The test has been correctly updated to use the new `GetJWTAccessTokenReq` builder pattern.

One observation:
- A new `sessionContext` parameter was added that wasn't verified in the assertions. Consider validating that the session context is correctly passed to the API.


```diff
    verify(mockApi)
        .retrieve(
            anyMap(),
            argThat(
                req -> {
                  assertEquals(GrantType.JWT_CODE.getValue(), req.getGrantType());
                  assertEquals("test.scope", req.getScope().toString());
+                 // Verify session context is correctly passed
+                 assertNotNull(req.getSessionContext());
                  return true;
                }));
```

---

`116-202`: **Consider reducing code duplication in test methods.**

The three test methods (testGetEnterpriseAccessToken, testGetAccountAccessToken, and testGetAccessTokenWithScope) contain similar setup code for creating mock responses. Consider extracting this shared logic into a helper method to improve maintainability.


```java
private Response<OAuthToken> createMockTokenResponse(String accessToken, int expiresIn) {
  OAuthToken mockToken = new OAuthToken();
  mockToken.setAccessToken(accessToken);
  mockToken.setExpiresIn(expiresIn);

  return Response.success(
      mockToken,
      new okhttp3.Response.Builder()
          .request(new Request.Builder().url("https://test.com").build())
          .protocol(Protocol.HTTP_1_1)
          .code(200)
          .message("OK")
          .headers(Headers.of("X-Log-Id", "test_log_id"))
          .build());
}
```

Then in each test:
```java
Response<OAuthToken> response = createMockTokenResponse("access_token", 900);
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: .coderabbit.yaml**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 7407f4fa842c4a99ba1955184f1f6fede4aa057e and 4c731410e768252cc8d4c7b420568f02dbd6ab63.

</details>

<details>
<summary>📒 Files selected for processing (4)</summary>

* `api/pom.xml` (2 hunks)
* `api/src/main/java/com/coze/openapi/client/auth/GetJWTAccessTokenReq.java` (1 hunks)
* `api/src/main/java/com/coze/openapi/client/auth/model/SessionContext.java` (1 hunks)
* `api/src/test/java/com/coze/openapi/service/auth/JWTOAuthClientTest.java` (3 hunks)

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (3)</summary>

* api/pom.xml
* api/src/main/java/com/coze/openapi/client/auth/GetJWTAccessTokenReq.java
* api/src/main/java/com/coze/openapi/client/auth/model/SessionContext.java

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (2)</summary>

* GitHub Check: test (Java 17 on Windows)
* GitHub Check: test (Java 11 on Windows)

</details>

<details>
<summary>🔇 Additional comments (1)</summary><blockquote>

<details>
<summary>api/src/test/java/com/coze/openapi/service/auth/JWTOAuthClientTest.java (1)</summary>

`13-13`: **Import statements look good.**

The imports for `GetJWTAccessTokenReq` and `SessionContext` are correctly added to support the new test methods.



Also applies to: 16-16

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-25T07:25:44Z

Review comments:
diff_hunk: @@ -12,11 +12,17 @@
 public class TurnDetection {
   @Builder.Default
   @JsonProperty("type")
-  private String type = "client_vad";
+  private String type = "client_interrupt";
path: api/src/main/java/com/coze/openapi/client/websocket/event/model/TurnDetection.java
user: login: coderabbitai[bot]
body: _💡 Verification agent_

<details>
<summary>🧩 Analysis chain</summary>

**Changed default detection type from "client_vad" to "client_interrupt"**

This change represents a significant behavior change in the default turn detection mechanism. Ensure that all clients using this class are aware of this change, as it may affect existing implementations.

Consider providing migration guidance or documentation to help clients understand the difference between the two detection types.

---

🏁 Script executed:

```shell
#!/bin/bash
# Find references to TurnDetection to see potential impact
rg -A 2 -B 2 "TurnDetection" --type java
```

Length of output: 1001

---



</details>

**Update migration docs for default turn detection type**

The default `type` in TurnDetection has changed from `"client_vad"` to `"client_interrupt"`. This affects any code paths that rely on the no-arg/default builder for TurnDetection (for example, when it’s embedded in ChatUpdateEventData). Please:

- Review `api/src/main/java/com/coze/openapi/client/websocket/event/model/TurnDetection.java` (line 15)  
- Audit its usage in `api/src/main/java/com/coze/openapi/client/websocket/event/model/ChatUpdateEventData.java`  
- Update your migration guide or release notes to highlight the behavior change  
- Communicate this change to downstream clients to prevent unexpected behavior

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-04-25T06:49:49Z
author_association: NONE
diff_hunk: @@ -0,0 +1,16 @@
+package com.coze.openapi.client.auth.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import lombok.Builder;
+import lombok.Data;
+
+@Data
+@Builder
+public class DeviceInfo {
+  @JsonProperty("device_id")
+  private String DeviceID;
+
+  @JsonProperty("custom_consumer")
+  private String CustomConsumer;
path: api/src/main/java/com/coze/openapi/client/auth/model/DeviceInfo.java
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Fix field naming convention.**

The field names `DeviceID` and `CustomConsumer` start with uppercase letters, which violates Java's standard naming convention where variable names should use camelCase. This is inconsistent with other fields in the codebase (like `accountID` and `enterpriseID`).


```diff
-  @JsonProperty("device_id")
-  private String DeviceID;
+  @JsonProperty("device_id")
+  private String deviceID;

-  @JsonProperty("custom_consumer")
-  private String CustomConsumer;
+  @JsonProperty("custom_consumer")
+  private String customConsumer;
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
  @JsonProperty("device_id")
  private String deviceID;

  @JsonProperty("custom_consumer")
  private String customConsumer;
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->

✅ Addressed in commit c4563da
created_at: 2025-04-25T06:49:49Z
author_association: NONE
diff_hunk: @@ -0,0 +1,18 @@
+package com.coze.openapi.client.auth;
+
+import com.coze.openapi.client.auth.model.SessionContext;
+import com.coze.openapi.client.auth.scope.Scope;
+
+import lombok.Builder;
+import lombok.Data;
+
+@Data
+@Builder
+public class GetJWTAccessTokenReq {
+  private Integer ttl;
+  private Scope scope;
+  private String sessionName;
+  private Long accountID;
+  private String enterpriseID;
+  private SessionContext sessionContext;
+}
path: api/src/main/java/com/coze/openapi/client/auth/GetJWTAccessTokenReq.java
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Consider adding @JsonProperty annotations for consistency.**

This new request class looks good overall, with clear field definitions and appropriate use of Lombok annotations. However, unlike the `Scope` class, this class is missing `@JsonProperty` annotations on its fields. If this class is serialized to/from JSON, consider adding these annotations to maintain naming convention consistency across the codebase.

```diff
@Data
@Builder
public class GetJWTAccessTokenReq {
  private Integer ttl;
  private Scope scope;
+ @JsonProperty("session_name")
  private String sessionName;
+ @JsonProperty("account_id")
  private Long accountID;
+ @JsonProperty("enterprise_id")
  private String enterpriseID;
+ @JsonProperty("session_context")
  private SessionContext sessionContext;
}
```



> Committable suggestion skipped: line range outside the PR's diff.

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-04-25T06:49:50Z
author_association: NONE
diff_hunk: @@ -2,20 +2,27 @@
 
 import java.util.Objects;
 
+import com.coze.openapi.client.auth.GetJWTAccessTokenReq;
 import com.coze.openapi.client.auth.OAuthToken;
+import com.coze.openapi.client.auth.model.SessionContext;
 import com.coze.openapi.client.auth.scope.Scope;
 
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.NonNull;
+import lombok.*;
 
-@Builder
+@Getter
+@Builder(builderClassName = "JWTOAuthBuilder")
+@Setter(AccessLevel.PRIVATE)
 @AllArgsConstructor
+@NoArgsConstructor
 public class JWTOAuth extends Auth {
path: api/src/main/java/com/coze/openapi/service/auth/JWTOAuth.java
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**⚠️ Duplicate builder definitions will break compilation**

`@Builder(builderClassName = "JWTOAuthBuilder")` instructs Lombok to generate an inner class **with exactly the same name** as the manually-written `static class JWTOAuthBuilder` further below.  
The Java compiler will consequently report “duplicate class definition” and fail the build.

Two quick ways to resolve:

```diff
-@Builder(builderClassName = "JWTOAuthBuilder")
+@Builder(builderClassName = "InternalBuilder")   // any unique name
…
-public static class JWTOAuthBuilder {
+public static class InternalBuilder {
```

or simply drop the Lombok annotation and keep the handcrafted builder if the additional validation logic (mandatory `jwtClient`, default TTL, etc.) is required.

Failing to fix this will block the entire PR from compiling.  



Also applies to: 69-88

<!-- This is an auto-generated comment by CodeRabbit -->

✅ Addressed in commit c4563da
created_at: 2025-04-25T06:49:50Z
author_association: NONE
diff_hunk: @@ -5,6 +5,7 @@
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.*;
 
+import com.coze.openapi.client.auth.GetJWTAccessTokenReq;
path: api/src/test/java/com/coze/openapi/service/auth/JWTOAuthTest.java
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Fix import order to resolve pipeline failures.**

The pipeline is failing due to Spotless formatting checks. The addition of the new import is breaking the formatting standard. You should run `mvn spotless:apply` to automatically fix the import ordering.

```shell
#!/bin/bash
# Check the standard import ordering in the project
find api/src/main/java/com/coze/openapi -name "*.java" | head -n 5 | xargs cat | grep -A 10 "import"
```

<!-- This is an auto-generated comment by CodeRabbit -->

✅ Addressed in commit 7407f4f
created_at: 2025-04-25T06:59:25Z
author_association: NONE
diff_hunk: @@ -111,6 +113,94 @@ void testGetAccessToken() {
                 }));
   }
 
+  @Test
+  void testGetEnterpriseAccessToken() {
+    // 准备测试数据
+    OAuthToken mockToken = new OAuthToken();
+    mockToken.setAccessToken("access_token");
+    mockToken.setExpiresIn(900);
+
+    Response<OAuthToken> response =
+        Response.success(
+            mockToken,
+            new okhttp3.Response.Builder()
+                .request(new Request.Builder().url("https://test.com").build())
+                .protocol(Protocol.HTTP_1_1)
+                .code(200)
+                .message("OK")
+                .headers(Headers.of("X-Log-Id", "test_log_id"))
+                .build());
+
+    // 设置模拟行为
+    when(mockApi.enterprise(anyMap(), any(), any(GetAccessTokenReq.class)))
+        .thenReturn(Single.just(response));
+
+    // 执行测试
+    OAuthToken result =
+        client.getAccessToken(GetJWTAccessTokenReq.builder().enterpriseID("213123123").build());
+
+    // 验证结果
+    assertNotNull(result);
+    assertEquals("access_token", result.getAccessToken());
+    assertEquals(Integer.valueOf(900), result.getExpiresIn());
+
+    // 验证请求参数
+    verify(mockApi)
+        .enterprise(
+            anyMap(),
+            any(),
+            argThat(
+                req -> {
+                  assertEquals(GrantType.JWT_CODE.getValue(), req.getGrantType());
+                  assertEquals(900, req.getDurationSeconds());
+                  return true;
+                }));
+  }
+
+  @Test
+  void testGetAccountAccessToken() {
+    // 准备测试数据
+    OAuthToken mockToken = new OAuthToken();
+    mockToken.setAccessToken("access_token");
+    mockToken.setExpiresIn(900);
+
+    Response<OAuthToken> response =
+        Response.success(
+            mockToken,
+            new okhttp3.Response.Builder()
+                .request(new Request.Builder().url("https://test.com").build())
+                .protocol(Protocol.HTTP_1_1)
+                .code(200)
+                .message("OK")
+                .headers(Headers.of("X-Log-Id", "test_log_id"))
+                .build());
+
+    // 设置模拟行为
+    when(mockApi.account(anyMap(), any(), any(GetAccessTokenReq.class)))
+        .thenReturn(Single.just(response));
+
+    // 执行测试
+    OAuthToken result =
+        client.getAccessToken(GetJWTAccessTokenReq.builder().accountID(1235L).build());
+
+    // 验证结果
+    assertNotNull(result);
+    assertEquals("access_token", result.getAccessToken());
+    assertEquals(Integer.valueOf(900), result.getExpiresIn());
+
+    // 验证请求参数
+    verify(mockApi)
+        .account(
+            anyMap(),
+            any(),
+            argThat(
+                req -> {
+                  assertEquals(GrantType.JWT_CODE.getValue(), req.getGrantType());
+                  assertEquals(900, req.getDurationSeconds());
+                  return true;
+                }));
+  }
path: api/src/test/java/com/coze/openapi/service/auth/JWTOAuthClientTest.java
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Add test for error handling and edge cases.**

The current tests only verify the happy path. Consider adding tests for:
1. What happens when both enterpriseID and accountID are provided
2. Error responses from the API
3. Invalid ID formats for enterprise or account IDs

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-04-25T07:25:43Z
author_association: NONE

PR comments:
user: login: coderabbitai[bot]
created_at: 2025-04-25T06:46:43Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- This is an auto-generated comment: failure by coderabbit.ai -->

> [!CAUTION]
> ## Review failed
> 
> The pull request is closed.

<!-- end of auto-generated comment: failure by coderabbit.ai -->
<!-- walkthrough_start -->

## Walkthrough

This update introduces several new features and improvements to the authentication and document handling components. Notable changes include the addition of new API endpoints for account and enterprise token retrieval, new request and model classes for JWT access token requests and session context, and enhancements to the token generation flow to support additional claims and context. The document handling API now supports file content as byte arrays. Numerous classes have been updated to include explicit JSON property annotations, and the project version is incremented from 0.3.0 to 0.3.1 throughout the codebase.

## Changes

| File(s)                                                                                      | Change Summary |
|----------------------------------------------------------------------------------------------|---------------|
| `api/pom.xml`, `example/pom.xml`                                                             | Project and dependency version updated from 0.3.0 to 0.3.1. |
| `api/src/main/java/com/coze/openapi/api/CozeAuthAPI.java`                                    | Added two new POST endpoint methods for account and enterprise token retrieval. |
| `api/src/main/java/com/coze/openapi/client/auth/GetAccessTokenReq.java`                      | Added `accountID` (Long) and `enterpriseID` (String) fields with JSON annotations. |
| `api/src/main/java/com/coze/openapi/client/auth/GetJWTAccessTokenReq.java`                   | New class for JWT access token requests, including TTL, scope, session name, account/enterprise IDs, and session context. |
| `api/src/main/java/com/coze/openapi/client/auth/model/DeviceInfo.java`                       | New class for device information with `device_id` and `custom_consumer` fields. |
| `api/src/main/java/com/coze/openapi/client/auth/model/SessionContext.java`                   | New class for session context containing a `DeviceInfo` object. |
| `api/src/main/java/com/coze/openapi/client/auth/scope/Scope.java`                            | Added JSON property annotations to `accountPermission` and `attributeConstraint` fields. |
| `api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAccountPermission.java`           | Added JSON property annotation to `permissionList` field. |
| `api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAttributeConstraint.java`         | Added JSON property annotation to `connectorBotChatAttribute` field. |
| `api/src/main/java/com/coze/openapi/client/auth/scope/ScopeAttributeConstraintConnectorBotChatAttribute.java` | Added JSON property annotation to `botIDList` field. |
| `api/src/main/java/com/coze/openapi/client/dataset/document/model/DocumentBase.java`         | Added static factory method to build from byte array content. |
| `api/src/main/java/com/coze/openapi/client/dataset/document/model/DocumentSourceInfo.java`   | Added static factory method to build from byte array content. |
| `api/src/main/java/com/coze/openapi/client/websocket/event/model/AsrConfig.java`             | New class for ASR configuration with hot words, context, and user language. |
| `api/src/main/java/com/coze/openapi/client/websocket/event/model/InterruptConfig.java`       | New class for interrupt configuration with mode and keywords. |
| `api/src/main/java/com/coze/openapi/client/websocket/event/model/TurnDetection.java`         | Changed default `type` value, added `interruptConfig` and `asrConfig` fields. |
| `api/src/main/java/com/coze/openapi/service/auth/DefaultJWTBuilder.java`                     | Added support for optional `session_context` claim in JWT payload. |
| `api/src/main/java/com/coze/openapi/service/auth/JWTOAuth.java`                              | Added `enterpriseID`, `accountID`, and `sessionContext` fields; refactored builder and token retrieval to use new request object. |
| `api/src/main/java/com/coze/openapi/service/auth/JWTOAuthClient.java`                        | Refactored all `getAccessToken` methods to use `GetJWTAccessTokenReq`; centralized logic and added support for account/enterprise IDs. |
| `api/src/main/java/com/coze/openapi/service/auth/JWTPayload.java`                            | Added `sessionContext` field. |
| `api/src/main/java/com/coze/openapi/service/auth/OAuthClient.java`                           | Added protected methods for account and enterprise token retrieval. |
| `api/src/main/java/com/coze/openapi/service/utils/UserAgentInterceptor.java`                 | Updated static version string constant to 0.3.1. |
| `api/src/test/java/com/coze/openapi/service/auth/JWTOAuthTest.java`                          | Updated tests to use new `getAccessToken(GetJWTAccessTokenReq)` signature; removed one test method; added builder test. |
| `api/src/test/java/com/coze/openapi/service/auth/JWTOAuthClientTest.java`                    | Added tests for account and enterprise token retrieval; updated existing test to use new request object. |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant Client
    participant JWTOAuth
    participant JWTOAuthClient
    participant OAuthClient
    participant CozeAuthAPI

    Client->>JWTOAuth: Build and request token (with account/enterprise/session context)
    JWTOAuth->>JWTOAuthClient: getAccessToken(GetJWTAccessTokenReq)
    JWTOAuthClient->>OAuthClient: getAccountAccessToken / getEnterpriseAccessToken (if IDs present)
    OAuthClient->>CozeAuthAPI: POST /api/permission/oauth2/account/{account_id}/token or /enterprise_id/{enterprise_id}/token
    CozeAuthAPI-->>OAuthClient: OAuthToken
    OAuthClient-->>JWTOAuthClient: OAuthToken
    JWTOAuthClient-->>JWTOAuth: OAuthToken
    JWTOAuth-->>Client: Token string
```

## Possibly related PRs

- #38: Introduces a JWTBuilder interface and DefaultJWTBuilder implementation to modularize JWT generation, related to JWT handling enhancements extended in this PR.

## Poem

> In the warren where code does hop,  
> New tokens and sessions now pop!  
> With context and claims,  
> And IDs with new names,  
> Our version hops up—never to stop!  
> 🐇✨

<!-- walkthrough_end -->
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNwSPbABsvkCiQBHbGlcSHFcLzpIACIAMxJqLjRaemYkRHgMIh5nNGZ0DHpY+AAPexYPdODoyAB3NGQHATTcGno5MNgPbERKSFhMAC8SAEkAOQBxAAl0ZG5vX38gkMgMRwE+gE4ARhQsXC6/Em58DIIXBWGwJQkAeiYroTQJNA0YQ6VEBgp4bnF8LCZBhebCfdCQADCAyyJDAI3o/ni/gwDA8AAoRgAWEgAVgAzAJsQAGPGYvEADlisU2ADYAEzbGlEhibKlEtBEgDsmPpsQYRPJApIeLQAEpIAI8JBaPhpKt8KFePgJPAlOgUup4AC0L4lLhtF5kCp8FKDh5ENxRPBigwclQ2DQ+MklPR8HwzShEA45cUSnQ3u5rHYGJgJR4VSRalFqP1WtxEBxbrciOpYNgBBomMx7vgrjcc49nmhbvMfLcdhojPpjOAoGRXbEcARiGRlG0FKx2FxePxhKJxFIZPImEoqKp1FodNWTFA4KhUKG0HhCKRyFR21m2BhOH40LV7I5mM55B0R8px5ptLowIYa6YDGhuPASywNCVmF4OAZoj+DBZIAAgiMLZrtQUQOE4Fz4I2DDQqQiBuIczjiLEaBiJAUgUBkAL8I2AAGDywo+8B4XsnQeAAss8ZDWAA8hRkDFJEdQNJA2DcLQYFFBQLCQHhRIaHiGhEqRBB8QJQnbHhbwARq/wYDq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1mPm/QFS54g7ulRwioA/0PvaWtjW+usEk+2tbPsbWFGnD2G68NvuwPcASj0p3nuJ0iOwL7AMRx/e9vf2yHiqChwYTQOYPqHhqPV5A7PMjmjX99zR9OYl0WvA6Lrm10Q/NR2vGHC8x1yw4zVsPRHbr6PB693uz7FDpUfO3wtLtnFLe1zrUurOgd334X0upFxzhwfZNg3v121yQ7n4Oubr0bu6+w4uycO0r1YAwDODUQNgSxCHegJuC7C7h9wRV08E+jHBqBLwU4G8C29rAdgWgvCRAIPBEVJQowY7DDn1GvC3hW32wbYGgHzi0A8Q2wQkGgB2CchNgmwOkLQHJDbAcQF77YFyHpB0hYg5ITYPyF3fkgSA5IFd+O4gBcwlAZ7hgJyAYDkg8QmwPEKSBpACBNg5ITEKoBUAGRcQnIOkNiH3eHvtgv7gQLaGnATvuQXIAyKhHA90gGAmIfd5sDi3bBNgl78D7EG2CxAaQ8QJQPh45A4hOQHgNDx+8xA/ud3mIK9yQE5A0hyQdIHELh7/e0AWPnIQkHSCJA4huPsQIkCe4EC0AaQKgGkHiDffvuoAm4dQNO9ndmFIwdAQePWBXdAA -->

<!-- internal state end -->

---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: .coderabbit.yaml**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 4c731410e768252cc8d4c7b420568f02dbd6ab63 and c4563da39d982f18a7c3465982eefb45aae8e069.

</details>

<details>
<summary>📒 Files selected for processing (3)</summary>

* `api/src/main/java/com/coze/openapi/client/auth/model/DeviceInfo.java` (1 hunks)
* `api/src/main/java/com/coze/openapi/service/auth/JWTOAuth.java` (3 hunks)
* `api/src/test/java/com/coze/openapi/service/auth/JWTOAuthTest.java` (4 hunks)

</details>

</details>
<!-- finishing_touch_checkbox_start -->

<details open="true">
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=coze-dev/coze-java&utm_content=91):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Generate unit testing code for this file.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai generate unit testing code for this file.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and generate unit testing code.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: NONE
user: login: codecov[bot]
created_at: 2025-04-25T07:06:12Z
body: ## [Codecov](https://app.codecov.io/gh/coze-dev/coze-java/pull/91?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=coze-dev) Report
Attention: Patch coverage is `73.84615%` with `17 lines` in your changes missing coverage. Please review.
> Project coverage is 77.33%. Comparing base [(`9e4dbf1`)](https://app.codecov.io/gh/coze-dev/coze-java/commit/9e4dbf1a8056893bc3aa884ea24fd23098fa69ce?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=coze-dev) to head [(`c4563da`)](https://app.codecov.io/gh/coze-dev/coze-java/commit/c4563da39d982f18a7c3465982eefb45aae8e069?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=coze-dev).
> Report is 1 commits behind head on main.

| [Files with missing lines](https://app.codecov.io/gh/coze-dev/coze-java/pull/91?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=coze-dev) | Patch % | Lines |
|---|---|---|
| [.../com/coze/openapi/service/auth/JWTOAuthClient.java](https://app.codecov.io/gh/coze-dev/coze-java/pull/91?src=pr&el=tree&filepath=api%2Fsrc%2Fmain%2Fjava%2Fcom%2Fcoze%2Fopenapi%2Fservice%2Fauth%2FJWTOAuthClient.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=coze-dev#diff-YXBpL3NyYy9tYWluL2phdmEvY29tL2NvemUvb3BlbmFwaS9zZXJ2aWNlL2F1dGgvSldUT0F1dGhDbGllbnQuamF2YQ==) | 69.23% | [8 Missing :warning: ](https://app.codecov.io/gh/coze-dev/coze-java/pull/91?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=coze-dev) |
| [...n/java/com/coze/openapi/service/auth/JWTOAuth.java](https://app.codecov.io/gh/coze-dev/coze-java/pull/91?src=pr&el=tree&filepath=api%2Fsrc%2Fmain%2Fjava%2Fcom%2Fcoze%2Fopenapi%2Fservice%2Fauth%2FJWTOAuth.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=coze-dev#diff-YXBpL3NyYy9tYWluL2phdmEvY29tL2NvemUvb3BlbmFwaS9zZXJ2aWNlL2F1dGgvSldUT0F1dGguamF2YQ==) | 75.00% | [4 Missing and 3 partials :warning: ](https://app.codecov.io/gh/coze-dev/coze-java/pull/91?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=coze-dev) |
| [...ava/com/coze/openapi/service/auth/OAuthClient.java](https://app.codecov.io/gh/coze-dev/coze-java/pull/91?src=pr&el=tree&filepath=api%2Fsrc%2Fmain%2Fjava%2Fcom%2Fcoze%2Fopenapi%2Fservice%2Fauth%2FOAuthClient.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=coze-dev#diff-YXBpL3NyYy9tYWluL2phdmEvY29tL2NvemUvb3BlbmFwaS9zZXJ2aWNlL2F1dGgvT0F1dGhDbGllbnQuamF2YQ==) | 75.00% | [0 Missing and 2 partials :warning: ](https://app.codecov.io/gh/coze-dev/coze-java/pull/91?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=coze-dev) |

```diff
@@             Coverage Diff              @@
##               main      #91      +/-   ##
============================================
- Coverage     77.70%   77.33%   -0.37%     
- Complexity      321      328       +7     
============================================
  Files            61       61              
  Lines          1583     1637      +54     
  Branches        102      110       +8     
============================================
+ Hits           1230     1266      +36     
- Misses          280      294      +14     
- Partials         73       77       +4     
```

| [Flag](https://app.codecov.io/gh/coze-dev/coze-java/pull/91/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=coze-dev) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [unittests](https://app.codecov.io/gh/coze-dev/coze-java/pull/91/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=coze-dev) | `77.33% <73.84%> (-0.37%)` | `328.00 <10.00> (+7.00)` | :arrow_down: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=coze-dev#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Files with missing lines](https://app.codecov.io/gh/coze-dev/coze-java/pull/91?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=coze-dev) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...m/coze/openapi/service/auth/DefaultJWTBuilder.java](https://app.codecov.io/gh/coze-dev/coze-java/pull/91?src=pr&el=tree&filepath=api%2Fsrc%2Fmain%2Fjava%2Fcom%2Fcoze%2Fopenapi%2Fservice%2Fauth%2FDefaultJWTBuilder.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=coze-dev#diff-YXBpL3NyYy9tYWluL2phdmEvY29tL2NvemUvb3BlbmFwaS9zZXJ2aWNlL2F1dGgvRGVmYXVsdEpXVEJ1aWxkZXIuamF2YQ==) | `87.50% <100.00%> (+1.78%)` | `4.00 <0.00> (+1.00)` | |
| [...java/com/coze/openapi/service/auth/JWTPayload.java](https://app.codecov.io/gh/coze-dev/coze-java/pull/91?src=pr&el=tree&filepath=api%2Fsrc%2Fmain%2Fjava%2Fcom%2Fcoze%2Fopenapi%2Fservice%2Fauth%2FJWTPayload.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=coze-dev#diff-YXBpL3NyYy9tYWluL2phdmEvY29tL2NvemUvb3BlbmFwaS9zZXJ2aWNlL2F1dGgvSldUUGF5bG9hZC5qYXZh) | `63.63% <100.00%> (+3.63%)` | `9.00 <1.00> (+1.00)` | |
| [...ze/openapi/service/utils/UserAgentInterceptor.java](https://app.codecov.io/gh/coze-dev/coze-java/pull/91?src=pr&el=tree&filepath=api%2Fsrc%2Fmain%2Fjava%2Fcom%2Fcoze%2Fopenapi%2Fservice%2Futils%2FUserAgentInterceptor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=coze-dev#diff-YXBpL3NyYy9tYWluL2phdmEvY29tL2NvemUvb3BlbmFwaS9zZXJ2aWNlL3V0aWxzL1VzZXJBZ2VudEludGVyY2VwdG9yLmphdmE=) | `81.25% <ø> (ø)` | `7.00 <0.00> (ø)` | |
| [...ava/com/coze/openapi/service/auth/OAuthClient.java](https://app.codecov.io/gh/coze-dev/coze-java/pull/91?src=pr&el=tree&filepath=api%2Fsrc%2Fmain%2Fjava%2Fcom%2Fcoze%2Fopenapi%2Fservice%2Fauth%2FOAuthClient.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=coze-dev#diff-YXBpL3NyYy9tYWluL2phdmEvY29tL2NvemUvb3BlbmFwaS9zZXJ2aWNlL2F1dGgvT0F1dGhDbGllbnQuamF2YQ==) | `64.23% <75.00%> (+0.60%)` | `24.00 <2.00> (+2.00)` | |
| [...n/java/com/coze/openapi/service/auth/JWTOAuth.java](https://app.codecov.io/gh/coze-dev/coze-java/pull/91?src=pr&el=tree&filepath=api%2Fsrc%2Fmain%2Fjava%2Fcom%2Fcoze%2Fopenapi%2Fservice%2Fauth%2FJWTOAuth.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=coze-dev#diff-YXBpL3NyYy9tYWluL2phdmEvY29tL2NvemUvb3BlbmFwaS9zZXJ2aWNlL2F1dGgvSldUT0F1dGguamF2YQ==) | `67.30% <75.00%> (-9.97%)` | `10.00 <3.00> (ø)` | |
| [.../com/coze/openapi/service/auth/JWTOAuthClient.java](https://app.codecov.io/gh/coze-dev/coze-java/pull/91?src=pr&el=tree&filepath=api%2Fsrc%2Fmain%2Fjava%2Fcom%2Fcoze%2Fopenapi%2Fservice%2Fauth%2FJWTOAuthClient.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=coze-dev#diff-YXBpL3NyYy9tYWluL2phdmEvY29tL2NvemUvb3BlbmFwaS9zZXJ2aWNlL2F1dGgvSldUT0F1dGhDbGllbnQuamF2YQ==) | `73.68% <69.23%> (-0.92%)` | `11.00 <4.00> (+3.00)` | :arrow_down: |

<details><summary> :rocket: New features to boost your workflow: </summary>

- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
author_association: NONE