MCPcopy Index your code
hub / github.com/anomalyco/opencode / withFakeLlm

Function withFakeLlm

packages/opencode/test/server/httpapi-sdk.test.ts:251–256  ·  view source on GitHub ↗
(serverPath: ServerPath, run: (input: LlmProjectFixture) => Effect.Effect<A, E, TestScope>)

Source from the content-addressed store, hash-verified

249}
250
251function withFakeLlm<A, E>(serverPath: ServerPath, run: (input: LlmProjectFixture) => Effect.Effect<A, E, TestScope>) {
252 return Effect.gen(function* () {
253 const llm = yield* TestLLMServer
254 return yield* withProject(serverPath, { config: testProviderConfig(llm.url) }, (input) => run({ ...input, llm }))
255 }).pipe(Effect.provide(TestLLMServer.layer))
256}
257
258function withFakeLlmProject<A, E>(
259 serverPath: ServerPath,

Callers 1

Calls 3

testProviderConfigFunction · 0.90
withProjectFunction · 0.70
runFunction · 0.50

Tested by

no test coverage detected