fix: align DeepSeek canary tool rounds with gate
Memind CI / Test, build, and release guards (pull_request) Successful in 1m32s
Memind CI / Test, build, and release guards (pull_request) Successful in 1m32s
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
import {
|
||||
DEEPSEEK_COMPAT_CONTRACT_VERSION,
|
||||
decodedUpstreamResponseHeaders,
|
||||
deepseekDisableThinkingEnabled,
|
||||
flattenLocalJsonSchemaRefs,
|
||||
@@ -10,6 +11,7 @@ import {
|
||||
resolveDeepseekNoThinkProxyBaseUrl,
|
||||
resolveMoonshotCompatProxyBaseUrl,
|
||||
sanitizeMoonshotToolSchemas,
|
||||
startDeepseekNoThinkProxy,
|
||||
} from './deepseek-no-think-proxy.mjs';
|
||||
|
||||
test('injectDeepseekThinkingDisabled adds thinking.disabled when absent', () => {
|
||||
@@ -168,3 +170,22 @@ test('decodedUpstreamResponseHeaders drops stale compression metadata', () => {
|
||||
'content-type': 'text/event-stream',
|
||||
});
|
||||
});
|
||||
|
||||
test('compatibility proxy health identifies the enforced production contract', async (t) => {
|
||||
const server = await startDeepseekNoThinkProxy({
|
||||
host: '127.0.0.1',
|
||||
port: 0,
|
||||
logger: { info() {}, warn() {}, error() {} },
|
||||
});
|
||||
t.after(() => new Promise((resolve) => server.close(resolve)));
|
||||
const address = server.address();
|
||||
const response = await fetch(`http://127.0.0.1:${address.port}/health`);
|
||||
assert.equal(response.status, 200);
|
||||
assert.deepEqual(await response.json(), {
|
||||
ok: true,
|
||||
contractVersion: DEEPSEEK_COMPAT_CONTRACT_VERSION,
|
||||
deepseekThinking: 'disabled',
|
||||
upstream: 'https://api.deepseek.com',
|
||||
moonshotUpstream: 'https://api.moonshot.cn',
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user