fix(sdk-py): allow reset of config/context in assistants update (#6862)

This distinguishes an empty `config`/`context` (`{}`) from a null
`config`/`context`, and therefore allows resetting these fields.

(Easiest to test this E2E on the server side; will create a separate PR
for that.)
This commit is contained in:
Parker J. Rule
2026-02-18 18:48:07 +00:00
committed by GitHub
parent 095da17833
commit 172238b2d5
2 changed files with 4 additions and 4 deletions
@@ -425,9 +425,9 @@ class AssistantsClient:
payload: dict[str, Any] = {}
if graph_id:
payload["graph_id"] = graph_id
if config:
if config is not None:
payload["config"] = config
if context:
if context is not None:
payload["context"] = context
if metadata:
payload["metadata"] = metadata
@@ -427,9 +427,9 @@ class SyncAssistantsClient:
payload: dict[str, Any] = {}
if graph_id:
payload["graph_id"] = graph_id
if config:
if config is not None:
payload["config"] = config
if context:
if context is not None:
payload["context"] = context
if metadata:
payload["metadata"] = metadata