MCPcopy
hub / github.com/anomalyco/opencode / testProviderConfig

Function testProviderConfig

packages/opencode/test/lib/test-provider.ts:9–37  ·  view source on GitHub ↗
(llmUrl: string)

Source from the content-addressed store, hash-verified

7// - test/lib/run-process.ts (subprocess CLI tests)
8// - test/server/httpapi-sdk.test.ts (in-process SDK tests)
9export function testProviderConfig(llmUrl: string) {
10 return {
11 formatter: false,
12 lsp: false,
13 provider: {
14 test: {
15 name: "Test",
16 id: "test",
17 env: [],
18 npm: "@ai-sdk/openai-compatible",
19 models: {
20 "test-model": {
21 id: "test-model",
22 name: "Test Model",
23 attachment: false,
24 reasoning: false,
25 temperature: false,
26 tool_call: true,
27 release_date: "2025-01-01",
28 limit: { context: 100_000, output: 10_000 },
29 cost: { input: 0, output: 0 },
30 options: {},
31 },
32 },
33 options: { apiKey: "test-key", baseURL: llmUrl },
34 },
35 },
36 }
37}

Callers 7

withCliFixtureFunction · 0.90
runOptsFunction · 0.90
verifierConfigFunction · 0.90
providerConfigFunction · 0.90
withFakeLlmFunction · 0.90
withFakeLlmProjectFunction · 0.90

Calls

no outgoing calls

Tested by 3

providerConfigFunction · 0.72
withFakeLlmFunction · 0.72
withFakeLlmProjectFunction · 0.72