On 0.2.41 the reporter's enterprise seat (@liuyuexue2020 on X, Trae CN,
console.enterprise.trae.cn) now lists its enterprise built-in models, but
a chat with one, AI/deekseek-v4.1-flash, got 502 with Trae's 4001 "We're
sorry, the param is invalid. Please try with a valid param." on chat_v3,
solo_work_lite, solo_agent, solo_agent_lite and solo_coder (their
screenshot on #1258). The error also confirms the list entry carries
config_source 2, the first real-seat sight of that field.
0.2.41 sent config_source, is_preset, custom_model_id and provider under
user_message_context.model_info, which is the agent task's model info.
Trae CN 3.4.20's own llm_utils_chat request (libharness,
worktree/branch_name.rs, asked with the user's selected model) is
usage, function, messages, conversation_id, access_type, config_name,
model_name, config_source, is_custom_model, provider: those fields go at
the top of the body. chatBody now sends config_source 2, is_custom_model
true and the entry's provider there, and no model_info for it. A preset's
body is unchanged.
Run (mote, HOME=$(mktemp -d), at this tree on 324acd60):
packages/trae bun test, 282 pass, 0 fail (24 files);
bun scripts/check.mjs trae ok.
Broken by hand: with the enterprise block in chatBody turned off, both
new entmodels tests went red (the fake answers the reporter's 4001 to an
enterprise config sent without config_source), and green again once
restored.
Not tried: a real enterprise seat; we have none. The field set comes from
the 3.4.20 client binary, and whether Trae's server wants more (model_name,
access_type) for an enterprise config is not known. The reporter couldn't
capture the IDE's chat in DevTools because the native ai-agent process
sends it, not the renderer.
32 lines
713 B
JSON
32 lines
713 B
JSON
{
|
|
"name": "@magpie-community/opencode-trae-auth",
|
|
"version": "0.2.42",
|
|
"description": "OpenCode provider plugins for Trae: Trae CN (trae.cn) and Trae Global (trae.ai), free tier included, with Trae's own browser sign-in",
|
|
"type": "module",
|
|
"main": "./opencode.mjs",
|
|
"exports": {
|
|
".": "./opencode2.mjs"
|
|
},
|
|
"files": [
|
|
"index.mjs",
|
|
"opencode.mjs",
|
|
"opencode2.mjs",
|
|
"README.md"
|
|
],
|
|
"keywords": [
|
|
"opencode",
|
|
"opencode-plugin",
|
|
"magpie",
|
|
"trae",
|
|
"trae-cn",
|
|
"trae-global",
|
|
"bytedance"
|
|
],
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/magpie-community/plugins.git",
|
|
"directory": "packages/trae"
|
|
}
|
|
}
|