1 parent
a8f689e39c
commit
c340aec110
59 files changed
+1108
-1590
No files matched your search
@@ -20,7 +20,7 @@ test('DeepSeek images reach Chat Completions through the registered host route',
|
||||
forRequest: (_model, key) => key,
|
||||
onKeyFailure: () => assert.fail('the fixture key must not be rejected'),
|
||||
},
|
||||
hosts: stubHostPool(createHostPool, ['https://hk2.geek2api.com', 'https://hk.geek2api.com']),
|
||||
hosts: stubHostPool(createHostPool, ['https://hk2.infstarapi.com', 'https://hk.infstarapi.com']),
|
||||
fallbackSessionId: 'vision-fixture',
|
||||
resolveAttachments: () => fixture.attachments,
|
||||
})
|
||||
@@ -36,10 +36,10 @@ test('DeepSeek images reach Chat Completions through the registered host route',
|
||||
headers: { 'Content-Type': 'text/event-stream' },
|
||||
})
|
||||
})
|
||||
const prepared = await adapter.prepareCall('geek2api', 'deepseek-v4.1-flash')
|
||||
const prepared = await adapter.prepareCall('infstarapi', 'deepseek-v4.1-flash')
|
||||
const chunks = []
|
||||
for await (const chunk of prepared.stream({
|
||||
provider: 'geek2api', model: 'deepseek-v4.1-flash', sessionId: 'vision-fixture',
|
||||
provider: 'infstarapi', model: 'deepseek-v4.1-flash', sessionId: 'vision-fixture',
|
||||
reasoningEffort: 'off', maxTokens: 128,
|
||||
messages: [createUserMessage({
|
||||
content: [{ type: 'text', text: 'Describe this image.' }, fixture.block],
|
||||
@@ -52,7 +52,7 @@ test('DeepSeek images reach Chat Completions through the registered host route',
|
||||
assert.deepEqual(fixture.reads, [fixture.block.attachment.attachmentId])
|
||||
assert.equal(requests.length, 1)
|
||||
// The pool's preferred host serves the request, under the catalog's /v1 path.
|
||||
assert.equal(requests[0].url, 'https://hk2.geek2api.com/v1/chat/completions')
|
||||
assert.equal(requests[0].url, 'https://hk2.infstarapi.com/v1/chat/completions')
|
||||
assert.equal(requests[0].body.model, 'deepseek-v4.1-flash')
|
||||
const content = requests[0].body.messages.find(message => message.role === 'user').content
|
||||
assert.deepEqual(content[0], { type: 'text', text: 'Describe this image.' })
|
||||
|
||||
Reference in new issue
Block a user