MCPcopy
hub / github.com/continuedev/continue / testConfig

Function testConfig

packages/openai-adapters/src/test/main.test.ts:19–48  ·  view source on GitHub ↗
(_config: ModelConfig & { options?: TestConfigOptions })

Source from the content-addressed store, hash-verified

17}
18
19function testConfig(_config: ModelConfig & { options?: TestConfigOptions }) {
20 const { options, ...config } = _config;
21 const model = config.model;
22 const api = getLlmApi({
23 provider: config.provider as any,
24 apiKey: config.apiKey,
25 apiBase: config.apiBase,
26 env: config.env,
27 });
28
29 if (
30 ["chat", "summarize", "edit", "apply"].some((role) =>
31 config.roles?.includes(role as any),
32 )
33 ) {
34 testChat(api, model, options);
35 }
36
37 if (config.roles?.includes("embed")) {
38 testEmbed(api, model);
39 }
40
41 if (config.roles?.includes("rerank")) {
42 testRerank(api, model);
43 }
44
45 if (config.roles?.includes("autocomplete")) {
46 testFim(api, model);
47 }
48}
49
50const TESTS: Omit<ModelConfig & { options?: TestConfigOptions }, "name">[] = [
51 {

Callers 1

main.test.tsFile · 0.85

Calls 5

testChatFunction · 0.85
testEmbedFunction · 0.85
testRerankFunction · 0.85
testFimFunction · 0.85
getLlmApiFunction · 0.70

Tested by

no test coverage detected