直连接口测试成功

This commit is contained in:
2026-04-23 04:36:57 +08:00
parent 5bc69bcd5b
commit a1587b8d12
15 changed files with 2694 additions and 7 deletions

24
包比对.md Normal file
View File

@@ -0,0 +1,24 @@
| 对比项 | 原版 CLI 包 | 当前 direct-final 包 | 是否一致 |
|---|---:|---:|---|
| endpoint | `/v2/chat/completions` | `/v2/chat/completions` | 是 |
| method | `POST` | `POST` | 是 |
| gzip | `Content-Encoding: gzip` | `Content-Encoding: gzip` | 是 |
| `User-Agent` | CLI/CodeBuddy/SDK 风格 | CLI/CodeBuddy/SDK 风格 | 是 |
| 认证 | `Authorization` | `Authorization + X-API-Key` | 基本一致 |
| `model` | `minimax-m2.7` | `minimax-m2.7` | 是 |
| `messages[0]` | `system` | `system` | 是 |
| system prompt | `18726` 字符 | 同文件内容 | 是 |
| `messages[1]` | `user` | `user` | 是 |
| user content 类型 | `text` blocks | `text` blocks | 是 |
| user blocks 数量 | `3` | `3` | 是 |
| 最后一段 user query | `<user_query>...</user_query>` | `<user_query>...</user_query>` | 是 |
| `stream` | `true` | `true` | 是 |
| `stream_options.include_usage` | `true` | `true` | 是 |
| `temperature` | `1` | `1` | 是 |
| `max_tokens` | `48000` | `48000` | 是 |
| `reasoning_effort` | `medium` | `medium` | 是 |
| `verbosity` | `high` | `high` | 是 |
| `reasoning_summary` | `auto` | `auto` | 是 |
| `tools` | 有22 个 | 无 | 否 |
现在主要剩余差异就是 `tools`。当前 direct 已经复刻了 system prompt 位置、user 包装、gzip、UA 和主要采样/推理参数。