[api-sync 2026-07-22] gradientlabs-dotnet: sync to OpenAPI spec - #11
Open
jafrog wants to merge 4 commits into
Open
[api-sync 2026-07-22] gradientlabs-dotnet: sync to OpenAPI spec#11jafrog wants to merge 4 commits into
jafrog wants to merge 4 commits into
Conversation
Add Conversations.BulkUploadMemoriesAsync (POST /conversations/{id}/memories)
for uploading a batch of conversation-scoped memories the agent can search
over on demand. Includes request/response models and tests.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New endpoint (bulk upload conversation memories) -> minor bump. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rework the still-unreleased memories endpoint from the conversation-scoped
bulk-upload to the new customer-scoped batch-create:
Customers.BatchCreateMemoriesAsync (POST /customers/{id}/memories). The call
is fire-and-forget and returns no body. Removes the old
Conversations.BulkUploadMemoriesAsync method and its request/response types.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
dotnet format enforces CRLF (via .editorconfig); the new files were committed with LF, failing format verification on Linux/macOS CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
Customers.BatchCreateMemoriesAsyncto the Integration client for batch-creating customer-scoped memories that the agent can search over on demand.POST /customers/{customer_id}/memories(Integration role).BatchCreateMemoriesRequest):Memories, a non-emptyIReadOnlyList<Memory>. EachMemorycarries:ExternalId(required, wireexternal_id) — the caller's own id for the memoryCustomType(optional, wirecustom_type, omitted when null) — free-form labelCreatedAt(required, wirecreated_at) — RFC3339 timestampData(required,JsonElement, wiredata) — arbitrary JSON object stored verbatimTaskwith no body — it does not return an upload id or an inserted count.GradientLabsApiException. In particular the endpoint returns409 Conflictwhen a batch is already being created for the same customer; no special client handling is needed beyond the generic error propagation.Why the rework
This PR previously added the conversation-scoped bulk-upload endpoint (
Conversations.BulkUploadMemoriesAsync,BulkUploadMemoriesRequest/BulkUploadMemoriesResponse, withidempotency_key/*_keysfields and anupload_id/memories_insertedresponse). That endpoint was never released and has been replaced server-side by the customer-scoped batch-create above. The old method and its request/response types are removed.Changes
CustomersClientresource group onGradientLabsIntegrationClient(client.Customers).BatchCreateMemoriesRequestandMemorymodels.Conversations.BulkUploadMemoriesAsyncand the old request/response types.MemoriesTests: path/method assertions (POST /customers/{id}/memories), snake_case body,custom_typeomitted when null, and API error propagation including409 Conflict.Version stays at
0.2.0(first release of this endpoint; minor bump).dotnet build,dotnet test(75 passed on net8.0 and net10.0), anddotnet format --verify-no-changesall pass.