Add projects
This commit is contained in:
parent
2d3a9ad623
commit
8b607dd700
1802 changed files with 503346 additions and 2 deletions
26
frontend/tests/fennoProvider.test.ts
Normal file
26
frontend/tests/fennoProvider.test.ts
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import { describe, expect, test } from 'vitest';
|
||||
import {
|
||||
buildFennoAIRaw,
|
||||
FENNO_AI_CODEX_BASE_URL,
|
||||
FENNO_AI_PROVIDER_NAME,
|
||||
} from '../src/features/providers/fennoAI';
|
||||
import { getSponsorProviderDefinition } from '../src/features/providers/sponsorDefinitions';
|
||||
|
||||
describe('FennoAI provider aggregation', () => {
|
||||
test('does not claim OpenAI configs that its form cannot display', () => {
|
||||
const raw = buildFennoAIRaw({
|
||||
openaiCompatibility: [
|
||||
{
|
||||
name: FENNO_AI_PROVIDER_NAME,
|
||||
baseUrl: FENNO_AI_CODEX_BASE_URL,
|
||||
apiKeyEntries: [{ apiKey: 'openai-key' }],
|
||||
},
|
||||
],
|
||||
codexApiKeys: [{ apiKey: 'codex-key', baseUrl: FENNO_AI_CODEX_BASE_URL }],
|
||||
});
|
||||
|
||||
expect(getSponsorProviderDefinition('fennoAI').protocols).toEqual(['codex', 'claude']);
|
||||
expect(raw.openai).toEqual([]);
|
||||
expect(raw.codex.map((item) => item.index)).toEqual([0]);
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue