feat(sdk): sync go/ts/python SDKs with server find/search, recall, an… - #3737
Draft
zhoujh01 wants to merge 3 commits into
Draft
feat(sdk): sync go/ts/python SDKs with server find/search, recall, an…#3737zhoujh01 wants to merge 3 commits into
zhoujh01 wants to merge 3 commits into
Conversation
zhoujh01
force-pushed
the
feat/sdk-level-extra-recall-admin
branch
from
August 12, 2026 09:40
fec4ac5 to
fffe689
Compare
…d admin changes Server-side changes recently landed that the language SDKs had drifted from: - find/search results now return `tags` and no longer return `category`/`match_reason`/`relations`/`overview` (#3730). Go's strict struct was the only one broken; update MatchedContext accordingly. - new admin endpoints for agent-evolution and per-account settings (#3695). - public `search/recall` endpoint was missing from all SDKs. Changes: - python: add `level`/`since`/`until`/`time_field` to find/search; add an `extra` escape hatch to find/search/add_resource/write/batch_write so new server fields can be passed without an SDK bump (only forwarded when set, preserving `level=0`); add `recall` and the four admin methods. - go: fix MatchedContext (add Tags, drop removed fields), add Recall and the four admin methods. - typescript: type MatchedContext/FindResult, add RecallOptions, add `recall` and the four admin methods. Co-authored-by: TRAE CLI <noreply@bytedance.com>
- migrate complex Python SDK calls to typed options dictionaries - add dedicated context search and consistent extra-field handling - align Go and TypeScript options with omission-aware serialization - support session config, event tags, Agent Evolution date filters, OpenViking Assets, batch write, downloads, and create_parent - refresh SDK tests and examples across all three languages Co-authored-by: TRAE CLI <noreply@bytedance.com>
zhoujh01
force-pushed
the
feat/sdk-level-extra-recall-admin
branch
from
August 12, 2026 12:42
fffe689 to
ec4ac9b
Compare
- fix Go session extra merging and Python message precedence - adapt LangChain calls to the Python options API - migrate repository examples, tests, and documentation Co-authored-by: TRAE CLI <noreply@bytedance.com>
ZaynJarvis
requested changes
Aug 13, 2026
ZaynJarvis
left a comment
Collaborator
There was a problem hiding this comment.
跨语言 SDK 的 session message 序列化需要保持一致;当前 Python 与 Go/TypeScript 对空 parts 的行为不同。
| payload.update({key: value for key, value in optional.items() if value is not None}) | ||
| if telemetry is not False: | ||
| payload["telemetry"] = telemetry | ||
| if "content" in payload and payload.get("parts") is not None: |
Collaborator
There was a problem hiding this comment.
[Bug] (blocking) parts=[] 会被当成结构化内容并删除 content,与 Go/TypeScript 的行为不一致。
例如 add_message("s", {"role": "assistant", "content": "x", "parts": []}) 在这里最终发出 {"role": "assistant", "parts": []};Go 和 TS 都把空数组视为未提供 parts,发出 {"role": "assistant", "content": "x"}。同一个跨语言 SDK 调用会得到不同的服务端消息语义。请统一空 parts 的规则;如果 Python 有意保留这个不同语义,请说明兼容性约束。
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.
…d admin changes
Server-side changes recently landed that the language SDKs had drifted from:
tagsand no longer returncategory/match_reason/relations/overview(feat(search): expose tags in find/search results and drop empty fields #3730). Go's strict struct was the only one broken; update MatchedContext accordingly.search/recallendpoint was missing from all SDKs.Changes:
level/since/until/time_fieldto find/search; add anextraescape hatch to find/search/add_resource/write/batch_write so new server fields can be passed without an SDK bump (only forwarded when set, preservinglevel=0); addrecalland the four admin methods.recalland the four admin methods.Description
Human Involvement
Related Issue
Type of Change
Changes Made
Testing
Checklist
Screenshots (if applicable)
Additional Notes