migrate_session
Solve context capacity issues by migrating conversation sessions from a source model to a target model. Returns a decision, migrated messages, and token before/after comparison.
Instructions
把一个会话从源模型迁移到目标模型。
messages_json: JSON 数组字符串,形如 [{"role": "user", "content": "..."}, {"role": "assistant", "content": "..."}]
返回:决策(action / reason / 容量对比)+ 迁移后的消息数组 + token 前后对比。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"messages_json": "<messages_json>",
"source_model": "<source_model>",
"target_model": "<target_model>"
},
"name": "migrate_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | No | migrated | |
| source_model | Yes | ||
| target_model | Yes | ||
| messages_json | Yes | ||
| force_compress | No |