Commit Graph
3 Commits
Author SHA1 Message Date
yetone 5ec8377093 trae 0.2.18: native tool turns (#257), a result with no output isn't empty (#251), no tools keeps the text form
Releases #257 (WuJian1421), #260 and #273 (moxuanchen), with three fixes on
top of #257's native tool turns:

- A tool result with no text went out as an empty text part. wangjianjq
  measured on live Trae CN (#251) that Trae then refuses the whole request
  with 4027 ("insufficient tool messages following tool_calls message"),
  for either of two parallel results; " " or "0" passes. An empty result
  now goes as "(no output)", or "(the result's image follows)" when its
  image rides the user turn after the run. Credit wangjianjq (#251).
- A request whose body names no tools (none sent, or tool_choice "none",
  such as a summary) still sends past calls and results as text, as 0.2.17
  did: every live run of the native turns carried the tools in the body.
- A tool result answering no call the history sends goes back as a user
  text turn ("Result of ... (call id)"), not as a tool turn naming no call.
- A Windows APPDATA spelled with other case, separators or a trailing
  separator is the same root as the home's AppData\Roaming (test for #273's
  fix; it fails on 0.2.17's clientStoragePaths).

Run at this commit on origin/main c7a7379: bun test in packages/trae 175
pass 0 fail; bun scripts/check.mjs trae ok. Broken by hand: with the
merged #257 index.mjs, the three new request tests and the image placeholder
test fail (4 of 28 in request+images); with 0.2.17's index.mjs the new
APPDATA case fails. Not tried against a live Trae account (none here); the
live evidence is the PR authors'.
2026-10-20 22:06:55 +08:00
WuJian1421 0b82ab8f6c trae: a tool call history goes back as the turns Trae made, not as text (#257, WuJian1421)
Trae accepts an assistant tool_calls turn and a role:"tool" result turn on
llm_utils_chat, and answers such a history with native calls; the text-form
bridge prompt is dropped. Assistant text folds into the calls turn after it,
consecutive calls turns join one list, a nameless call is dropped with its
result, and a tool result's images ride a user turn after the run of results
(Doubao-Seed doesn't read an image_url in a tool turn). Refs #38.

Run at the reviewed head d5d755a, merged with #260 and #273 on main 68170b3:
bun test in packages/trae 173 pass 0 fail; bun scripts/check.mjs trae ok.
Not tried live here (no Trae account); the live runs are the author's (CN and
Global, multi-turn, parallel calls) and wangjianjq's on #251. Follow-up on main:
an empty result's 4027, a request without tools, and a result answering no call.
2026-10-20 22:05:23 +08:00
yetone 9fd59cf6e8 trae 0.2.15: a model Trae's list marks multimodal takes images, and they reach it (#161)
Reported on magpie's Discord (#help): through magpie, Trae CN's doubao
model said it couldn't read images, while in Trae it reads them.

Every model was listed as text-only (MODEL's modalities), and partText
put "[an image, which this model can't see]" in every image's place, so
no image ever reached Trae.

What changed:
- Trae's lists mark each entry `multimodal` true or false
  (config_info_list). A listed model's flag now decides
  capabilities.input.image, attachment and modalities, over a fallback
  entry's word. Doubao-Seed, Kimi K3/K2.6, Qwen 3.7 Plus and MiniMax M3
  are true; GLM-5.x and DeepSeek V4 are false.
- An image sent to a model that takes images goes to llm_utils_chat as
  an OpenAI image_url part ({url}) after the text part. That is the
  shape TRAE's ai-agent carries (LLMRawMultiContent/LLMRawChatImageURL,
  in the ai-agent binary's strings) and what autumnsentiment/Trae2api-cn
  passes llm_utils_chat unchanged.
- A model marked false still gets the placeholder.
- The fallback list marks kimi-k2.6 and qwen-3.7-plus as taking images,
  as Trae's SOLO list does.

The list fixture is two entries of a relay's capture of the SOLO list
(wangqi233/trae2api scripts/_solo-models-clean.json).

Run:
- images.test.mjs: 6 pass on this change; 5 of 6 fail on 0.2.14's
  index.mjs (only the text-only case passes there).
- packages/trae: 146 tests, 0 fail.
- HOME=$(mktemp -d) bun test across the repo: 1616 pass, 0 fail.
- bun scripts/check.mjs: ok.

Not tried: a real Trae account. Magpie's owner has none signed in, so no
real image request was sent to Trae.
2026-10-16 15:41:00 +08:00