feat(translate): expand namespace tools and carry reasoning in compat adapters - #186
Merged
Merged
Conversation
… adapters Add NormalizeOpenAITools to expand Codex/Desktop namespace tool wrappers into flat OpenAI function tools, qualify nested names as namespace__name, and drop hosted shells (mcp / web_search). Wire it into the Responses translator, the Trae payload normalizer, and the WorkBuddy payload normalizer so all three accept the same tool shapes. Responses input handling now replays prior model turns as a single assistant message: reasoning items are kept pending and attached to the next assistant message or function_call as reasoning_content, and adjacent assistant items are merged (content, reasoning_content, tool_calls). function_call_output accepts content-block arrays and lifts input_image blocks into a following user message. WorkBuddy keeps reasoning-only assistant turns and adds a reasoning_content field to ChatMessage so thinking-mode history survives normalization.
AGENTS.md now lists every doc with a read-when column and points at docs/ARCHITECTURE.md and docs/REQUEST.md for backend/routing work. Both files stay out of the repo, so add them to .gitignore alongside the other local-only docs.
Drop repeated blocks (account-level runtime, cross-platform, managed update, provider lists) and merge Community/Contributing on the English side so both READMEs share the same section order and length. Move WorkBuddy keepalive to Features where the Chinese README already had it.
This was referenced Sep 17, 2026
6 tasks
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.
What
Three grouped changes on this branch:
feat(translate): namespace tool expansion + reasoning replay (internal/translate,internal/providers/{trae,workbuddy})NormalizeOpenAITools: expands Codex/Desktopnamespacetool wrappers into flat OpenAI function tools, qualifies nested names asnamespace__name(already-qualifiedmcp__*untouched), and drops hosted shells (mcp/web_search/web_search_preview).reasoningitems stay pending and attach to the next assistant message /function_callasreasoning_content; adjacent assistant items merge (content,reasoning_content,tool_calls).function_call_outputaccepts content-block arrays and liftsinput_imageblocks into a following user message.ChatMessagegainsreasoning_content.docs(agents): AGENTS.md doc map gains aread-whencolumn and points atdocs/ARCHITECTURE.md/docs/REQUEST.md; both added to.gitignore(kept local, not published).docs: zh/en READMEs de-duplicated and aligned to the same section order and length.Checks
go build ./...— passgo test ./...— passgo vet ./...— passpython3 scripts/release-notes.py self-test+validate— passgofmtclean on all touched files (3 files were unformatted and are now fixed; the 5 remaining dirty files are pre-existing onmainand untouched here)Notes
docs/ARCHITECTURE.mdanddocs/REQUEST.mdexist on disk with frontmatter but are not committed — they are gitignored, matchingDESIGN.md/PLAN.md.