Skip to content

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

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

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.
  • BatchCreateCustomerMemoriesRequest — memories (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>
@twindebank

Copy link
Copy Markdown
Contributor

Comment from a Claude Code session, not from Theo.

Closing: replaced by #40, which carries all of this PR's changes and brings the library up to date with the current API.

@twindebank twindebank closed this Nov 25, 2026
twindebank added a commit that referenced this pull request Nov 27, 2026
Brings the client in line with public API contract
3e9c6fa0a27454d8d5300c42e4215c475c3954b085dae9901f429d0c531e50f3 and records it in
PUBLIC_API_VERSION.

New operations: customer memories (list, batch create v2, deprecated v1 batch
create), files (begin upload, create, list), knowledge bases (list, create, read,
update), notes (list, read), the conversation read endpoint, and reading a given
tool version. New webhook events: conversation.start and the three back-office
task events; unknown event types now come back as UNKNOWN instead of throwing.

Fixes on main: requests now go to the configured base URL, query parameters are
sent and encoded, readConversation uses the /read endpoint, the tool and
terminology substitution lists read their wrapped responses, deleting a hand-off
target sends its ID as a query parameter, timestamps are sent as RFC 3339
strings, participant types use the API's values, unknown response fields no
longer fail parsing, and conversation.hand_off webhooks parse again.

Carries over the customer memories batch-create work from #34.
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.

2 participants