feat: v0.8.2 安全纵深补全 · 协议保真 · 断链修复 — 图片SSRF/根MEMORY.md保护根治 · Anthropic thinking回传+pause_turn续传 · 2523 用例全量回归 + E2E 扩充
This commit is contained in:
@@ -901,15 +901,17 @@ describe('MimoAdapter — thinking 显式开关', () => {
|
||||
expect(bodies[0].top_p).toBe(0.8);
|
||||
});
|
||||
|
||||
it('thinkingEnabled 未配置 → 默认 {type:enabled} 且不传 temperature/top_p(API 强制覆盖)', async () => {
|
||||
// v0.8.2 P2-6 修订:未配置时显式 disabled(与 DeepSeek/Agnes 的"用户意图优先"对齐;
|
||||
// 旧行为隐式 enabled 会静默吞掉用户 temperature/top_p —— 服务端思考模式强制覆盖)
|
||||
it('thinkingEnabled 未配置 → 显式 {type:disabled} 且 temperature/top_p 透传', async () => {
|
||||
const adapter = makeAdapter();
|
||||
const { bodies } = captureFetch();
|
||||
await adapter.send(
|
||||
makeRequest({ params: { maxTokens: 4096, temperature: 0.7, topP: 0.8, stream: false } }),
|
||||
);
|
||||
expect(bodies[0].thinking).toEqual({ type: 'enabled' });
|
||||
expect(bodies[0].temperature).toBeUndefined();
|
||||
expect(bodies[0].top_p).toBeUndefined();
|
||||
expect(bodies[0].thinking).toEqual({ type: 'disabled' });
|
||||
expect(bodies[0].temperature).toBe(0.7);
|
||||
expect(bodies[0].top_p).toBe(0.8);
|
||||
});
|
||||
|
||||
it('max_completion_tokens 原样透传(v0.8.1:pro/standard 均不钳制)', async () => {
|
||||
|
||||
Reference in New Issue
Block a user