|
|
@@ -1447,6 +1447,10 @@ describe('LocalModelResolver custom provider compat overrides', () => {
|
|
|
expect(await systemPromptRoleFor(undefined)).toBe('developer');
|
|
|
});
|
|
|
|
|
|
+ it('keeps the system role for a thinking model on the Mistral API', async () => {
|
|
|
+ expect(await systemPromptRoleFor(undefined, 'https://api.mistral.ai/v1')).toBe('system');
|
|
|
+ });
|
|
|
+
|
|
|
it.each([
|
|
|
'https://api.siliconflow.cn/v1',
|
|
|
'https://api.siliconflow.com/v1',
|
|
|
@@ -1474,6 +1478,8 @@ describe('LocalModelResolver custom provider compat overrides', () => {
|
|
|
it.each([
|
|
|
['https://api.openai.com/v1', 'developer'],
|
|
|
['https://api.deepseek.com/v1', 'system'],
|
|
|
+ ['https://api.mistral.ai.example/v1', 'developer'],
|
|
|
+ ['https://gateway.example/api.mistral.ai/v1', 'developer'],
|
|
|
['https://api.siliconflow.cn.example/v1', 'developer'],
|
|
|
['https://gateway.example/api.siliconflow.cn/v1', 'developer'],
|
|
|
['https://api.siliconflow.com.example/v1', 'developer'],
|
|
|
@@ -1493,6 +1499,12 @@ describe('LocalModelResolver custom provider compat overrides', () => {
|
|
|
expect(await systemPromptRoleFor(undefined, baseURL)).toBe(role);
|
|
|
});
|
|
|
|
|
|
+ it('honors an explicit developer-role override on the Mistral API', async () => {
|
|
|
+ expect(
|
|
|
+ await systemPromptRoleFor({ supportsDeveloperRole: true }, 'https://api.mistral.ai/v1'),
|
|
|
+ ).toBe('developer');
|
|
|
+ });
|
|
|
+
|
|
|
it.each([
|
|
|
'https://api.siliconflow.cn/v1',
|
|
|
'https://api.siliconflow.com/v1',
|