diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/AnnotationQueueCreateRunStatusParams.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/AnnotationQueueCreateRunStatusParams.kt index 5318c433..ed94c74f 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/AnnotationQueueCreateRunStatusParams.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/AnnotationQueueCreateRunStatusParams.kt @@ -21,6 +21,9 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** Create Identity Annotation Queue Run Status */ +@Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." +) class AnnotationQueueCreateRunStatusParams private constructor( private val annotationQueueRunId: String?, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/AnnotationQueueRetrieveRunParams.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/AnnotationQueueRetrieveRunParams.kt index 0b0c984b..332d5dd8 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/AnnotationQueueRetrieveRunParams.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/AnnotationQueueRetrieveRunParams.kt @@ -11,6 +11,9 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** Get a run from an annotation queue */ +@Deprecated( + "Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027." +) class AnnotationQueueRetrieveRunParams private constructor( private val queueId: String, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/AnnotationQueueRetrieveSizeParams.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/AnnotationQueueRetrieveSizeParams.kt index be0d1795..c2850478 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/AnnotationQueueRetrieveSizeParams.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/AnnotationQueueRetrieveSizeParams.kt @@ -14,6 +14,9 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** Get Size From Annotation Queue */ +@Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." +) class AnnotationQueueRetrieveSizeParams private constructor( private val queueId: String?, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/AnnotationQueueRetrieveTotalArchivedParams.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/AnnotationQueueRetrieveTotalArchivedParams.kt index e3a0022a..70a0f253 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/AnnotationQueueRetrieveTotalArchivedParams.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/AnnotationQueueRetrieveTotalArchivedParams.kt @@ -12,6 +12,9 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** Get Total Archived From Annotation Queue */ +@Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." +) class AnnotationQueueRetrieveTotalArchivedParams private constructor( private val queueId: String?, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/AnnotationQueueRetrieveTotalSizeParams.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/AnnotationQueueRetrieveTotalSizeParams.kt index a5e4fdfc..e5c690c3 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/AnnotationQueueRetrieveTotalSizeParams.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/AnnotationQueueRetrieveTotalSizeParams.kt @@ -10,6 +10,9 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** Get Total Size From Annotation Queue */ +@Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." +) class AnnotationQueueRetrieveTotalSizeParams private constructor( private val queueId: String?, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/runs/RunCreateByKeyParams.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/runs/RunCreateByKeyParams.kt index 47ed7a46..aad178e3 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/runs/RunCreateByKeyParams.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/runs/RunCreateByKeyParams.kt @@ -22,7 +22,10 @@ import java.util.Objects import java.util.Optional import kotlin.jvm.optionals.getOrNull -/** Add Runs To Annotation Queue By Key */ +/** Self-hosted deployments require LangSmith `v0.16` or later. */ +@Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." +) class RunCreateByKeyParams private constructor( private val queueId: String?, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/runs/RunCreateParams.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/runs/RunCreateParams.kt index eeee9a2c..c9a92be8 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/runs/RunCreateParams.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/runs/RunCreateParams.kt @@ -35,6 +35,9 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** Add Runs To Annotation Queue */ +@Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." +) class RunCreateParams private constructor( private val queueId: String?, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/runs/RunDeleteAllParams.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/runs/RunDeleteAllParams.kt index cda0e9ed..3725d9ff 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/runs/RunDeleteAllParams.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/runs/RunDeleteAllParams.kt @@ -22,6 +22,9 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** Delete Runs From Annotation Queue */ +@Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." +) class RunDeleteAllParams private constructor( private val queueId: String?, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/runs/RunDeleteQueueParams.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/runs/RunDeleteQueueParams.kt index 20bedee0..e478134e 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/runs/RunDeleteQueueParams.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/runs/RunDeleteQueueParams.kt @@ -13,6 +13,9 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** Delete Run From Annotation Queue */ +@Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027." +) class RunDeleteQueueParams private constructor( private val queueId: String, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/runs/RunListParams.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/runs/RunListParams.kt index 77f34cd1..59df26d7 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/runs/RunListParams.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/runs/RunListParams.kt @@ -14,6 +14,9 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** Get Runs From Annotation Queue */ +@Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." +) class RunListParams private constructor( private val queueId: String?, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/runs/RunUpdateParams.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/runs/RunUpdateParams.kt index 5f48cd98..c7d01fad 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/runs/RunUpdateParams.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/runs/RunUpdateParams.kt @@ -22,6 +22,9 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** Update Run In Annotation Queue */ +@Deprecated( + "Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027." +) class RunUpdateParams private constructor( private val queueId: String, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/datasets/experimentruns/ExperimentRunQueryParams.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/datasets/experimentruns/ExperimentRunQueryParams.kt index 9ea57577..d18df82e 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/datasets/experimentruns/ExperimentRunQueryParams.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/datasets/experimentruns/ExperimentRunQueryParams.kt @@ -25,6 +25,8 @@ import kotlin.jvm.optionals.getOrNull /** * Returns a paginated page of dataset examples with runs from the requested experiments. Response * uses the canonical `{items, next_cursor}` envelope. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ class ExperimentRunQueryParams private constructor( diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/datasets/runs/RunQueryParams.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/datasets/runs/RunQueryParams.kt index e9e91ff2..ab80883b 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/datasets/runs/RunQueryParams.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/datasets/runs/RunQueryParams.kt @@ -27,6 +27,9 @@ import kotlin.jvm.optionals.getOrNull * Fetch examples for a dataset, and fetch the runs for each example if they are associated with the * given session_ids. */ +@Deprecated( + "Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027." +) class RunQueryParams private constructor( private val datasetId: String?, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/issues/IssueListParams.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/issues/IssueListParams.kt index 1f7bcee1..e6b4612b 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/issues/IssueListParams.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/issues/IssueListParams.kt @@ -618,6 +618,10 @@ private constructor( @JvmField val OPEN = of("open") + @JvmField val FIXING = of("fixing") + + @JvmField val WATCHING = of("watching") + @JvmField val COMPLETED = of("completed") @JvmField val IGNORED = of("ignored") @@ -628,6 +632,8 @@ private constructor( /** An enum containing [Status]'s known values. */ enum class Known { OPEN, + FIXING, + WATCHING, COMPLETED, IGNORED, } @@ -643,6 +649,8 @@ private constructor( */ enum class Value { OPEN, + FIXING, + WATCHING, COMPLETED, IGNORED, /** An enum member indicating that [Status] was instantiated with an unknown value. */ @@ -659,6 +667,8 @@ private constructor( fun value(): Value = when (this) { OPEN -> Value.OPEN + FIXING -> Value.FIXING + WATCHING -> Value.WATCHING COMPLETED -> Value.COMPLETED IGNORED -> Value.IGNORED else -> Value._UNKNOWN @@ -676,6 +686,8 @@ private constructor( fun known(): Known = when (this) { OPEN -> Known.OPEN + FIXING -> Known.FIXING + WATCHING -> Known.WATCHING COMPLETED -> Known.COMPLETED IGNORED -> Known.IGNORED else -> throw LangChainInvalidDataException("Unknown Status: $value") diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/public_/runs/RunQueryParams.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/public_/runs/RunQueryParams.kt index bf52f7fe..c9fa75af 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/public_/runs/RunQueryParams.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/public_/runs/RunQueryParams.kt @@ -23,8 +23,10 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * **Alpha:** The request and response contract may change; Returns all runs within the trace - * identified by the share token. The share token supplies the tenant, project, and trace scope. + * Returns all runs within the trace identified by the share token. The share token supplies the + * tenant, project, and trace scope. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ class RunQueryParams private constructor( diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/public_/runs/RunRetrieveParams.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/public_/runs/RunRetrieveParams.kt index af3c16fe..6af4e5a8 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/public_/runs/RunRetrieveParams.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/public_/runs/RunRetrieveParams.kt @@ -14,9 +14,10 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * **Alpha:** The request and response contract may change; Returns one run within the trace - * identified by the share token. The request supplies only the run ID and that run's exact - * start_time coordinate. + * Returns one run within the trace identified by the share token. The request supplies only the run + * ID and that run's exact start_time coordinate. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ class RunRetrieveParams private constructor( diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunGetUrlParams.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunGetUrlParams.kt index 7e2b45da..b41182ce 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunGetUrlParams.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunGetUrlParams.kt @@ -13,6 +13,8 @@ import kotlin.jvm.optionals.getOrNull /** * Returns the URL to view a specific run in the LangSmith UI. The caller must supply the run's * project_id and trace_id as query parameters; start_time is optional. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ class RunGetUrlParams private constructor( diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunQueryV1Page.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunQueryV1Page.kt index 03786f93..ccc14062 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunQueryV1Page.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunQueryV1Page.kt @@ -11,6 +11,9 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** @see RunService.queryV1 */ +@Deprecated( + "Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027." +) class RunQueryV1Page private constructor( private val service: RunService, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunQueryV1PageAsync.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunQueryV1PageAsync.kt index 1e76165b..3085342f 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunQueryV1PageAsync.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunQueryV1PageAsync.kt @@ -13,6 +13,9 @@ import java.util.concurrent.Executor import kotlin.jvm.optionals.getOrNull /** @see RunServiceAsync.queryV1 */ +@Deprecated( + "Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027." +) class RunQueryV1PageAsync private constructor( private val service: RunServiceAsync, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunQueryV1Params.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunQueryV1Params.kt index d7333369..6fab6af4 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunQueryV1Params.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunQueryV1Params.kt @@ -24,6 +24,9 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** Query Runs */ +@Deprecated( + "Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027." +) class RunQueryV1Params private constructor( private val body: Body, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunQueryV2Params.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunQueryV2Params.kt index 76d22bf3..f072fb6d 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunQueryV2Params.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunQueryV2Params.kt @@ -23,9 +23,10 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * **Alpha:** The request and response contract may change; Returns a paginated list of runs for the - * given projects within min/max start_time. Supports filters, cursor pagination, and `selects` to - * select fields to return. + * Returns a paginated list of runs for the given projects within min/max start_time. Supports + * filters, cursor pagination, and `selects` to select fields to return. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ class RunQueryV2Params private constructor( diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunRetrieveV1Params.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunRetrieveV1Params.kt index 952127ab..d4ecc240 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunRetrieveV1Params.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunRetrieveV1Params.kt @@ -12,6 +12,9 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** Get a specific run. */ +@Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." +) class RunRetrieveV1Params private constructor( private val runId: String?, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunRetrieveV2Params.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunRetrieveV2Params.kt index dfd34c47..737c8469 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunRetrieveV2Params.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/RunRetrieveV2Params.kt @@ -18,8 +18,10 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * **Alpha:** The request and response contract may change; Returns one run by ID for the given - * session. Use the `selects` query parameter (repeatable) to select fields to return. + * Returns one run by ID for the given session. Use the `selects` query parameter (repeatable) to + * select fields to return. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ class RunRetrieveV2Params private constructor( diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/share/ShareCreateParams.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/share/ShareCreateParams.kt index f9f0ea4e..274b376a 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/share/ShareCreateParams.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/share/ShareCreateParams.kt @@ -19,7 +19,11 @@ import java.util.Objects import java.util.Optional import kotlin.jvm.optionals.getOrNull -/** Creates or returns a share token for a run. Child runs share their trace root. */ +/** + * Creates or returns a share token for a run. Child runs share their trace root. + * + * Self-hosted deployments require LangSmith `v0.16` or later. + */ class ShareCreateParams private constructor( private val runId: String?, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/share/ShareDeleteParams.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/share/ShareDeleteParams.kt index 96979f27..ebf81f55 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/share/ShareDeleteParams.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/runs/share/ShareDeleteParams.kt @@ -22,6 +22,8 @@ import kotlin.jvm.optionals.getOrNull /** * Deletes the share token for the trace identified by trace_id and session_id. Idempotent: returns * 204 whether or not a share token existed. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ class ShareDeleteParams private constructor( diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/threads/ThreadListTracesParams.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/threads/ThreadListTracesParams.kt index 4b281eeb..33e32272 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/threads/ThreadListTracesParams.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/threads/ThreadListTracesParams.kt @@ -16,8 +16,9 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * **Alpha:** The request and response contract may change; Retrieve all traces belonging to a - * specific thread within a project. + * Retrieve all traces belonging to a specific thread within a project. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ class ThreadListTracesParams private constructor( diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/threads/ThreadQueryParams.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/threads/ThreadQueryParams.kt index e1f3cc4d..19acc2d9 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/threads/ThreadQueryParams.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/threads/ThreadQueryParams.kt @@ -20,9 +20,10 @@ import java.util.Objects import java.util.Optional /** - * **Alpha:** The request and response contract may change; Query threads within a project - * (session), with cursor-based pagination. Returns threads matching the given time range and - * optional filter. + * Query threads within a project (session), with cursor-based pagination. Returns threads matching + * the given time range and optional filter. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ class ThreadQueryParams private constructor( diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/threads/ThreadStatsParams.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/threads/ThreadStatsParams.kt index b523c723..23c788f3 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/threads/ThreadStatsParams.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/threads/ThreadStatsParams.kt @@ -16,9 +16,10 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * **Alpha:** The request and response contract may change; Compute aggregate stats for a single - * thread (turn count, latency percentiles, token/cost sums, and detail breakdowns) within a - * project. + * Compute aggregate stats for a single thread (turn count, latency percentiles, token/cost sums, + * and detail breakdowns) within a project. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ class ThreadStatsParams private constructor( diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/traces/TraceListRunsParams.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/traces/TraceListRunsParams.kt index 5d961bb5..679045c1 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/traces/TraceListRunsParams.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/traces/TraceListRunsParams.kt @@ -18,8 +18,10 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * **Alpha:** The request and response contract may change; Returns runs for a trace ID within - * min/max start time. Optional `filter`; repeatable `selects` to select fields to return. + * Returns runs for a trace ID within min/max start time. Optional `filter`; repeatable `selects` to + * select fields to return. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ class TraceListRunsParams private constructor( diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/traces/TraceQueryParams.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/traces/TraceQueryParams.kt index f65349bb..5ab148da 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/traces/TraceQueryParams.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/models/traces/TraceQueryParams.kt @@ -34,6 +34,8 @@ import kotlin.jvm.optionals.getOrNull * * Supports filters (`trace_filter`, `tree_filter`), cursor pagination (`cursor`), and field * projection (`selects`). + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ class TraceQueryParams private constructor( diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/AnnotationQueueServiceAsync.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/AnnotationQueueServiceAsync.kt index 609f0cf3..9db3c186 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/AnnotationQueueServiceAsync.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/AnnotationQueueServiceAsync.kt @@ -174,12 +174,18 @@ interface AnnotationQueueServiceAsync { ): CompletableFuture /** Create Identity Annotation Queue Run Status */ + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) fun createRunStatus( annotationQueueRunId: String ): CompletableFuture = createRunStatus(annotationQueueRunId, AnnotationQueueCreateRunStatusParams.none()) /** @see createRunStatus */ + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) fun createRunStatus( annotationQueueRunId: String, params: AnnotationQueueCreateRunStatusParams = AnnotationQueueCreateRunStatusParams.none(), @@ -191,6 +197,9 @@ interface AnnotationQueueServiceAsync { ) /** @see createRunStatus */ + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) fun createRunStatus( annotationQueueRunId: String, params: AnnotationQueueCreateRunStatusParams = AnnotationQueueCreateRunStatusParams.none(), @@ -198,18 +207,27 @@ interface AnnotationQueueServiceAsync { createRunStatus(annotationQueueRunId, params, RequestOptions.none()) /** @see createRunStatus */ + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) fun createRunStatus( params: AnnotationQueueCreateRunStatusParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture /** @see createRunStatus */ + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) fun createRunStatus( params: AnnotationQueueCreateRunStatusParams ): CompletableFuture = createRunStatus(params, RequestOptions.none()) /** @see createRunStatus */ + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) fun createRunStatus( annotationQueueRunId: String, requestOptions: RequestOptions, @@ -335,6 +353,9 @@ interface AnnotationQueueServiceAsync { retrieveQueues(runId, AnnotationQueueRetrieveQueuesParams.none(), requestOptions) /** Get a run from an annotation queue */ + @Deprecated( + "Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027." + ) fun retrieveRun( index: Long, params: AnnotationQueueRetrieveRunParams, @@ -342,6 +363,9 @@ interface AnnotationQueueServiceAsync { retrieveRun(index, params, RequestOptions.none()) /** @see retrieveRun */ + @Deprecated( + "Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027." + ) fun retrieveRun( index: Long, params: AnnotationQueueRetrieveRunParams, @@ -350,22 +374,34 @@ interface AnnotationQueueServiceAsync { retrieveRun(params.toBuilder().index(index).build(), requestOptions) /** @see retrieveRun */ + @Deprecated( + "Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027." + ) fun retrieveRun( params: AnnotationQueueRetrieveRunParams ): CompletableFuture = retrieveRun(params, RequestOptions.none()) /** @see retrieveRun */ + @Deprecated( + "Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027." + ) fun retrieveRun( params: AnnotationQueueRetrieveRunParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture /** Get Size From Annotation Queue */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) fun retrieveSize(queueId: String): CompletableFuture = retrieveSize(queueId, AnnotationQueueRetrieveSizeParams.none()) /** @see retrieveSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) fun retrieveSize( queueId: String, params: AnnotationQueueRetrieveSizeParams = AnnotationQueueRetrieveSizeParams.none(), @@ -374,6 +410,9 @@ interface AnnotationQueueServiceAsync { retrieveSize(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see retrieveSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) fun retrieveSize( queueId: String, params: AnnotationQueueRetrieveSizeParams = AnnotationQueueRetrieveSizeParams.none(), @@ -381,17 +420,26 @@ interface AnnotationQueueServiceAsync { retrieveSize(queueId, params, RequestOptions.none()) /** @see retrieveSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) fun retrieveSize( params: AnnotationQueueRetrieveSizeParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture /** @see retrieveSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) fun retrieveSize( params: AnnotationQueueRetrieveSizeParams ): CompletableFuture = retrieveSize(params, RequestOptions.none()) /** @see retrieveSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) fun retrieveSize( queueId: String, requestOptions: RequestOptions, @@ -399,10 +447,16 @@ interface AnnotationQueueServiceAsync { retrieveSize(queueId, AnnotationQueueRetrieveSizeParams.none(), requestOptions) /** Get Total Archived From Annotation Queue */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalArchived(queueId: String): CompletableFuture = retrieveTotalArchived(queueId, AnnotationQueueRetrieveTotalArchivedParams.none()) /** @see retrieveTotalArchived */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalArchived( queueId: String, params: AnnotationQueueRetrieveTotalArchivedParams = @@ -412,6 +466,9 @@ interface AnnotationQueueServiceAsync { retrieveTotalArchived(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see retrieveTotalArchived */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalArchived( queueId: String, params: AnnotationQueueRetrieveTotalArchivedParams = @@ -420,18 +477,27 @@ interface AnnotationQueueServiceAsync { retrieveTotalArchived(queueId, params, RequestOptions.none()) /** @see retrieveTotalArchived */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalArchived( params: AnnotationQueueRetrieveTotalArchivedParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture /** @see retrieveTotalArchived */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalArchived( params: AnnotationQueueRetrieveTotalArchivedParams ): CompletableFuture = retrieveTotalArchived(params, RequestOptions.none()) /** @see retrieveTotalArchived */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalArchived( queueId: String, requestOptions: RequestOptions, @@ -443,10 +509,16 @@ interface AnnotationQueueServiceAsync { ) /** Get Total Size From Annotation Queue */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalSize(queueId: String): CompletableFuture = retrieveTotalSize(queueId, AnnotationQueueRetrieveTotalSizeParams.none()) /** @see retrieveTotalSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalSize( queueId: String, params: AnnotationQueueRetrieveTotalSizeParams = @@ -456,6 +528,9 @@ interface AnnotationQueueServiceAsync { retrieveTotalSize(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see retrieveTotalSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalSize( queueId: String, params: AnnotationQueueRetrieveTotalSizeParams = @@ -464,18 +539,27 @@ interface AnnotationQueueServiceAsync { retrieveTotalSize(queueId, params, RequestOptions.none()) /** @see retrieveTotalSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalSize( params: AnnotationQueueRetrieveTotalSizeParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture /** @see retrieveTotalSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalSize( params: AnnotationQueueRetrieveTotalSizeParams ): CompletableFuture = retrieveTotalSize(params, RequestOptions.none()) /** @see retrieveTotalSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalSize( queueId: String, requestOptions: RequestOptions, @@ -650,12 +734,18 @@ interface AnnotationQueueServiceAsync { * /api/v1/annotation-queues/status/{annotation_queue_run_id}`, but is otherwise the same as * [AnnotationQueueServiceAsync.createRunStatus]. */ + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) fun createRunStatus( annotationQueueRunId: String ): CompletableFuture> = createRunStatus(annotationQueueRunId, AnnotationQueueCreateRunStatusParams.none()) /** @see createRunStatus */ + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) fun createRunStatus( annotationQueueRunId: String, params: AnnotationQueueCreateRunStatusParams = @@ -668,6 +758,9 @@ interface AnnotationQueueServiceAsync { ) /** @see createRunStatus */ + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) fun createRunStatus( annotationQueueRunId: String, params: AnnotationQueueCreateRunStatusParams = @@ -676,18 +769,27 @@ interface AnnotationQueueServiceAsync { createRunStatus(annotationQueueRunId, params, RequestOptions.none()) /** @see createRunStatus */ + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) fun createRunStatus( params: AnnotationQueueCreateRunStatusParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> /** @see createRunStatus */ + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) fun createRunStatus( params: AnnotationQueueCreateRunStatusParams ): CompletableFuture> = createRunStatus(params, RequestOptions.none()) /** @see createRunStatus */ + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) fun createRunStatus( annotationQueueRunId: String, requestOptions: RequestOptions, @@ -835,6 +937,9 @@ interface AnnotationQueueServiceAsync { * Returns a raw HTTP response for `get /api/v1/annotation-queues/{queue_id}/run/{index}`, * but is otherwise the same as [AnnotationQueueServiceAsync.retrieveRun]. */ + @Deprecated( + "Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027." + ) fun retrieveRun( index: Long, params: AnnotationQueueRetrieveRunParams, @@ -842,6 +947,9 @@ interface AnnotationQueueServiceAsync { retrieveRun(index, params, RequestOptions.none()) /** @see retrieveRun */ + @Deprecated( + "Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027." + ) fun retrieveRun( index: Long, params: AnnotationQueueRetrieveRunParams, @@ -850,12 +958,18 @@ interface AnnotationQueueServiceAsync { retrieveRun(params.toBuilder().index(index).build(), requestOptions) /** @see retrieveRun */ + @Deprecated( + "Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027." + ) fun retrieveRun( params: AnnotationQueueRetrieveRunParams ): CompletableFuture> = retrieveRun(params, RequestOptions.none()) /** @see retrieveRun */ + @Deprecated( + "Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027." + ) fun retrieveRun( params: AnnotationQueueRetrieveRunParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -865,12 +979,18 @@ interface AnnotationQueueServiceAsync { * Returns a raw HTTP response for `get /api/v1/annotation-queues/{queue_id}/size`, but is * otherwise the same as [AnnotationQueueServiceAsync.retrieveSize]. */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) fun retrieveSize( queueId: String ): CompletableFuture> = retrieveSize(queueId, AnnotationQueueRetrieveSizeParams.none()) /** @see retrieveSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) fun retrieveSize( queueId: String, params: AnnotationQueueRetrieveSizeParams = AnnotationQueueRetrieveSizeParams.none(), @@ -879,6 +999,9 @@ interface AnnotationQueueServiceAsync { retrieveSize(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see retrieveSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) fun retrieveSize( queueId: String, params: AnnotationQueueRetrieveSizeParams = AnnotationQueueRetrieveSizeParams.none(), @@ -886,18 +1009,27 @@ interface AnnotationQueueServiceAsync { retrieveSize(queueId, params, RequestOptions.none()) /** @see retrieveSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) fun retrieveSize( params: AnnotationQueueRetrieveSizeParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> /** @see retrieveSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) fun retrieveSize( params: AnnotationQueueRetrieveSizeParams ): CompletableFuture> = retrieveSize(params, RequestOptions.none()) /** @see retrieveSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) fun retrieveSize( queueId: String, requestOptions: RequestOptions, @@ -909,12 +1041,18 @@ interface AnnotationQueueServiceAsync { * /api/v1/annotation-queues/{queue_id}/total_archived`, but is otherwise the same as * [AnnotationQueueServiceAsync.retrieveTotalArchived]. */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalArchived( queueId: String ): CompletableFuture> = retrieveTotalArchived(queueId, AnnotationQueueRetrieveTotalArchivedParams.none()) /** @see retrieveTotalArchived */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalArchived( queueId: String, params: AnnotationQueueRetrieveTotalArchivedParams = @@ -924,6 +1062,9 @@ interface AnnotationQueueServiceAsync { retrieveTotalArchived(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see retrieveTotalArchived */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalArchived( queueId: String, params: AnnotationQueueRetrieveTotalArchivedParams = @@ -932,18 +1073,27 @@ interface AnnotationQueueServiceAsync { retrieveTotalArchived(queueId, params, RequestOptions.none()) /** @see retrieveTotalArchived */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalArchived( params: AnnotationQueueRetrieveTotalArchivedParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> /** @see retrieveTotalArchived */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalArchived( params: AnnotationQueueRetrieveTotalArchivedParams ): CompletableFuture> = retrieveTotalArchived(params, RequestOptions.none()) /** @see retrieveTotalArchived */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalArchived( queueId: String, requestOptions: RequestOptions, @@ -958,12 +1108,18 @@ interface AnnotationQueueServiceAsync { * Returns a raw HTTP response for `get /api/v1/annotation-queues/{queue_id}/total_size`, * but is otherwise the same as [AnnotationQueueServiceAsync.retrieveTotalSize]. */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalSize( queueId: String ): CompletableFuture> = retrieveTotalSize(queueId, AnnotationQueueRetrieveTotalSizeParams.none()) /** @see retrieveTotalSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalSize( queueId: String, params: AnnotationQueueRetrieveTotalSizeParams = @@ -973,6 +1129,9 @@ interface AnnotationQueueServiceAsync { retrieveTotalSize(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see retrieveTotalSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalSize( queueId: String, params: AnnotationQueueRetrieveTotalSizeParams = @@ -981,18 +1140,27 @@ interface AnnotationQueueServiceAsync { retrieveTotalSize(queueId, params, RequestOptions.none()) /** @see retrieveTotalSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalSize( params: AnnotationQueueRetrieveTotalSizeParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> /** @see retrieveTotalSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalSize( params: AnnotationQueueRetrieveTotalSizeParams ): CompletableFuture> = retrieveTotalSize(params, RequestOptions.none()) /** @see retrieveTotalSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalSize( queueId: String, requestOptions: RequestOptions, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/AnnotationQueueServiceAsyncImpl.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/AnnotationQueueServiceAsyncImpl.kt index 48d12a63..7acaab15 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/AnnotationQueueServiceAsyncImpl.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/AnnotationQueueServiceAsyncImpl.kt @@ -98,6 +98,9 @@ internal constructor(private val clientOptions: ClientOptions) : AnnotationQueue // post /api/v1/annotation-queues withRawResponse().annotationQueues(params, requestOptions).thenApply { it.parse() } + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) override fun createRunStatus( params: AnnotationQueueCreateRunStatusParams, requestOptions: RequestOptions, @@ -133,6 +136,9 @@ internal constructor(private val clientOptions: ClientOptions) : AnnotationQueue // get /api/v1/annotation-queues/{run_id}/queues withRawResponse().retrieveQueues(params, requestOptions).thenApply { it.parse() } + @Deprecated( + "Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027." + ) override fun retrieveRun( params: AnnotationQueueRetrieveRunParams, requestOptions: RequestOptions, @@ -140,6 +146,9 @@ internal constructor(private val clientOptions: ClientOptions) : AnnotationQueue // get /api/v1/annotation-queues/{queue_id}/run/{index} withRawResponse().retrieveRun(params, requestOptions).thenApply { it.parse() } + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) override fun retrieveSize( params: AnnotationQueueRetrieveSizeParams, requestOptions: RequestOptions, @@ -147,6 +156,9 @@ internal constructor(private val clientOptions: ClientOptions) : AnnotationQueue // get /api/v1/annotation-queues/{queue_id}/size withRawResponse().retrieveSize(params, requestOptions).thenApply { it.parse() } + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) override fun retrieveTotalArchived( params: AnnotationQueueRetrieveTotalArchivedParams, requestOptions: RequestOptions, @@ -154,6 +166,9 @@ internal constructor(private val clientOptions: ClientOptions) : AnnotationQueue // get /api/v1/annotation-queues/{queue_id}/total_archived withRawResponse().retrieveTotalArchived(params, requestOptions).thenApply { it.parse() } + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) override fun retrieveTotalSize( params: AnnotationQueueRetrieveTotalSizeParams, requestOptions: RequestOptions, @@ -321,6 +336,9 @@ internal constructor(private val clientOptions: ClientOptions) : AnnotationQueue private val createRunStatusHandler: Handler = jsonHandler(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) override fun createRunStatus( params: AnnotationQueueCreateRunStatusParams, requestOptions: RequestOptions, @@ -512,6 +530,9 @@ internal constructor(private val clientOptions: ClientOptions) : AnnotationQueue private val retrieveRunHandler: Handler = jsonHandler(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027." + ) override fun retrieveRun( params: AnnotationQueueRetrieveRunParams, requestOptions: RequestOptions, @@ -552,6 +573,9 @@ internal constructor(private val clientOptions: ClientOptions) : AnnotationQueue private val retrieveSizeHandler: Handler = jsonHandler(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) override fun retrieveSize( params: AnnotationQueueRetrieveSizeParams, requestOptions: RequestOptions, @@ -585,6 +609,9 @@ internal constructor(private val clientOptions: ClientOptions) : AnnotationQueue private val retrieveTotalArchivedHandler: Handler = jsonHandler(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) override fun retrieveTotalArchived( params: AnnotationQueueRetrieveTotalArchivedParams, requestOptions: RequestOptions, @@ -624,6 +651,9 @@ internal constructor(private val clientOptions: ClientOptions) : AnnotationQueue private val retrieveTotalSizeHandler: Handler = jsonHandler(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) override fun retrieveTotalSize( params: AnnotationQueueRetrieveTotalSizeParams, requestOptions: RequestOptions, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/RunServiceAsync.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/RunServiceAsync.kt index 57c4750f..aac18fc0 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/RunServiceAsync.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/RunServiceAsync.kt @@ -107,6 +107,8 @@ interface RunServiceAsync { /** * Returns the URL to view a specific run in the LangSmith UI. The caller must supply the run's * project_id and trace_id as query parameters; start_time is optional. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ fun getUrl(runId: String, params: RunGetUrlParams): CompletableFuture = getUrl(runId, params, RequestOptions.none()) @@ -189,27 +191,40 @@ interface RunServiceAsync { ) /** Query Runs */ + @Deprecated( + "Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) fun queryV1(): CompletableFuture = queryV1(RunQueryV1Params.none()) /** @see queryV1 */ + @Deprecated( + "Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) fun queryV1( params: RunQueryV1Params = RunQueryV1Params.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture /** @see queryV1 */ + @Deprecated( + "Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) fun queryV1( params: RunQueryV1Params = RunQueryV1Params.none() ): CompletableFuture = queryV1(params, RequestOptions.none()) /** @see queryV1 */ + @Deprecated( + "Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) fun queryV1(requestOptions: RequestOptions): CompletableFuture = queryV1(RunQueryV1Params.none(), requestOptions) /** - * **Alpha:** The request and response contract may change; Returns a paginated list of runs for - * the given projects within min/max start_time. Supports filters, cursor pagination, and - * `selects` to select fields to return. + * Returns a paginated list of runs for the given projects within min/max start_time. Supports + * filters, cursor pagination, and `selects` to select fields to return. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ fun queryV2(): CompletableFuture = queryV2(RunQueryV2Params.none()) @@ -229,10 +244,16 @@ interface RunServiceAsync { queryV2(RunQueryV2Params.none(), requestOptions) /** Get a specific run. */ + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) fun retrieveV1(runId: String): CompletableFuture = retrieveV1(runId, RunRetrieveV1Params.none()) /** @see retrieveV1 */ + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) fun retrieveV1( runId: String, params: RunRetrieveV1Params = RunRetrieveV1Params.none(), @@ -241,28 +262,42 @@ interface RunServiceAsync { retrieveV1(params.toBuilder().runId(runId).build(), requestOptions) /** @see retrieveV1 */ + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) fun retrieveV1( runId: String, params: RunRetrieveV1Params = RunRetrieveV1Params.none(), ): CompletableFuture = retrieveV1(runId, params, RequestOptions.none()) /** @see retrieveV1 */ + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) fun retrieveV1( params: RunRetrieveV1Params, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture /** @see retrieveV1 */ + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) fun retrieveV1(params: RunRetrieveV1Params): CompletableFuture = retrieveV1(params, RequestOptions.none()) /** @see retrieveV1 */ + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) fun retrieveV1(runId: String, requestOptions: RequestOptions): CompletableFuture = retrieveV1(runId, RunRetrieveV1Params.none(), requestOptions) /** - * **Alpha:** The request and response contract may change; Returns one run by ID for the given - * session. Use the `selects` query parameter (repeatable) to select fields to return. + * Returns one run by ID for the given session. Use the `selects` query parameter (repeatable) + * to select fields to return. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ fun retrieveV2(runId: String, params: RunRetrieveV2Params): CompletableFuture = retrieveV2(runId, params, RequestOptions.none()) @@ -542,22 +577,34 @@ interface RunServiceAsync { * Returns a raw HTTP response for `post /api/v1/runs/query`, but is otherwise the same as * [RunServiceAsync.queryV1]. */ + @Deprecated( + "Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) fun queryV1(): CompletableFuture> = queryV1(RunQueryV1Params.none()) /** @see queryV1 */ + @Deprecated( + "Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) fun queryV1( params: RunQueryV1Params = RunQueryV1Params.none(), requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> /** @see queryV1 */ + @Deprecated( + "Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) fun queryV1( params: RunQueryV1Params = RunQueryV1Params.none() ): CompletableFuture> = queryV1(params, RequestOptions.none()) /** @see queryV1 */ + @Deprecated( + "Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) fun queryV1( requestOptions: RequestOptions ): CompletableFuture> = @@ -592,10 +639,16 @@ interface RunServiceAsync { * Returns a raw HTTP response for `get /api/v1/runs/{run_id}`, but is otherwise the same as * [RunServiceAsync.retrieveV1]. */ + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) fun retrieveV1(runId: String): CompletableFuture> = retrieveV1(runId, RunRetrieveV1Params.none()) /** @see retrieveV1 */ + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) fun retrieveV1( runId: String, params: RunRetrieveV1Params = RunRetrieveV1Params.none(), @@ -604,6 +657,9 @@ interface RunServiceAsync { retrieveV1(params.toBuilder().runId(runId).build(), requestOptions) /** @see retrieveV1 */ + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) fun retrieveV1( runId: String, params: RunRetrieveV1Params = RunRetrieveV1Params.none(), @@ -611,16 +667,25 @@ interface RunServiceAsync { retrieveV1(runId, params, RequestOptions.none()) /** @see retrieveV1 */ + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) fun retrieveV1( params: RunRetrieveV1Params, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> /** @see retrieveV1 */ + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) fun retrieveV1(params: RunRetrieveV1Params): CompletableFuture> = retrieveV1(params, RequestOptions.none()) /** @see retrieveV1 */ + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) fun retrieveV1( runId: String, requestOptions: RequestOptions, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/RunServiceAsyncImpl.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/RunServiceAsyncImpl.kt index 93e972ce..6b195b98 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/RunServiceAsyncImpl.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/RunServiceAsyncImpl.kt @@ -233,6 +233,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client ): CompletableFuture = withRawResponse().multipartIngest(create, update, requestOptions).thenApply { it.parse() } + @Deprecated( + "Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) override fun queryV1( params: RunQueryV1Params, requestOptions: RequestOptions, @@ -247,6 +250,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client // post /api/v2/runs/query withRawResponse().queryV2(params, requestOptions).thenApply { it.parse() } + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) override fun retrieveV1( params: RunRetrieveV1Params, requestOptions: RequestOptions, @@ -561,6 +567,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client private val queryV1Handler: Handler = jsonHandler(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) override fun queryV1( params: RunQueryV1Params, requestOptions: RequestOptions, @@ -639,6 +648,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client private val retrieveV1Handler: Handler = jsonHandler(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) override fun retrieveV1( params: RunRetrieveV1Params, requestOptions: RequestOptions, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/ThreadServiceAsync.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/ThreadServiceAsync.kt index 923e79ca..94165e79 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/ThreadServiceAsync.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/ThreadServiceAsync.kt @@ -29,8 +29,9 @@ interface ThreadServiceAsync { fun withOptions(modifier: Consumer): ThreadServiceAsync /** - * **Alpha:** The request and response contract may change; Retrieve all traces belonging to a - * specific thread within a project. + * Retrieve all traces belonging to a specific thread within a project. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ fun listTraces( threadId: String, @@ -57,9 +58,10 @@ interface ThreadServiceAsync { ): CompletableFuture /** - * **Alpha:** The request and response contract may change; Query threads within a project - * (session), with cursor-based pagination. Returns threads matching the given time range and - * optional filter. + * Query threads within a project (session), with cursor-based pagination. Returns threads + * matching the given time range and optional filter. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ fun query(): CompletableFuture = query(ThreadQueryParams.none()) @@ -79,9 +81,10 @@ interface ThreadServiceAsync { query(ThreadQueryParams.none(), requestOptions) /** - * **Alpha:** The request and response contract may change; Compute aggregate stats for a single - * thread (turn count, latency percentiles, token/cost sums, and detail breakdowns) within a - * project. + * Compute aggregate stats for a single thread (turn count, latency percentiles, token/cost + * sums, and detail breakdowns) within a project. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ fun stats(threadId: String, params: ThreadStatsParams): CompletableFuture = stats(threadId, params, RequestOptions.none()) diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/TraceServiceAsync.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/TraceServiceAsync.kt index 946da3fb..36f88821 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/TraceServiceAsync.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/TraceServiceAsync.kt @@ -27,8 +27,10 @@ interface TraceServiceAsync { fun withOptions(modifier: Consumer): TraceServiceAsync /** - * **Alpha:** The request and response contract may change; Returns runs for a trace ID within - * min/max start time. Optional `filter`; repeatable `selects` to select fields to return. + * Returns runs for a trace ID within min/max start time. Optional `filter`; repeatable + * `selects` to select fields to return. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ fun listRuns( traceId: String, @@ -65,6 +67,8 @@ interface TraceServiceAsync { * * Supports filters (`trace_filter`, `tree_filter`), cursor pagination (`cursor`), and field * projection (`selects`). + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ fun query(): CompletableFuture = query(TraceQueryParams.none()) diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/annotationqueues/RunServiceAsync.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/annotationqueues/RunServiceAsync.kt index 4440700f..ba4d625f 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/annotationqueues/RunServiceAsync.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/annotationqueues/RunServiceAsync.kt @@ -35,12 +35,18 @@ interface RunServiceAsync { fun withOptions(modifier: Consumer): RunServiceAsync /** Add Runs To Annotation Queue */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) fun create( queueId: String, params: RunCreateParams, ): CompletableFuture> = create(queueId, params, RequestOptions.none()) /** @see create */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) fun create( queueId: String, params: RunCreateParams, @@ -49,20 +55,32 @@ interface RunServiceAsync { create(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see create */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) fun create(params: RunCreateParams): CompletableFuture> = create(params, RequestOptions.none()) /** @see create */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) fun create( params: RunCreateParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> /** Update Run In Annotation Queue */ + @Deprecated( + "Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027." + ) fun update(queueRunId: String, params: RunUpdateParams): CompletableFuture = update(queueRunId, params, RequestOptions.none()) /** @see update */ + @Deprecated( + "Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027." + ) fun update( queueRunId: String, params: RunUpdateParams, @@ -71,20 +89,32 @@ interface RunServiceAsync { update(params.toBuilder().queueRunId(queueRunId).build(), requestOptions) /** @see update */ + @Deprecated( + "Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027." + ) fun update(params: RunUpdateParams): CompletableFuture = update(params, RequestOptions.none()) /** @see update */ + @Deprecated( + "Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027." + ) fun update( params: RunUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture /** Get Runs From Annotation Queue */ + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) fun list(queueId: String): CompletableFuture> = list(queueId, RunListParams.none()) /** @see list */ + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) fun list( queueId: String, params: RunListParams = RunListParams.none(), @@ -93,6 +123,9 @@ interface RunServiceAsync { list(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see list */ + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) fun list( queueId: String, params: RunListParams = RunListParams.none(), @@ -100,23 +133,35 @@ interface RunServiceAsync { list(queueId, params, RequestOptions.none()) /** @see list */ + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) fun list( params: RunListParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> /** @see list */ + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) fun list(params: RunListParams): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) fun list( queueId: String, requestOptions: RequestOptions, ): CompletableFuture> = list(queueId, RunListParams.none(), requestOptions) - /** Add Runs To Annotation Queue By Key */ + /** Self-hosted deployments require LangSmith `v0.16` or later. */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) fun createByKey( queueId: String, params: RunCreateByKeyParams, @@ -124,6 +169,9 @@ interface RunServiceAsync { createByKey(queueId, params, RequestOptions.none()) /** @see createByKey */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) fun createByKey( queueId: String, params: RunCreateByKeyParams, @@ -132,20 +180,32 @@ interface RunServiceAsync { createByKey(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see createByKey */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) fun createByKey(params: RunCreateByKeyParams): CompletableFuture> = createByKey(params, RequestOptions.none()) /** @see createByKey */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) fun createByKey( params: RunCreateByKeyParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> /** Delete Runs From Annotation Queue */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) fun deleteAll(queueId: String): CompletableFuture = deleteAll(queueId, RunDeleteAllParams.none()) /** @see deleteAll */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) fun deleteAll( queueId: String, params: RunDeleteAllParams = RunDeleteAllParams.none(), @@ -154,22 +214,34 @@ interface RunServiceAsync { deleteAll(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see deleteAll */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) fun deleteAll( queueId: String, params: RunDeleteAllParams = RunDeleteAllParams.none(), ): CompletableFuture = deleteAll(queueId, params, RequestOptions.none()) /** @see deleteAll */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) fun deleteAll( params: RunDeleteAllParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture /** @see deleteAll */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) fun deleteAll(params: RunDeleteAllParams): CompletableFuture = deleteAll(params, RequestOptions.none()) /** @see deleteAll */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) fun deleteAll( queueId: String, requestOptions: RequestOptions, @@ -177,6 +249,9 @@ interface RunServiceAsync { deleteAll(queueId, RunDeleteAllParams.none(), requestOptions) /** Delete Run From Annotation Queue */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027." + ) fun deleteQueue( queueRunId: String, params: RunDeleteQueueParams, @@ -184,6 +259,9 @@ interface RunServiceAsync { deleteQueue(queueRunId, params, RequestOptions.none()) /** @see deleteQueue */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027." + ) fun deleteQueue( queueRunId: String, params: RunDeleteQueueParams, @@ -192,10 +270,16 @@ interface RunServiceAsync { deleteQueue(params.toBuilder().queueRunId(queueRunId).build(), requestOptions) /** @see deleteQueue */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027." + ) fun deleteQueue(params: RunDeleteQueueParams): CompletableFuture = deleteQueue(params, RequestOptions.none()) /** @see deleteQueue */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027." + ) fun deleteQueue( params: RunDeleteQueueParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -215,6 +299,9 @@ interface RunServiceAsync { * Returns a raw HTTP response for `post /api/v1/annotation-queues/{queue_id}/runs`, but is * otherwise the same as [RunServiceAsync.create]. */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) fun create( queueId: String, params: RunCreateParams, @@ -222,6 +309,9 @@ interface RunServiceAsync { create(queueId, params, RequestOptions.none()) /** @see create */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) fun create( queueId: String, params: RunCreateParams, @@ -230,12 +320,18 @@ interface RunServiceAsync { create(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see create */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) fun create( params: RunCreateParams ): CompletableFuture>> = create(params, RequestOptions.none()) /** @see create */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) fun create( params: RunCreateParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -246,6 +342,9 @@ interface RunServiceAsync { * /api/v1/annotation-queues/{queue_id}/runs/{queue_run_id}`, but is otherwise the same as * [RunServiceAsync.update]. */ + @Deprecated( + "Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027." + ) fun update( queueRunId: String, params: RunUpdateParams, @@ -253,6 +352,9 @@ interface RunServiceAsync { update(queueRunId, params, RequestOptions.none()) /** @see update */ + @Deprecated( + "Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027." + ) fun update( queueRunId: String, params: RunUpdateParams, @@ -261,10 +363,16 @@ interface RunServiceAsync { update(params.toBuilder().queueRunId(queueRunId).build(), requestOptions) /** @see update */ + @Deprecated( + "Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027." + ) fun update(params: RunUpdateParams): CompletableFuture> = update(params, RequestOptions.none()) /** @see update */ + @Deprecated( + "Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027." + ) fun update( params: RunUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -274,12 +382,18 @@ interface RunServiceAsync { * Returns a raw HTTP response for `get /api/v1/annotation-queues/{queue_id}/runs`, but is * otherwise the same as [RunServiceAsync.list]. */ + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) fun list( queueId: String ): CompletableFuture>> = list(queueId, RunListParams.none()) /** @see list */ + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) fun list( queueId: String, params: RunListParams = RunListParams.none(), @@ -288,6 +402,9 @@ interface RunServiceAsync { list(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see list */ + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) fun list( queueId: String, params: RunListParams = RunListParams.none(), @@ -295,18 +412,27 @@ interface RunServiceAsync { list(queueId, params, RequestOptions.none()) /** @see list */ + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) fun list( params: RunListParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture>> /** @see list */ + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) fun list( params: RunListParams ): CompletableFuture>> = list(params, RequestOptions.none()) /** @see list */ + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) fun list( queueId: String, requestOptions: RequestOptions, @@ -317,6 +443,9 @@ interface RunServiceAsync { * Returns a raw HTTP response for `post /api/v1/annotation-queues/{queue_id}/runs/by-key`, * but is otherwise the same as [RunServiceAsync.createByKey]. */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) fun createByKey( queueId: String, params: RunCreateByKeyParams, @@ -324,6 +453,9 @@ interface RunServiceAsync { createByKey(queueId, params, RequestOptions.none()) /** @see createByKey */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) fun createByKey( queueId: String, params: RunCreateByKeyParams, @@ -332,12 +464,18 @@ interface RunServiceAsync { createByKey(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see createByKey */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) fun createByKey( params: RunCreateByKeyParams ): CompletableFuture>> = createByKey(params, RequestOptions.none()) /** @see createByKey */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) fun createByKey( params: RunCreateByKeyParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -347,10 +485,16 @@ interface RunServiceAsync { * Returns a raw HTTP response for `post /api/v1/annotation-queues/{queue_id}/runs/delete`, * but is otherwise the same as [RunServiceAsync.deleteAll]. */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) fun deleteAll(queueId: String): CompletableFuture> = deleteAll(queueId, RunDeleteAllParams.none()) /** @see deleteAll */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) fun deleteAll( queueId: String, params: RunDeleteAllParams = RunDeleteAllParams.none(), @@ -359,6 +503,9 @@ interface RunServiceAsync { deleteAll(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see deleteAll */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) fun deleteAll( queueId: String, params: RunDeleteAllParams = RunDeleteAllParams.none(), @@ -366,18 +513,27 @@ interface RunServiceAsync { deleteAll(queueId, params, RequestOptions.none()) /** @see deleteAll */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) fun deleteAll( params: RunDeleteAllParams, requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture> /** @see deleteAll */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) fun deleteAll( params: RunDeleteAllParams ): CompletableFuture> = deleteAll(params, RequestOptions.none()) /** @see deleteAll */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) fun deleteAll( queueId: String, requestOptions: RequestOptions, @@ -389,6 +545,9 @@ interface RunServiceAsync { * /api/v1/annotation-queues/{queue_id}/runs/{queue_run_id}`, but is otherwise the same as * [RunServiceAsync.deleteQueue]. */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027." + ) fun deleteQueue( queueRunId: String, params: RunDeleteQueueParams, @@ -396,6 +555,9 @@ interface RunServiceAsync { deleteQueue(queueRunId, params, RequestOptions.none()) /** @see deleteQueue */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027." + ) fun deleteQueue( queueRunId: String, params: RunDeleteQueueParams, @@ -404,12 +566,18 @@ interface RunServiceAsync { deleteQueue(params.toBuilder().queueRunId(queueRunId).build(), requestOptions) /** @see deleteQueue */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027." + ) fun deleteQueue( params: RunDeleteQueueParams ): CompletableFuture> = deleteQueue(params, RequestOptions.none()) /** @see deleteQueue */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027." + ) fun deleteQueue( params: RunDeleteQueueParams, requestOptions: RequestOptions = RequestOptions.none(), diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/annotationqueues/RunServiceAsyncImpl.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/annotationqueues/RunServiceAsyncImpl.kt index 0a8ef2d5..ba5d84d0 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/annotationqueues/RunServiceAsyncImpl.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/annotationqueues/RunServiceAsyncImpl.kt @@ -44,6 +44,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client override fun withOptions(modifier: Consumer): RunServiceAsync = RunServiceAsyncImpl(clientOptions.toBuilder().apply(modifier::accept).build()) + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) override fun create( params: RunCreateParams, requestOptions: RequestOptions, @@ -51,6 +54,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client // post /api/v1/annotation-queues/{queue_id}/runs withRawResponse().create(params, requestOptions).thenApply { it.parse() } + @Deprecated( + "Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027." + ) override fun update( params: RunUpdateParams, requestOptions: RequestOptions, @@ -58,6 +64,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client // patch /api/v1/annotation-queues/{queue_id}/runs/{queue_run_id} withRawResponse().update(params, requestOptions).thenApply { it.parse() } + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) override fun list( params: RunListParams, requestOptions: RequestOptions, @@ -65,6 +74,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client // get /api/v1/annotation-queues/{queue_id}/runs withRawResponse().list(params, requestOptions).thenApply { it.parse() } + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) override fun createByKey( params: RunCreateByKeyParams, requestOptions: RequestOptions, @@ -72,6 +84,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client // post /api/v1/annotation-queues/{queue_id}/runs/by-key withRawResponse().createByKey(params, requestOptions).thenApply { it.parse() } + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) override fun deleteAll( params: RunDeleteAllParams, requestOptions: RequestOptions, @@ -79,6 +94,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client // post /api/v1/annotation-queues/{queue_id}/runs/delete withRawResponse().deleteAll(params, requestOptions).thenApply { it.parse() } + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027." + ) override fun deleteQueue( params: RunDeleteQueueParams, requestOptions: RequestOptions, @@ -102,6 +120,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client private val createHandler: Handler> = jsonHandler>(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) override fun create( params: RunCreateParams, requestOptions: RequestOptions, @@ -136,6 +157,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client private val updateHandler: Handler = jsonHandler(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027." + ) override fun update( params: RunUpdateParams, requestOptions: RequestOptions, @@ -177,6 +201,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client private val listHandler: Handler> = jsonHandler>(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) override fun list( params: RunListParams, requestOptions: RequestOptions, @@ -210,6 +237,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client private val createByKeyHandler: Handler> = jsonHandler>(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) override fun createByKey( params: RunCreateByKeyParams, requestOptions: RequestOptions, @@ -251,6 +281,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client private val deleteAllHandler: Handler = jsonHandler(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) override fun deleteAll( params: RunDeleteAllParams, requestOptions: RequestOptions, @@ -292,6 +325,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client private val deleteQueueHandler: Handler = jsonHandler(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027." + ) override fun deleteQueue( params: RunDeleteQueueParams, requestOptions: RequestOptions, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/datasets/ExperimentRunServiceAsync.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/datasets/ExperimentRunServiceAsync.kt index cc8096a7..31b355ca 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/datasets/ExperimentRunServiceAsync.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/datasets/ExperimentRunServiceAsync.kt @@ -27,6 +27,8 @@ interface ExperimentRunServiceAsync { /** * Returns a paginated page of dataset examples with runs from the requested experiments. * Response uses the canonical `{items, next_cursor}` envelope. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ fun query(datasetId: String): CompletableFuture = query(datasetId, ExperimentRunQueryParams.none()) diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/datasets/RunServiceAsync.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/datasets/RunServiceAsync.kt index 9292ea0b..87e960c1 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/datasets/RunServiceAsync.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/datasets/RunServiceAsync.kt @@ -29,6 +29,9 @@ interface RunServiceAsync { * Fetch examples for a dataset, and fetch the runs for each example if they are associated with * the given session_ids. */ + @Deprecated( + "Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) fun query( datasetId: String, params: RunQueryParams, @@ -36,6 +39,9 @@ interface RunServiceAsync { query(datasetId, params, RequestOptions.none()) /** @see query */ + @Deprecated( + "Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) fun query( datasetId: String, params: RunQueryParams, @@ -44,10 +50,16 @@ interface RunServiceAsync { query(params.toBuilder().datasetId(datasetId).build(), requestOptions) /** @see query */ + @Deprecated( + "Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) fun query(params: RunQueryParams): CompletableFuture>> = query(params, RequestOptions.none()) /** @see query */ + @Deprecated( + "Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) fun query( params: RunQueryParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -67,6 +79,9 @@ interface RunServiceAsync { * Returns a raw HTTP response for `post /api/v1/datasets/{dataset_id}/runs`, but is * otherwise the same as [RunServiceAsync.query]. */ + @Deprecated( + "Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) fun query( datasetId: String, params: RunQueryParams, @@ -74,6 +89,9 @@ interface RunServiceAsync { query(datasetId, params, RequestOptions.none()) /** @see query */ + @Deprecated( + "Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) fun query( datasetId: String, params: RunQueryParams, @@ -82,12 +100,18 @@ interface RunServiceAsync { query(params.toBuilder().datasetId(datasetId).build(), requestOptions) /** @see query */ + @Deprecated( + "Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) fun query( params: RunQueryParams ): CompletableFuture>>> = query(params, RequestOptions.none()) /** @see query */ + @Deprecated( + "Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) fun query( params: RunQueryParams, requestOptions: RequestOptions = RequestOptions.none(), diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/datasets/RunServiceAsyncImpl.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/datasets/RunServiceAsyncImpl.kt index a19f80a8..5a706d2b 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/datasets/RunServiceAsyncImpl.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/datasets/RunServiceAsyncImpl.kt @@ -35,6 +35,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client override fun withOptions(modifier: Consumer): RunServiceAsync = RunServiceAsyncImpl(clientOptions.toBuilder().apply(modifier::accept).build()) + @Deprecated( + "Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) override fun query( params: RunQueryParams, requestOptions: RequestOptions, @@ -58,6 +61,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client private val queryHandler: Handler>> = jsonHandler>>(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) override fun query( params: RunQueryParams, requestOptions: RequestOptions, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/public_/RunServiceAsync.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/public_/RunServiceAsync.kt index c8639762..c97b3f05 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/public_/RunServiceAsync.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/public_/RunServiceAsync.kt @@ -27,9 +27,10 @@ interface RunServiceAsync { fun withOptions(modifier: Consumer): RunServiceAsync /** - * **Alpha:** The request and response contract may change; Returns one run within the trace - * identified by the share token. The request supplies only the run ID and that run's exact - * start_time coordinate. + * Returns one run within the trace identified by the share token. The request supplies only the + * run ID and that run's exact start_time coordinate. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ fun retrieve(runId: String, params: RunRetrieveParams): CompletableFuture = retrieve(runId, params, RequestOptions.none()) @@ -52,8 +53,10 @@ interface RunServiceAsync { ): CompletableFuture /** - * **Alpha:** The request and response contract may change; Returns all runs within the trace - * identified by the share token. The share token supplies the tenant, project, and trace scope. + * Returns all runs within the trace identified by the share token. The share token supplies the + * tenant, project, and trace scope. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ fun query(shareToken: String): CompletableFuture = query(shareToken, RunQueryParams.none()) @@ -127,7 +130,7 @@ interface RunServiceAsync { ): CompletableFuture> /** - * Returns a raw HTTP response for `post /api/v2/public/{share_token}/runs/v2/query`, but is + * Returns a raw HTTP response for `post /api/v2/public/{share_token}/runs/query`, but is * otherwise the same as [RunServiceAsync.query]. */ fun query(shareToken: String): CompletableFuture> = diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/public_/RunServiceAsyncImpl.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/public_/RunServiceAsyncImpl.kt index 621d695f..9a14c0a2 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/public_/RunServiceAsyncImpl.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/public_/RunServiceAsyncImpl.kt @@ -47,7 +47,7 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client params: RunQueryParams, requestOptions: RequestOptions, ): CompletableFuture = - // post /api/v2/public/{share_token}/runs/v2/query + // post /api/v2/public/{share_token}/runs/query withRawResponse().query(params, requestOptions).thenApply { it.parse() } class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : @@ -116,15 +116,7 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client HttpRequest.builder() .method(HttpMethod.POST) .baseUrl(clientOptions.baseUrl()) - .addPathSegments( - "api", - "v2", - "public", - params._pathParam(0), - "runs", - "v2", - "query", - ) + .addPathSegments("api", "v2", "public", params._pathParam(0), "runs", "query") .body(json(clientOptions.jsonMapper, params._body())) .build() .prepareAsync(clientOptions, params) diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/runs/ShareServiceAsync.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/runs/ShareServiceAsync.kt index f8ef60c1..970c76f1 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/runs/ShareServiceAsync.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/async/runs/ShareServiceAsync.kt @@ -26,7 +26,11 @@ interface ShareServiceAsync { */ fun withOptions(modifier: Consumer): ShareServiceAsync - /** Creates or returns a share token for a run. Child runs share their trace root. */ + /** + * Creates or returns a share token for a run. Child runs share their trace root. + * + * Self-hosted deployments require LangSmith `v0.16` or later. + */ fun create(runId: String): CompletableFuture = create(runId, ShareCreateParams.none()) @@ -64,6 +68,8 @@ interface ShareServiceAsync { /** * Deletes the share token for the trace identified by trace_id and session_id. Idempotent: * returns 204 whether or not a share token existed. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ fun delete(traceId: String): CompletableFuture = delete(traceId, ShareDeleteParams.none()) diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/AnnotationQueueService.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/AnnotationQueueService.kt index 40946b0f..77ca991f 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/AnnotationQueueService.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/AnnotationQueueService.kt @@ -158,10 +158,16 @@ interface AnnotationQueueService { ): AnnotationQueueSchema /** Create Identity Annotation Queue Run Status */ + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) fun createRunStatus(annotationQueueRunId: String): AnnotationQueueCreateRunStatusResponse = createRunStatus(annotationQueueRunId, AnnotationQueueCreateRunStatusParams.none()) /** @see createRunStatus */ + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) fun createRunStatus( annotationQueueRunId: String, params: AnnotationQueueCreateRunStatusParams = AnnotationQueueCreateRunStatusParams.none(), @@ -173,6 +179,9 @@ interface AnnotationQueueService { ) /** @see createRunStatus */ + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) fun createRunStatus( annotationQueueRunId: String, params: AnnotationQueueCreateRunStatusParams = AnnotationQueueCreateRunStatusParams.none(), @@ -180,17 +189,26 @@ interface AnnotationQueueService { createRunStatus(annotationQueueRunId, params, RequestOptions.none()) /** @see createRunStatus */ + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) fun createRunStatus( params: AnnotationQueueCreateRunStatusParams, requestOptions: RequestOptions = RequestOptions.none(), ): AnnotationQueueCreateRunStatusResponse /** @see createRunStatus */ + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) fun createRunStatus( params: AnnotationQueueCreateRunStatusParams ): AnnotationQueueCreateRunStatusResponse = createRunStatus(params, RequestOptions.none()) /** @see createRunStatus */ + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) fun createRunStatus( annotationQueueRunId: String, requestOptions: RequestOptions, @@ -303,12 +321,18 @@ interface AnnotationQueueService { retrieveQueues(runId, AnnotationQueueRetrieveQueuesParams.none(), requestOptions) /** Get a run from an annotation queue */ + @Deprecated( + "Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027." + ) fun retrieveRun( index: Long, params: AnnotationQueueRetrieveRunParams, ): RunSchemaWithAnnotationQueueInfo = retrieveRun(index, params, RequestOptions.none()) /** @see retrieveRun */ + @Deprecated( + "Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027." + ) fun retrieveRun( index: Long, params: AnnotationQueueRetrieveRunParams, @@ -317,20 +341,32 @@ interface AnnotationQueueService { retrieveRun(params.toBuilder().index(index).build(), requestOptions) /** @see retrieveRun */ + @Deprecated( + "Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027." + ) fun retrieveRun(params: AnnotationQueueRetrieveRunParams): RunSchemaWithAnnotationQueueInfo = retrieveRun(params, RequestOptions.none()) /** @see retrieveRun */ + @Deprecated( + "Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027." + ) fun retrieveRun( params: AnnotationQueueRetrieveRunParams, requestOptions: RequestOptions = RequestOptions.none(), ): RunSchemaWithAnnotationQueueInfo /** Get Size From Annotation Queue */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) fun retrieveSize(queueId: String): AnnotationQueueSizeSchema = retrieveSize(queueId, AnnotationQueueRetrieveSizeParams.none()) /** @see retrieveSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) fun retrieveSize( queueId: String, params: AnnotationQueueRetrieveSizeParams = AnnotationQueueRetrieveSizeParams.none(), @@ -339,30 +375,48 @@ interface AnnotationQueueService { retrieveSize(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see retrieveSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) fun retrieveSize( queueId: String, params: AnnotationQueueRetrieveSizeParams = AnnotationQueueRetrieveSizeParams.none(), ): AnnotationQueueSizeSchema = retrieveSize(queueId, params, RequestOptions.none()) /** @see retrieveSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) fun retrieveSize( params: AnnotationQueueRetrieveSizeParams, requestOptions: RequestOptions = RequestOptions.none(), ): AnnotationQueueSizeSchema /** @see retrieveSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) fun retrieveSize(params: AnnotationQueueRetrieveSizeParams): AnnotationQueueSizeSchema = retrieveSize(params, RequestOptions.none()) /** @see retrieveSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) fun retrieveSize(queueId: String, requestOptions: RequestOptions): AnnotationQueueSizeSchema = retrieveSize(queueId, AnnotationQueueRetrieveSizeParams.none(), requestOptions) /** Get Total Archived From Annotation Queue */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalArchived(queueId: String): AnnotationQueueSizeSchema = retrieveTotalArchived(queueId, AnnotationQueueRetrieveTotalArchivedParams.none()) /** @see retrieveTotalArchived */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalArchived( queueId: String, params: AnnotationQueueRetrieveTotalArchivedParams = @@ -372,6 +426,9 @@ interface AnnotationQueueService { retrieveTotalArchived(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see retrieveTotalArchived */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalArchived( queueId: String, params: AnnotationQueueRetrieveTotalArchivedParams = @@ -379,17 +436,26 @@ interface AnnotationQueueService { ): AnnotationQueueSizeSchema = retrieveTotalArchived(queueId, params, RequestOptions.none()) /** @see retrieveTotalArchived */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalArchived( params: AnnotationQueueRetrieveTotalArchivedParams, requestOptions: RequestOptions = RequestOptions.none(), ): AnnotationQueueSizeSchema /** @see retrieveTotalArchived */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalArchived( params: AnnotationQueueRetrieveTotalArchivedParams ): AnnotationQueueSizeSchema = retrieveTotalArchived(params, RequestOptions.none()) /** @see retrieveTotalArchived */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalArchived( queueId: String, requestOptions: RequestOptions, @@ -401,10 +467,16 @@ interface AnnotationQueueService { ) /** Get Total Size From Annotation Queue */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalSize(queueId: String): AnnotationQueueSizeSchema = retrieveTotalSize(queueId, AnnotationQueueRetrieveTotalSizeParams.none()) /** @see retrieveTotalSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalSize( queueId: String, params: AnnotationQueueRetrieveTotalSizeParams = @@ -414,6 +486,9 @@ interface AnnotationQueueService { retrieveTotalSize(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see retrieveTotalSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalSize( queueId: String, params: AnnotationQueueRetrieveTotalSizeParams = @@ -421,17 +496,26 @@ interface AnnotationQueueService { ): AnnotationQueueSizeSchema = retrieveTotalSize(queueId, params, RequestOptions.none()) /** @see retrieveTotalSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalSize( params: AnnotationQueueRetrieveTotalSizeParams, requestOptions: RequestOptions = RequestOptions.none(), ): AnnotationQueueSizeSchema /** @see retrieveTotalSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalSize( params: AnnotationQueueRetrieveTotalSizeParams ): AnnotationQueueSizeSchema = retrieveTotalSize(params, RequestOptions.none()) /** @see retrieveTotalSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) fun retrieveTotalSize( queueId: String, requestOptions: RequestOptions, @@ -617,6 +701,9 @@ interface AnnotationQueueService { * /api/v1/annotation-queues/status/{annotation_queue_run_id}`, but is otherwise the same as * [AnnotationQueueService.createRunStatus]. */ + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun createRunStatus( annotationQueueRunId: String @@ -624,6 +711,9 @@ interface AnnotationQueueService { createRunStatus(annotationQueueRunId, AnnotationQueueCreateRunStatusParams.none()) /** @see createRunStatus */ + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun createRunStatus( annotationQueueRunId: String, @@ -637,6 +727,9 @@ interface AnnotationQueueService { ) /** @see createRunStatus */ + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun createRunStatus( annotationQueueRunId: String, @@ -646,6 +739,9 @@ interface AnnotationQueueService { createRunStatus(annotationQueueRunId, params, RequestOptions.none()) /** @see createRunStatus */ + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun createRunStatus( params: AnnotationQueueCreateRunStatusParams, @@ -653,6 +749,9 @@ interface AnnotationQueueService { ): HttpResponseFor /** @see createRunStatus */ + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun createRunStatus( params: AnnotationQueueCreateRunStatusParams @@ -660,6 +759,9 @@ interface AnnotationQueueService { createRunStatus(params, RequestOptions.none()) /** @see createRunStatus */ + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun createRunStatus( annotationQueueRunId: String, @@ -821,6 +923,9 @@ interface AnnotationQueueService { * Returns a raw HTTP response for `get /api/v1/annotation-queues/{queue_id}/run/{index}`, * but is otherwise the same as [AnnotationQueueService.retrieveRun]. */ + @Deprecated( + "Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveRun( index: Long, @@ -829,6 +934,9 @@ interface AnnotationQueueService { retrieveRun(index, params, RequestOptions.none()) /** @see retrieveRun */ + @Deprecated( + "Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveRun( index: Long, @@ -838,6 +946,9 @@ interface AnnotationQueueService { retrieveRun(params.toBuilder().index(index).build(), requestOptions) /** @see retrieveRun */ + @Deprecated( + "Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveRun( params: AnnotationQueueRetrieveRunParams @@ -845,6 +956,9 @@ interface AnnotationQueueService { retrieveRun(params, RequestOptions.none()) /** @see retrieveRun */ + @Deprecated( + "Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveRun( params: AnnotationQueueRetrieveRunParams, @@ -855,11 +969,17 @@ interface AnnotationQueueService { * Returns a raw HTTP response for `get /api/v1/annotation-queues/{queue_id}/size`, but is * otherwise the same as [AnnotationQueueService.retrieveSize]. */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveSize(queueId: String): HttpResponseFor = retrieveSize(queueId, AnnotationQueueRetrieveSizeParams.none()) /** @see retrieveSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveSize( queueId: String, @@ -869,6 +989,9 @@ interface AnnotationQueueService { retrieveSize(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see retrieveSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveSize( queueId: String, @@ -877,6 +1000,9 @@ interface AnnotationQueueService { retrieveSize(queueId, params, RequestOptions.none()) /** @see retrieveSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveSize( params: AnnotationQueueRetrieveSizeParams, @@ -884,12 +1010,18 @@ interface AnnotationQueueService { ): HttpResponseFor /** @see retrieveSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveSize( params: AnnotationQueueRetrieveSizeParams ): HttpResponseFor = retrieveSize(params, RequestOptions.none()) /** @see retrieveSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveSize( queueId: String, @@ -902,11 +1034,17 @@ interface AnnotationQueueService { * /api/v1/annotation-queues/{queue_id}/total_archived`, but is otherwise the same as * [AnnotationQueueService.retrieveTotalArchived]. */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveTotalArchived(queueId: String): HttpResponseFor = retrieveTotalArchived(queueId, AnnotationQueueRetrieveTotalArchivedParams.none()) /** @see retrieveTotalArchived */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveTotalArchived( queueId: String, @@ -917,6 +1055,9 @@ interface AnnotationQueueService { retrieveTotalArchived(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see retrieveTotalArchived */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveTotalArchived( queueId: String, @@ -926,6 +1067,9 @@ interface AnnotationQueueService { retrieveTotalArchived(queueId, params, RequestOptions.none()) /** @see retrieveTotalArchived */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveTotalArchived( params: AnnotationQueueRetrieveTotalArchivedParams, @@ -933,6 +1077,9 @@ interface AnnotationQueueService { ): HttpResponseFor /** @see retrieveTotalArchived */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveTotalArchived( params: AnnotationQueueRetrieveTotalArchivedParams @@ -940,6 +1087,9 @@ interface AnnotationQueueService { retrieveTotalArchived(params, RequestOptions.none()) /** @see retrieveTotalArchived */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveTotalArchived( queueId: String, @@ -955,11 +1105,17 @@ interface AnnotationQueueService { * Returns a raw HTTP response for `get /api/v1/annotation-queues/{queue_id}/total_size`, * but is otherwise the same as [AnnotationQueueService.retrieveTotalSize]. */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveTotalSize(queueId: String): HttpResponseFor = retrieveTotalSize(queueId, AnnotationQueueRetrieveTotalSizeParams.none()) /** @see retrieveTotalSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveTotalSize( queueId: String, @@ -970,6 +1126,9 @@ interface AnnotationQueueService { retrieveTotalSize(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see retrieveTotalSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveTotalSize( queueId: String, @@ -979,6 +1138,9 @@ interface AnnotationQueueService { retrieveTotalSize(queueId, params, RequestOptions.none()) /** @see retrieveTotalSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveTotalSize( params: AnnotationQueueRetrieveTotalSizeParams, @@ -986,6 +1148,9 @@ interface AnnotationQueueService { ): HttpResponseFor /** @see retrieveTotalSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveTotalSize( params: AnnotationQueueRetrieveTotalSizeParams @@ -993,6 +1158,9 @@ interface AnnotationQueueService { retrieveTotalSize(params, RequestOptions.none()) /** @see retrieveTotalSize */ + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveTotalSize( queueId: String, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/AnnotationQueueServiceImpl.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/AnnotationQueueServiceImpl.kt index 7383807d..2ce207c7 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/AnnotationQueueServiceImpl.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/AnnotationQueueServiceImpl.kt @@ -95,6 +95,9 @@ class AnnotationQueueServiceImpl internal constructor(private val clientOptions: // post /api/v1/annotation-queues withRawResponse().annotationQueues(params, requestOptions).parse() + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) override fun createRunStatus( params: AnnotationQueueCreateRunStatusParams, requestOptions: RequestOptions, @@ -130,6 +133,9 @@ class AnnotationQueueServiceImpl internal constructor(private val clientOptions: // get /api/v1/annotation-queues/{run_id}/queues withRawResponse().retrieveQueues(params, requestOptions).parse() + @Deprecated( + "Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027." + ) override fun retrieveRun( params: AnnotationQueueRetrieveRunParams, requestOptions: RequestOptions, @@ -137,6 +143,9 @@ class AnnotationQueueServiceImpl internal constructor(private val clientOptions: // get /api/v1/annotation-queues/{queue_id}/run/{index} withRawResponse().retrieveRun(params, requestOptions).parse() + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) override fun retrieveSize( params: AnnotationQueueRetrieveSizeParams, requestOptions: RequestOptions, @@ -144,6 +153,9 @@ class AnnotationQueueServiceImpl internal constructor(private val clientOptions: // get /api/v1/annotation-queues/{queue_id}/size withRawResponse().retrieveSize(params, requestOptions).parse() + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) override fun retrieveTotalArchived( params: AnnotationQueueRetrieveTotalArchivedParams, requestOptions: RequestOptions, @@ -151,6 +163,9 @@ class AnnotationQueueServiceImpl internal constructor(private val clientOptions: // get /api/v1/annotation-queues/{queue_id}/total_archived withRawResponse().retrieveTotalArchived(params, requestOptions).parse() + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) override fun retrieveTotalSize( params: AnnotationQueueRetrieveTotalSizeParams, requestOptions: RequestOptions, @@ -306,6 +321,9 @@ class AnnotationQueueServiceImpl internal constructor(private val clientOptions: private val createRunStatusHandler: Handler = jsonHandler(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027." + ) override fun createRunStatus( params: AnnotationQueueCreateRunStatusParams, requestOptions: RequestOptions, @@ -481,6 +499,9 @@ class AnnotationQueueServiceImpl internal constructor(private val clientOptions: private val retrieveRunHandler: Handler = jsonHandler(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027." + ) override fun retrieveRun( params: AnnotationQueueRetrieveRunParams, requestOptions: RequestOptions, @@ -518,6 +539,9 @@ class AnnotationQueueServiceImpl internal constructor(private val clientOptions: private val retrieveSizeHandler: Handler = jsonHandler(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027." + ) override fun retrieveSize( params: AnnotationQueueRetrieveSizeParams, requestOptions: RequestOptions, @@ -548,6 +572,9 @@ class AnnotationQueueServiceImpl internal constructor(private val clientOptions: private val retrieveTotalArchivedHandler: Handler = jsonHandler(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027." + ) override fun retrieveTotalArchived( params: AnnotationQueueRetrieveTotalArchivedParams, requestOptions: RequestOptions, @@ -584,6 +611,9 @@ class AnnotationQueueServiceImpl internal constructor(private val clientOptions: private val retrieveTotalSizeHandler: Handler = jsonHandler(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027." + ) override fun retrieveTotalSize( params: AnnotationQueueRetrieveTotalSizeParams, requestOptions: RequestOptions, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/RunService.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/RunService.kt index fedf6d1a..d13f3df3 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/RunService.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/RunService.kt @@ -101,6 +101,8 @@ interface RunService { /** * Returns the URL to view a specific run in the LangSmith UI. The caller must supply the run's * project_id and trace_id as query parameters; start_time is optional. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ fun getUrl(runId: String, params: RunGetUrlParams): RunGetUrlResponse = getUrl(runId, params, RequestOptions.none()) @@ -180,26 +182,39 @@ interface RunService { ) /** Query Runs */ + @Deprecated( + "Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) fun queryV1(): RunQueryV1Page = queryV1(RunQueryV1Params.none()) /** @see queryV1 */ + @Deprecated( + "Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) fun queryV1( params: RunQueryV1Params = RunQueryV1Params.none(), requestOptions: RequestOptions = RequestOptions.none(), ): RunQueryV1Page /** @see queryV1 */ + @Deprecated( + "Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) fun queryV1(params: RunQueryV1Params = RunQueryV1Params.none()): RunQueryV1Page = queryV1(params, RequestOptions.none()) /** @see queryV1 */ + @Deprecated( + "Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) fun queryV1(requestOptions: RequestOptions): RunQueryV1Page = queryV1(RunQueryV1Params.none(), requestOptions) /** - * **Alpha:** The request and response contract may change; Returns a paginated list of runs for - * the given projects within min/max start_time. Supports filters, cursor pagination, and - * `selects` to select fields to return. + * Returns a paginated list of runs for the given projects within min/max start_time. Supports + * filters, cursor pagination, and `selects` to select fields to return. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ fun queryV2(): RunQueryV2Page = queryV2(RunQueryV2Params.none()) @@ -218,9 +233,15 @@ interface RunService { queryV2(RunQueryV2Params.none(), requestOptions) /** Get a specific run. */ + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) fun retrieveV1(runId: String): RunSchema = retrieveV1(runId, RunRetrieveV1Params.none()) /** @see retrieveV1 */ + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) fun retrieveV1( runId: String, params: RunRetrieveV1Params = RunRetrieveV1Params.none(), @@ -228,28 +249,42 @@ interface RunService { ): RunSchema = retrieveV1(params.toBuilder().runId(runId).build(), requestOptions) /** @see retrieveV1 */ + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) fun retrieveV1( runId: String, params: RunRetrieveV1Params = RunRetrieveV1Params.none(), ): RunSchema = retrieveV1(runId, params, RequestOptions.none()) /** @see retrieveV1 */ + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) fun retrieveV1( params: RunRetrieveV1Params, requestOptions: RequestOptions = RequestOptions.none(), ): RunSchema /** @see retrieveV1 */ + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) fun retrieveV1(params: RunRetrieveV1Params): RunSchema = retrieveV1(params, RequestOptions.none()) /** @see retrieveV1 */ + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) fun retrieveV1(runId: String, requestOptions: RequestOptions): RunSchema = retrieveV1(runId, RunRetrieveV1Params.none(), requestOptions) /** - * **Alpha:** The request and response contract may change; Returns one run by ID for the given - * session. Use the `selects` query parameter (repeatable) to select fields to return. + * Returns one run by ID for the given session. Use the `selects` query parameter (repeatable) + * to select fields to return. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ fun retrieveV2(runId: String, params: RunRetrieveV2Params): Run = retrieveV2(runId, params, RequestOptions.none()) @@ -533,10 +568,16 @@ interface RunService { * Returns a raw HTTP response for `post /api/v1/runs/query`, but is otherwise the same as * [RunService.queryV1]. */ + @Deprecated( + "Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun queryV1(): HttpResponseFor = queryV1(RunQueryV1Params.none()) /** @see queryV1 */ + @Deprecated( + "Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun queryV1( params: RunQueryV1Params = RunQueryV1Params.none(), @@ -544,12 +585,18 @@ interface RunService { ): HttpResponseFor /** @see queryV1 */ + @Deprecated( + "Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun queryV1( params: RunQueryV1Params = RunQueryV1Params.none() ): HttpResponseFor = queryV1(params, RequestOptions.none()) /** @see queryV1 */ + @Deprecated( + "Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun queryV1(requestOptions: RequestOptions): HttpResponseFor = queryV1(RunQueryV1Params.none(), requestOptions) @@ -583,11 +630,17 @@ interface RunService { * Returns a raw HTTP response for `get /api/v1/runs/{run_id}`, but is otherwise the same as * [RunService.retrieveV1]. */ + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveV1(runId: String): HttpResponseFor = retrieveV1(runId, RunRetrieveV1Params.none()) /** @see retrieveV1 */ + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveV1( runId: String, @@ -597,6 +650,9 @@ interface RunService { retrieveV1(params.toBuilder().runId(runId).build(), requestOptions) /** @see retrieveV1 */ + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveV1( runId: String, @@ -604,6 +660,9 @@ interface RunService { ): HttpResponseFor = retrieveV1(runId, params, RequestOptions.none()) /** @see retrieveV1 */ + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveV1( params: RunRetrieveV1Params, @@ -611,11 +670,17 @@ interface RunService { ): HttpResponseFor /** @see retrieveV1 */ + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveV1(params: RunRetrieveV1Params): HttpResponseFor = retrieveV1(params, RequestOptions.none()) /** @see retrieveV1 */ + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun retrieveV1(runId: String, requestOptions: RequestOptions): HttpResponseFor = retrieveV1(runId, RunRetrieveV1Params.none(), requestOptions) diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/RunServiceImpl.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/RunServiceImpl.kt index 0b4a4345..a89101fa 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/RunServiceImpl.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/RunServiceImpl.kt @@ -210,6 +210,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio requestOptions: RequestOptions, ): Void? = withRawResponse().multipartIngest(create, update, requestOptions).parse() + @Deprecated( + "Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) override fun queryV1(params: RunQueryV1Params, requestOptions: RequestOptions): RunQueryV1Page = // post /api/v1/runs/query withRawResponse().queryV1(params, requestOptions).parse() @@ -218,6 +221,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio // post /api/v2/runs/query withRawResponse().queryV2(params, requestOptions).parse() + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) override fun retrieveV1( params: RunRetrieveV1Params, requestOptions: RequestOptions, @@ -461,6 +467,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio private val queryV1Handler: Handler = jsonHandler(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) override fun queryV1( params: RunQueryV1Params, requestOptions: RequestOptions, @@ -531,6 +540,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio private val retrieveV1Handler: Handler = jsonHandler(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027." + ) override fun retrieveV1( params: RunRetrieveV1Params, requestOptions: RequestOptions, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/ThreadService.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/ThreadService.kt index 1e4837dc..478a6df3 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/ThreadService.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/ThreadService.kt @@ -29,8 +29,9 @@ interface ThreadService { fun withOptions(modifier: Consumer): ThreadService /** - * **Alpha:** The request and response contract may change; Retrieve all traces belonging to a - * specific thread within a project. + * Retrieve all traces belonging to a specific thread within a project. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ fun listTraces(threadId: String, params: ThreadListTracesParams): ThreadListTracesPage = listTraces(threadId, params, RequestOptions.none()) @@ -54,9 +55,10 @@ interface ThreadService { ): ThreadListTracesPage /** - * **Alpha:** The request and response contract may change; Query threads within a project - * (session), with cursor-based pagination. Returns threads matching the given time range and - * optional filter. + * Query threads within a project (session), with cursor-based pagination. Returns threads + * matching the given time range and optional filter. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ fun query(): ThreadQueryPage = query(ThreadQueryParams.none()) @@ -75,9 +77,10 @@ interface ThreadService { query(ThreadQueryParams.none(), requestOptions) /** - * **Alpha:** The request and response contract may change; Compute aggregate stats for a single - * thread (turn count, latency percentiles, token/cost sums, and detail breakdowns) within a - * project. + * Compute aggregate stats for a single thread (turn count, latency percentiles, token/cost + * sums, and detail breakdowns) within a project. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ fun stats(threadId: String, params: ThreadStatsParams): ThreadStats = stats(threadId, params, RequestOptions.none()) diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/TraceService.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/TraceService.kt index a6142924..e4dc14af 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/TraceService.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/TraceService.kt @@ -27,8 +27,10 @@ interface TraceService { fun withOptions(modifier: Consumer): TraceService /** - * **Alpha:** The request and response contract may change; Returns runs for a trace ID within - * min/max start time. Optional `filter`; repeatable `selects` to select fields to return. + * Returns runs for a trace ID within min/max start time. Optional `filter`; repeatable + * `selects` to select fields to return. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ fun listRuns(traceId: String, params: TraceListRunsParams): TraceListRunsResponse = listRuns(traceId, params, RequestOptions.none()) @@ -62,6 +64,8 @@ interface TraceService { * * Supports filters (`trace_filter`, `tree_filter`), cursor pagination (`cursor`), and field * projection (`selects`). + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ fun query(): TraceQueryPage = query(TraceQueryParams.none()) diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/annotationqueues/RunService.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/annotationqueues/RunService.kt index 316d8ca0..66c20b88 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/annotationqueues/RunService.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/annotationqueues/RunService.kt @@ -35,10 +35,16 @@ interface RunService { fun withOptions(modifier: Consumer): RunService /** Add Runs To Annotation Queue */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) fun create(queueId: String, params: RunCreateParams): List = create(queueId, params, RequestOptions.none()) /** @see create */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) fun create( queueId: String, params: RunCreateParams, @@ -46,20 +52,32 @@ interface RunService { ): List = create(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see create */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) fun create(params: RunCreateParams): List = create(params, RequestOptions.none()) /** @see create */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) fun create( params: RunCreateParams, requestOptions: RequestOptions = RequestOptions.none(), ): List /** Update Run In Annotation Queue */ + @Deprecated( + "Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027." + ) fun update(queueRunId: String, params: RunUpdateParams): RunUpdateResponse = update(queueRunId, params, RequestOptions.none()) /** @see update */ + @Deprecated( + "Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027." + ) fun update( queueRunId: String, params: RunUpdateParams, @@ -67,19 +85,31 @@ interface RunService { ): RunUpdateResponse = update(params.toBuilder().queueRunId(queueRunId).build(), requestOptions) /** @see update */ + @Deprecated( + "Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027." + ) fun update(params: RunUpdateParams): RunUpdateResponse = update(params, RequestOptions.none()) /** @see update */ + @Deprecated( + "Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027." + ) fun update( params: RunUpdateParams, requestOptions: RequestOptions = RequestOptions.none(), ): RunUpdateResponse /** Get Runs From Annotation Queue */ + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) fun list(queueId: String): List = list(queueId, RunListParams.none()) /** @see list */ + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) fun list( queueId: String, params: RunListParams = RunListParams.none(), @@ -88,32 +118,50 @@ interface RunService { list(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see list */ + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) fun list( queueId: String, params: RunListParams = RunListParams.none(), ): List = list(queueId, params, RequestOptions.none()) /** @see list */ + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) fun list( params: RunListParams, requestOptions: RequestOptions = RequestOptions.none(), ): List /** @see list */ + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) fun list(params: RunListParams): List = list(params, RequestOptions.none()) /** @see list */ + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) fun list( queueId: String, requestOptions: RequestOptions, ): List = list(queueId, RunListParams.none(), requestOptions) - /** Add Runs To Annotation Queue By Key */ + /** Self-hosted deployments require LangSmith `v0.16` or later. */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) fun createByKey(queueId: String, params: RunCreateByKeyParams): List = createByKey(queueId, params, RequestOptions.none()) /** @see createByKey */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) fun createByKey( queueId: String, params: RunCreateByKeyParams, @@ -122,20 +170,32 @@ interface RunService { createByKey(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see createByKey */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) fun createByKey(params: RunCreateByKeyParams): List = createByKey(params, RequestOptions.none()) /** @see createByKey */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) fun createByKey( params: RunCreateByKeyParams, requestOptions: RequestOptions = RequestOptions.none(), ): List /** Delete Runs From Annotation Queue */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) fun deleteAll(queueId: String): RunDeleteAllResponse = deleteAll(queueId, RunDeleteAllParams.none()) /** @see deleteAll */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) fun deleteAll( queueId: String, params: RunDeleteAllParams = RunDeleteAllParams.none(), @@ -143,30 +203,48 @@ interface RunService { ): RunDeleteAllResponse = deleteAll(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see deleteAll */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) fun deleteAll( queueId: String, params: RunDeleteAllParams = RunDeleteAllParams.none(), ): RunDeleteAllResponse = deleteAll(queueId, params, RequestOptions.none()) /** @see deleteAll */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) fun deleteAll( params: RunDeleteAllParams, requestOptions: RequestOptions = RequestOptions.none(), ): RunDeleteAllResponse /** @see deleteAll */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) fun deleteAll(params: RunDeleteAllParams): RunDeleteAllResponse = deleteAll(params, RequestOptions.none()) /** @see deleteAll */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) fun deleteAll(queueId: String, requestOptions: RequestOptions): RunDeleteAllResponse = deleteAll(queueId, RunDeleteAllParams.none(), requestOptions) /** Delete Run From Annotation Queue */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027." + ) fun deleteQueue(queueRunId: String, params: RunDeleteQueueParams): RunDeleteQueueResponse = deleteQueue(queueRunId, params, RequestOptions.none()) /** @see deleteQueue */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027." + ) fun deleteQueue( queueRunId: String, params: RunDeleteQueueParams, @@ -175,10 +253,16 @@ interface RunService { deleteQueue(params.toBuilder().queueRunId(queueRunId).build(), requestOptions) /** @see deleteQueue */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027." + ) fun deleteQueue(params: RunDeleteQueueParams): RunDeleteQueueResponse = deleteQueue(params, RequestOptions.none()) /** @see deleteQueue */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027." + ) fun deleteQueue( params: RunDeleteQueueParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -198,6 +282,9 @@ interface RunService { * Returns a raw HTTP response for `post /api/v1/annotation-queues/{queue_id}/runs`, but is * otherwise the same as [RunService.create]. */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun create( queueId: String, @@ -205,6 +292,9 @@ interface RunService { ): HttpResponseFor> = create(queueId, params, RequestOptions.none()) /** @see create */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun create( queueId: String, @@ -214,11 +304,17 @@ interface RunService { create(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see create */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun create(params: RunCreateParams): HttpResponseFor> = create(params, RequestOptions.none()) /** @see create */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun create( params: RunCreateParams, @@ -230,6 +326,9 @@ interface RunService { * /api/v1/annotation-queues/{queue_id}/runs/{queue_run_id}`, but is otherwise the same as * [RunService.update]. */ + @Deprecated( + "Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun update( queueRunId: String, @@ -237,6 +336,9 @@ interface RunService { ): HttpResponseFor = update(queueRunId, params, RequestOptions.none()) /** @see update */ + @Deprecated( + "Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun update( queueRunId: String, @@ -246,11 +348,17 @@ interface RunService { update(params.toBuilder().queueRunId(queueRunId).build(), requestOptions) /** @see update */ + @Deprecated( + "Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun update(params: RunUpdateParams): HttpResponseFor = update(params, RequestOptions.none()) /** @see update */ + @Deprecated( + "Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun update( params: RunUpdateParams, @@ -261,11 +369,17 @@ interface RunService { * Returns a raw HTTP response for `get /api/v1/annotation-queues/{queue_id}/runs`, but is * otherwise the same as [RunService.list]. */ + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun list(queueId: String): HttpResponseFor> = list(queueId, RunListParams.none()) /** @see list */ + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun list( queueId: String, @@ -275,6 +389,9 @@ interface RunService { list(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see list */ + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun list( queueId: String, @@ -283,6 +400,9 @@ interface RunService { list(queueId, params, RequestOptions.none()) /** @see list */ + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun list( params: RunListParams, @@ -290,11 +410,17 @@ interface RunService { ): HttpResponseFor> /** @see list */ + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun list(params: RunListParams): HttpResponseFor> = list(params, RequestOptions.none()) /** @see list */ + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun list( queueId: String, @@ -306,6 +432,9 @@ interface RunService { * Returns a raw HTTP response for `post /api/v1/annotation-queues/{queue_id}/runs/by-key`, * but is otherwise the same as [RunService.createByKey]. */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun createByKey( queueId: String, @@ -314,6 +443,9 @@ interface RunService { createByKey(queueId, params, RequestOptions.none()) /** @see createByKey */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun createByKey( queueId: String, @@ -323,6 +455,9 @@ interface RunService { createByKey(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see createByKey */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun createByKey( params: RunCreateByKeyParams @@ -330,6 +465,9 @@ interface RunService { createByKey(params, RequestOptions.none()) /** @see createByKey */ + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun createByKey( params: RunCreateByKeyParams, @@ -340,11 +478,17 @@ interface RunService { * Returns a raw HTTP response for `post /api/v1/annotation-queues/{queue_id}/runs/delete`, * but is otherwise the same as [RunService.deleteAll]. */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun deleteAll(queueId: String): HttpResponseFor = deleteAll(queueId, RunDeleteAllParams.none()) /** @see deleteAll */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun deleteAll( queueId: String, @@ -354,6 +498,9 @@ interface RunService { deleteAll(params.toBuilder().queueId(queueId).build(), requestOptions) /** @see deleteAll */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun deleteAll( queueId: String, @@ -361,6 +508,9 @@ interface RunService { ): HttpResponseFor = deleteAll(queueId, params, RequestOptions.none()) /** @see deleteAll */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun deleteAll( params: RunDeleteAllParams, @@ -368,11 +518,17 @@ interface RunService { ): HttpResponseFor /** @see deleteAll */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun deleteAll(params: RunDeleteAllParams): HttpResponseFor = deleteAll(params, RequestOptions.none()) /** @see deleteAll */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun deleteAll( queueId: String, @@ -385,6 +541,9 @@ interface RunService { * /api/v1/annotation-queues/{queue_id}/runs/{queue_run_id}`, but is otherwise the same as * [RunService.deleteQueue]. */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun deleteQueue( queueRunId: String, @@ -393,6 +552,9 @@ interface RunService { deleteQueue(queueRunId, params, RequestOptions.none()) /** @see deleteQueue */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun deleteQueue( queueRunId: String, @@ -402,11 +564,17 @@ interface RunService { deleteQueue(params.toBuilder().queueRunId(queueRunId).build(), requestOptions) /** @see deleteQueue */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun deleteQueue(params: RunDeleteQueueParams): HttpResponseFor = deleteQueue(params, RequestOptions.none()) /** @see deleteQueue */ + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun deleteQueue( params: RunDeleteQueueParams, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/annotationqueues/RunServiceImpl.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/annotationqueues/RunServiceImpl.kt index 6e9c87e8..409a71fc 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/annotationqueues/RunServiceImpl.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/annotationqueues/RunServiceImpl.kt @@ -42,6 +42,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio override fun withOptions(modifier: Consumer): RunService = RunServiceImpl(clientOptions.toBuilder().apply(modifier::accept).build()) + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) override fun create( params: RunCreateParams, requestOptions: RequestOptions, @@ -49,6 +52,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio // post /api/v1/annotation-queues/{queue_id}/runs withRawResponse().create(params, requestOptions).parse() + @Deprecated( + "Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027." + ) override fun update( params: RunUpdateParams, requestOptions: RequestOptions, @@ -56,6 +62,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio // patch /api/v1/annotation-queues/{queue_id}/runs/{queue_run_id} withRawResponse().update(params, requestOptions).parse() + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) override fun list( params: RunListParams, requestOptions: RequestOptions, @@ -63,6 +72,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio // get /api/v1/annotation-queues/{queue_id}/runs withRawResponse().list(params, requestOptions).parse() + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) override fun createByKey( params: RunCreateByKeyParams, requestOptions: RequestOptions, @@ -70,6 +82,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio // post /api/v1/annotation-queues/{queue_id}/runs/by-key withRawResponse().createByKey(params, requestOptions).parse() + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) override fun deleteAll( params: RunDeleteAllParams, requestOptions: RequestOptions, @@ -77,6 +92,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio // post /api/v1/annotation-queues/{queue_id}/runs/delete withRawResponse().deleteAll(params, requestOptions).parse() + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027." + ) override fun deleteQueue( params: RunDeleteQueueParams, requestOptions: RequestOptions, @@ -100,6 +118,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio private val createHandler: Handler> = jsonHandler>(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) override fun create( params: RunCreateParams, requestOptions: RequestOptions, @@ -131,6 +152,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio private val updateHandler: Handler = jsonHandler(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027." + ) override fun update( params: RunUpdateParams, requestOptions: RequestOptions, @@ -169,6 +193,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio private val listHandler: Handler> = jsonHandler>(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027." + ) override fun list( params: RunListParams, requestOptions: RequestOptions, @@ -199,6 +226,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio private val createByKeyHandler: Handler> = jsonHandler>(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027." + ) override fun createByKey( params: RunCreateByKeyParams, requestOptions: RequestOptions, @@ -237,6 +267,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio private val deleteAllHandler: Handler = jsonHandler(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027." + ) override fun deleteAll( params: RunDeleteAllParams, requestOptions: RequestOptions, @@ -275,6 +308,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio private val deleteQueueHandler: Handler = jsonHandler(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027." + ) override fun deleteQueue( params: RunDeleteQueueParams, requestOptions: RequestOptions, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/datasets/ExperimentRunService.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/datasets/ExperimentRunService.kt index b9060f67..c05c287e 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/datasets/ExperimentRunService.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/datasets/ExperimentRunService.kt @@ -27,6 +27,8 @@ interface ExperimentRunService { /** * Returns a paginated page of dataset examples with runs from the requested experiments. * Response uses the canonical `{items, next_cursor}` envelope. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ fun query(datasetId: String): ExperimentRunQueryPage = query(datasetId, ExperimentRunQueryParams.none()) diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/datasets/RunService.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/datasets/RunService.kt index a178ff1a..480e3a7a 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/datasets/RunService.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/datasets/RunService.kt @@ -29,10 +29,16 @@ interface RunService { * Fetch examples for a dataset, and fetch the runs for each example if they are associated with * the given session_ids. */ + @Deprecated( + "Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) fun query(datasetId: String, params: RunQueryParams): Optional> = query(datasetId, params, RequestOptions.none()) /** @see query */ + @Deprecated( + "Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) fun query( datasetId: String, params: RunQueryParams, @@ -41,10 +47,16 @@ interface RunService { query(params.toBuilder().datasetId(datasetId).build(), requestOptions) /** @see query */ + @Deprecated( + "Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) fun query(params: RunQueryParams): Optional> = query(params, RequestOptions.none()) /** @see query */ + @Deprecated( + "Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) fun query( params: RunQueryParams, requestOptions: RequestOptions = RequestOptions.none(), @@ -64,6 +76,9 @@ interface RunService { * Returns a raw HTTP response for `post /api/v1/datasets/{dataset_id}/runs`, but is * otherwise the same as [RunService.query]. */ + @Deprecated( + "Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun query( datasetId: String, @@ -72,6 +87,9 @@ interface RunService { query(datasetId, params, RequestOptions.none()) /** @see query */ + @Deprecated( + "Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun query( datasetId: String, @@ -81,11 +99,17 @@ interface RunService { query(params.toBuilder().datasetId(datasetId).build(), requestOptions) /** @see query */ + @Deprecated( + "Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun query(params: RunQueryParams): HttpResponseFor>> = query(params, RequestOptions.none()) /** @see query */ + @Deprecated( + "Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) @MustBeClosed fun query( params: RunQueryParams, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/datasets/RunServiceImpl.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/datasets/RunServiceImpl.kt index 3184387a..d53fe940 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/datasets/RunServiceImpl.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/datasets/RunServiceImpl.kt @@ -33,6 +33,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio override fun withOptions(modifier: Consumer): RunService = RunServiceImpl(clientOptions.toBuilder().apply(modifier::accept).build()) + @Deprecated( + "Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) override fun query( params: RunQueryParams, requestOptions: RequestOptions, @@ -56,6 +59,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio private val queryHandler: Handler>> = jsonHandler>>(clientOptions.jsonMapper) + @Deprecated( + "Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027." + ) override fun query( params: RunQueryParams, requestOptions: RequestOptions, diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/public_/RunService.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/public_/RunService.kt index 003579c5..f90f9314 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/public_/RunService.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/public_/RunService.kt @@ -27,9 +27,10 @@ interface RunService { fun withOptions(modifier: Consumer): RunService /** - * **Alpha:** The request and response contract may change; Returns one run within the trace - * identified by the share token. The request supplies only the run ID and that run's exact - * start_time coordinate. + * Returns one run within the trace identified by the share token. The request supplies only the + * run ID and that run's exact start_time coordinate. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ fun retrieve(runId: String, params: RunRetrieveParams): Run = retrieve(runId, params, RequestOptions.none()) @@ -51,8 +52,10 @@ interface RunService { ): Run /** - * **Alpha:** The request and response contract may change; Returns all runs within the trace - * identified by the share token. The share token supplies the tenant, project, and trace scope. + * Returns all runs within the trace identified by the share token. The share token supplies the + * tenant, project, and trace scope. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ fun query(shareToken: String): RunQueryResponse = query(shareToken, RunQueryParams.none()) @@ -121,7 +124,7 @@ interface RunService { ): HttpResponseFor /** - * Returns a raw HTTP response for `post /api/v2/public/{share_token}/runs/v2/query`, but is + * Returns a raw HTTP response for `post /api/v2/public/{share_token}/runs/query`, but is * otherwise the same as [RunService.query]. */ @MustBeClosed diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/public_/RunServiceImpl.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/public_/RunServiceImpl.kt index b0bfa8e3..459fc6cb 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/public_/RunServiceImpl.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/public_/RunServiceImpl.kt @@ -39,7 +39,7 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio withRawResponse().retrieve(params, requestOptions).parse() override fun query(params: RunQueryParams, requestOptions: RequestOptions): RunQueryResponse = - // post /api/v2/public/{share_token}/runs/v2/query + // post /api/v2/public/{share_token}/runs/query withRawResponse().query(params, requestOptions).parse() class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) : @@ -105,15 +105,7 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio HttpRequest.builder() .method(HttpMethod.POST) .baseUrl(clientOptions.baseUrl()) - .addPathSegments( - "api", - "v2", - "public", - params._pathParam(0), - "runs", - "v2", - "query", - ) + .addPathSegments("api", "v2", "public", params._pathParam(0), "runs", "query") .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/runs/ShareService.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/runs/ShareService.kt index 8bc8c378..df1b0d8e 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/runs/ShareService.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/services/blocking/runs/ShareService.kt @@ -26,7 +26,11 @@ interface ShareService { */ fun withOptions(modifier: Consumer): ShareService - /** Creates or returns a share token for a run. Child runs share their trace root. */ + /** + * Creates or returns a share token for a run. Child runs share their trace root. + * + * Self-hosted deployments require LangSmith `v0.16` or later. + */ fun create(runId: String): ShareCreateResponse = create(runId, ShareCreateParams.none()) /** @see create */ @@ -59,6 +63,8 @@ interface ShareService { /** * Deletes the share token for the trace identified by trace_id and session_id. Idempotent: * returns 204 whether or not a share token existed. + * + * Self-hosted deployments require LangSmith `v0.16` or later. */ fun delete(traceId: String) = delete(traceId, ShareDeleteParams.none())