From cbcec1e3b38410f8fa19af0504a2194dc23dee82 Mon Sep 17 00:00:00 2001 From: Gleb Khaykin Date: Sat, 28 Mar 2026 22:06:49 +0100 Subject: [PATCH 1/3] feat(rl): add required fields to rl objects --- openapi.yaml | 72 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 66 insertions(+), 6 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index b151560..f98e398 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -7723,6 +7723,8 @@ components: description: Cursor to use as the 'after' parameter for the next page. Empty when has_more is false. RL.EncodedText: type: object + required: + - tokens properties: tokens: description: Pre-tokenized text input @@ -7732,8 +7734,9 @@ components: - 456 - 789 items: - type: string - format: int64 + oneOf: + - type: string + - type: integer RL.DType: type: string enum: @@ -7812,8 +7815,9 @@ components: - 456 - 789 items: - type: string - format: int64 + oneOf: + - type: string + - type: integer dtype: description: Data type of the integer array $ref: '#/components/schemas/RL.DType' @@ -7832,8 +7836,9 @@ components: - 0 - 1 items: - type: string - format: int64 + oneOf: + - type: string + - type: integer dtype: description: Data type of the integer array (must be D_TYPE_INT64) $ref: '#/components/schemas/RL.DType' @@ -7914,6 +7919,9 @@ components: $ref: '#/components/schemas/RL.LossInputs' RL.OptimStepOperation: type: object + required: + - id + - status properties: id: type: string @@ -7928,6 +7936,9 @@ components: $ref: '#/components/schemas/RL.TrainingOperationError' RL.SampleOperation: type: object + required: + - id + - status properties: id: type: string @@ -7943,6 +7954,8 @@ components: $ref: '#/components/schemas/RL.TrainingOperationError' RL.OptimStepResult: type: object + required: + - step properties: step: description: Step number @@ -7951,6 +7964,8 @@ components: example: 100 RL.SampleResult: type: object + required: + - rollouts properties: rollouts: type: array @@ -7960,6 +7975,8 @@ components: description: Completions grouped by prompt RL.SampleRollout: type: object + required: + - sequences properties: sequences: type: array @@ -7969,6 +7986,8 @@ components: description: Completions generated for one prompt RL.SampleSequence: type: object + required: + - tokens properties: tokens: type: array @@ -7996,6 +8015,9 @@ components: description: Reason for stopping generation RL.ForwardBackwardOperation: type: object + required: + - id + - status properties: id: type: string @@ -8011,6 +8033,8 @@ components: $ref: '#/components/schemas/RL.TrainingOperationError' RL.ForwardBackwardResult: type: object + required: + - loss properties: loss: type: number @@ -8085,6 +8109,15 @@ components: - TRAINING_SESSION_STATUS_EXPIRED RL.TrainingSession: type: object + required: + - id + - status + - base_model + - inference_checkpoints + - training_checkpoints + - step + - created_at + - updated_at properties: id: type: string @@ -8196,6 +8229,9 @@ components: default: "0.1" RL.InferenceCheckpointOperation: type: object + required: + - id + - status properties: id: type: string @@ -8211,6 +8247,8 @@ components: $ref: '#/components/schemas/RL.TrainingOperationError' RL.InferenceCheckpointResult: type: object + required: + - model_name properties: model_name: type: string @@ -8219,6 +8257,10 @@ components: RL.InferenceCheckpoint: type: object description: Saved inference checkpoint + required: + - id + - step + - created_at properties: id: type: string @@ -8240,6 +8282,9 @@ components: RL.InferenceCheckpointRegistration: type: object description: Model registration details for an inference checkpoint + required: + - model_name + - registered_at properties: model_name: type: string @@ -8253,6 +8298,10 @@ components: RL.TrainingCheckpoint: type: object description: Saved training checkpoint + required: + - id + - step + - created_at properties: id: type: string @@ -8270,6 +8319,8 @@ components: description: Timestamp when the checkpoint was created RL.TrainingCheckpointResult: type: object + required: + - checkpoint_id properties: checkpoint_id: type: string @@ -8277,6 +8328,9 @@ components: description: ID of the saved training checkpoint (use for resume via Start) RL.TrainingCheckpointOperation: type: object + required: + - id + - status properties: id: type: string @@ -8301,6 +8355,10 @@ components: RL.CheckpointFile: type: object description: A downloadable file within a checkpoint + required: + - filename + - url + - size properties: filename: type: string @@ -8317,6 +8375,8 @@ components: description: File size in bytes RL.CheckpointDownloadResponse: type: object + required: + - data properties: data: type: array From cac3f6afde5f44b464c3b7d7af6a617a71bc1ed3 Mon Sep 17 00:00:00 2001 From: Gleb Khaykin Date: Mon, 30 Mar 2026 12:39:29 +0200 Subject: [PATCH 2/3] refactor: :hammer: --- openapi.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index f98e398..9162716 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -7707,6 +7707,7 @@ components: $ref: '#/components/schemas/RL.EncodedText' RL.ListMeta: type: object + description: Pagination metadata for list responses properties: limit: type: integer @@ -7919,6 +7920,7 @@ components: $ref: '#/components/schemas/RL.LossInputs' RL.OptimStepOperation: type: object + description: Async optimizer step operation required: - id - status @@ -7932,10 +7934,13 @@ components: description: Operation status output: $ref: '#/components/schemas/RL.OptimStepResult' + description: Result on success error: $ref: '#/components/schemas/RL.TrainingOperationError' + description: Error details on failure RL.SampleOperation: type: object + description: Async sample operation required: - id - status @@ -7950,10 +7955,13 @@ components: description: Operation status output: $ref: '#/components/schemas/RL.SampleResult' + description: Result on success error: $ref: '#/components/schemas/RL.TrainingOperationError' + description: Error details on failure RL.OptimStepResult: type: object + description: Result of an optimizer step operation required: - step properties: @@ -7964,6 +7972,7 @@ components: example: 100 RL.SampleResult: type: object + description: Result of a sample operation required: - rollouts properties: @@ -7975,6 +7984,7 @@ components: description: Completions grouped by prompt RL.SampleRollout: type: object + description: Completions generated for a single prompt required: - sequences properties: @@ -7986,6 +7996,7 @@ components: description: Completions generated for one prompt RL.SampleSequence: type: object + description: A single generated completion sequence with tokens and logprobs required: - tokens properties: @@ -8015,6 +8026,7 @@ components: description: Reason for stopping generation RL.ForwardBackwardOperation: type: object + description: Async forward-backward pass operation required: - id - status @@ -8029,10 +8041,13 @@ components: description: Operation status output: $ref: '#/components/schemas/RL.ForwardBackwardResult' + description: Result on success error: $ref: '#/components/schemas/RL.TrainingOperationError' + description: Error details on failure RL.ForwardBackwardResult: type: object + description: Result of a forward-backward pass operation required: - loss properties: @@ -8052,6 +8067,7 @@ components: format: double RL.TrainingOperationError: type: object + description: Error details for a failed training operation properties: code: description: Application error code @@ -8109,6 +8125,7 @@ components: - TRAINING_SESSION_STATUS_EXPIRED RL.TrainingSession: type: object + description: A training session and its current state required: - id - status @@ -8167,6 +8184,7 @@ components: $ref: '#/components/schemas/RL.LoraConfig' RL.TrainingSessionsListResponse: type: object + description: Paginated list of training sessions properties: data: type: array @@ -8229,6 +8247,7 @@ components: default: "0.1" RL.InferenceCheckpointOperation: type: object + description: Async inference checkpoint operation required: - id - status @@ -8243,10 +8262,13 @@ components: description: Operation status output: $ref: '#/components/schemas/RL.InferenceCheckpointResult' + description: Result on success error: $ref: '#/components/schemas/RL.TrainingOperationError' + description: Error details on failure RL.InferenceCheckpointResult: type: object + description: Result of an inference checkpoint operation required: - model_name properties: @@ -8319,6 +8341,7 @@ components: description: Timestamp when the checkpoint was created RL.TrainingCheckpointResult: type: object + description: Result of a save training checkpoint operation required: - checkpoint_id properties: @@ -8328,6 +8351,7 @@ components: description: ID of the saved training checkpoint (use for resume via Start) RL.TrainingCheckpointOperation: type: object + description: Async save training checkpoint operation required: - id - status @@ -8342,8 +8366,10 @@ components: description: Operation status output: $ref: '#/components/schemas/RL.TrainingCheckpointResult' + description: Result on success error: $ref: '#/components/schemas/RL.TrainingOperationError' + description: Error details on failure RL.CheckpointVariant: type: string enum: @@ -8375,6 +8401,7 @@ components: description: File size in bytes RL.CheckpointDownloadResponse: type: object + description: Presigned download URLs for a checkpoint's files required: - data properties: From 74e0225d55485ef9cd24715824028a1630f2ba47 Mon Sep 17 00:00:00 2001 From: Gleb Khaykin Date: Mon, 30 Mar 2026 12:50:59 +0200 Subject: [PATCH 3/3] refactor: :hammer: --- openapi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/openapi.yaml b/openapi.yaml index 9162716..8a1d179 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -8135,6 +8135,7 @@ components: - step - created_at - updated_at + - lora_config properties: id: type: string