Skip to content

[api-sync 2026-07-22] gradientlabs-java: sync to OpenAPI spec - #34

Open
jafrog wants to merge 3 commits into
mainfrom
api-client-sync/2026-07-22
Open

[api-sync 2026-07-22] gradientlabs-java: sync to OpenAPI spec#34
jafrog wants to merge 3 commits into
mainfrom
api-client-sync/2026-07-22

Conversation

@jafrog

@jafrog jafrog commented Jul 22, 2026

Copy link
Copy Markdown

Syncs the Java SDK to the reworked public API memories endpoint.

What changed

The old conversation-scoped bulk-upload endpoint was replaced (it was never released) with a customer-scoped batch-create endpoint.

Removed (POST /conversations/{id}/memories):

  • GradientLabsClient.bulkUploadConversationMemories(...)
  • ConversationMemoriesBulkUploadRequest (with idempotency_key, created_at_keys, etc.)
  • ConversationMemoriesBulkUploadResponse (upload_id, memories_inserted)

Added (POST /customers/{customer_id}/memories, operation CustomerMemoriesBatchCreate, Integration role):

  • void batchCreateCustomerMemories(String customerId, BatchCreateCustomerMemoriesRequest request) — customer-scoped, returns nothing. The batch is created asynchronously (fire-and-forget); the call returns as soon as the job is accepted.
  • BatchCreateCustomerMemoriesRequestmemories (required, non-empty List<Memory>).
  • Memory model — externalId (required, wire external_id), customType (optional, wire custom_type), createdAt (required, wire created_at), data (required, arbitrary JSON as Map<String, Object>).

Both types follow the existing builder + Jackson @JsonProperty / @JsonInclude(NON_NULL) style with required-field validation in build().

Notes

  • The endpoint returns 409 Conflict when a batch is already being created for the same customer; this surfaces through the existing generic GradientLabsException error propagation — no special client handling.
  • No response object exists (the call returns nothing).
  • The Spring Boot starter only exposes the client bean, so no starter changes were needed.
  • Version stays 1.1.0-SNAPSHOT across the root and module poms (first release of this endpoint).

Verification

mvn verify — BUILD SUCCESS, 13 tests run, 0 failures (6 new tests covering Memory / request serialization and required-field validation).

jafrog and others added 3 commits July 22, 2026 13:27
Add bulkUploadConversationMemories for POST /conversations/{id}/memories,
with request/response models and serialization tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Minor bump for the new conversation memories bulk-upload endpoint.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant