Skip to content

feat(translate): expand namespace tools and carry reasoning in compat adapters - #186

Merged
caigee-cmd merged 3 commits into
mainfrom
fix/responses-namespace-tools
Sep 17, 2026
Merged

caigee-cmd merged 3 commits into
mainfrom
fix/responses-namespace-tools

Conversation

@caigee-cmd

Copy link
Copy Markdown
Owner

What

Three grouped changes on this branch:

  1. feat(translate): namespace tool expansion + reasoning replay (internal/translate, internal/providers/{trae,workbuddy})
    • New NormalizeOpenAITools: expands Codex/Desktop namespace tool wrappers into flat OpenAI function tools, qualifies nested names as namespace__name (already-qualified mcp__* untouched), and drops hosted shells (mcp / web_search / web_search_preview).
    • Wired into the Responses translator, the Trae payload normalizer, and the WorkBuddy payload normalizer so all three accept the same tool shapes.
    • Responses input now replays one model turn as a single assistant message: reasoning items stay pending and attach to the next assistant message / function_call as reasoning_content; adjacent assistant items merge (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; ChatMessage gains reasoning_content.
  2. docs(agents): AGENTS.md doc map gains a read-when column and points at docs/ARCHITECTURE.md / docs/REQUEST.md; both added to .gitignore (kept local, not published).
  3. docs: zh/en READMEs de-duplicated and aligned to the same section order and length.

Checks

  • go build ./... — pass
  • go test ./... — pass
  • go vet ./... — pass
  • python3 scripts/release-notes.py self-test + validate — pass
  • gofmt clean on all touched files (3 files were unformatted and are now fixed; the 5 remaining dirty files are pre-existing on main and untouched here)

Notes

  • docs/ARCHITECTURE.md and docs/REQUEST.md exist on disk with frontmatter but are not committed — they are gitignored, matching DESIGN.md / PLAN.md.

… 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.
@caigee-cmd
caigee-cmd merged commit c931afb into main Sep 17, 2026
6 checks passed
@caigee-cmd
caigee-cmd deleted the fix/responses-namespace-tools branch September 17, 2026 07:55
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.

1 participant