Skip to content

[api-sync] Update the Python client for the public API - #142

Merged
twindebank merged 2 commits into
mainfrom
api-sync/full-8572e0700a86
Nov 27, 2026
Merged

twindebank merged 2 commits into
mainfrom
api-sync/full-8572e0700a86

Conversation

@twindebank

@twindebank twindebank commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Updates the Python client to 0.13.0 for API contract 3e9c6fa0a27454d8d5300c42e4215c475c3954b085dae9901f429d0c531e50f3.

Migration notes

  • Use AttachmentType.FILE for documents and audio. The API accepts image and file.
  • Read the returned sender from Message.participant_id. Construct Message and ActionExecuteEvent with keyword arguments if your code creates these objects directly. An action can belong to a conversation or a back-office task.
  • Procedure responses omit the author. File and note lists provide the next page cursor. Procedure lists also provide a previous cursor.
  • Tool updates send only fields you supply. To clear conditional parameter groups, pass an empty list for parameter_sets. Read the tool ID from the create response.
  • For secret refresh requests, configure the timeout with SecretHTTPRetry. Tool HTTP requests also support a maximum attempt count.

Client changes

  • Add methods for customer memories, files, knowledge bases and notes. Customer memories are experimental. Both deprecated operations remain available.
  • Parse all eight webhook events, including outbound conversation starts and back-office task completion, failure and hand-off.
  • Support article and topic public URLs, note attributes, knowledge base IDs, tool parameter sets, asynchronous tools, resource branches and traffic group exclusions.
  • Send query parameters for reads and lists, decode topic and procedure version responses, and read the procedure returned when updating a daily limit.
  • Support attachment-only messages, replayed AI messages and conversation assignment at startup. Use Argument from gradient_labs when executing a tool.

Verification

Checked the client method map against all 88 customer operations and decoded an example of each of the eight webhook events. All 148 tests pass. Ruff checks and formatting pass. Both the wheel and source distribution build.

Add file, knowledge base, note list/read and customer memory operations,
the remaining webhook events and their fields, and the missing request and
response fields. Fix query parameters, topic and procedure-version response
names, timestamp decoding, and attachment types. Record the contract version
and add an operation-list test.
@twindebank
twindebank force-pushed the api-sync/full-8572e0700a86 branch from 370fd5a to bf8ca0f Compare November 27, 2026 10:47
@twindebank twindebank changed the title [api-sync full] gradientlabs-python: sync to the public API [api-sync] Update the Python client for the public API Nov 27, 2026
@twindebank
twindebank marked this pull request as ready for review November 27, 2026 11:21
@twindebank
twindebank requested a review from a team November 27, 2026 11:21
@twindebank
twindebank merged commit 0967ca9 into main Nov 27, 2026
2 checks passed
@twindebank
twindebank deleted the api-sync/full-8572e0700a86 branch November 27, 2026 11:27
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