Skip to content

feat(sdk): sync go/ts/python SDKs with server find/search, recall, an… - #3737

Draft
zhoujh01 wants to merge 3 commits into
mainfrom
feat/sdk-level-extra-recall-admin
Draft

feat(sdk): sync go/ts/python SDKs with server find/search, recall, an…#3737
zhoujh01 wants to merge 3 commits into
mainfrom
feat/sdk-level-extra-recall-admin

Conversation

@zhoujh01

@zhoujh01 zhoujh01 commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

…d admin changes

Server-side changes recently landed that the language SDKs had drifted from:

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.

Description

Human Involvement

  • A human participated in the implementation or review loop
  • This PR was generated entirely by AI agents without human participation in the loop

Related Issue

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

Additional Notes

zhoujh01 and others added 2 commits August 12, 2026 20:38
…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
zhoujh01 force-pushed the feat/sdk-level-extra-recall-admin branch from fffe689 to ec4ac9b Compare August 12, 2026 12:42
- 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 ZaynJarvis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

跨语言 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:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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 有意保留这个不同语义,请说明兼容性约束。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants