diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/core/ProfileConfig.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/core/ProfileConfig.kt index a413a4e7..e7297678 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/core/ProfileConfig.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/core/ProfileConfig.kt @@ -25,6 +25,7 @@ internal data class ProfileClientConfig( val apiKey: String?, val tenantId: String?, val oauthAccessToken: String?, + val oauthRefreshToken: String?, val profileAuth: ProfileAuth?, ) @@ -62,6 +63,7 @@ internal fun loadProfileClientConfig( apiKey = text(profile["api_key"]), tenantId = text(profile["workspace_id"]), oauthAccessToken = oauthAccessToken, + oauthRefreshToken = oauthRefreshToken, profileAuth = if (oauthAccessToken != null || oauthRefreshToken != null) { ProfileAuth(jsonMapper, clock, configPath, config, profile) diff --git a/langsmith-java-core/src/test/kotlin/com/langchain/smith/core/ProfileConfigTest.kt b/langsmith-java-core/src/test/kotlin/com/langchain/smith/core/ProfileConfigTest.kt index f60d948b..8493792a 100644 --- a/langsmith-java-core/src/test/kotlin/com/langchain/smith/core/ProfileConfigTest.kt +++ b/langsmith-java-core/src/test/kotlin/com/langchain/smith/core/ProfileConfigTest.kt @@ -147,6 +147,7 @@ internal class ProfileConfigTest { ) assertThat(config?.oauthAccessToken).isEqualTo("old-access-token") + assertThat(config?.oauthRefreshToken).isEqualTo("old-refresh-token") assertThat(requestBody).isEmpty() val authHeader = config?.profileAuth?.authHeader()