MCPcopy Create free account
hub / github.com/EvoMap/evolver / makeDispatch

Function makeDispatch

test/proxyBedrock.test.js:567–574  ·  view source on GitHub ↗
(proxy)

Source from the content-addressed store, hash-verified

565 // closure with opts.upstreamMode rather than env, mirroring how the
566 // closure is actually called in production.
567 function makeDispatch(proxy) {
568 return (reqPath, body, opts) => {
569 const mode = opts?.upstreamMode || 'anthropic';
570 return mode === 'bedrock'
571 ? proxy._proxyBedrock(reqPath, body, opts)
572 : proxy._proxyAnthropic(reqPath, body, opts);
573 };
574 }
575
576 it('opts.upstreamMode unset → _proxyAnthropic', async () => {
577 const proxy = new EvoMapProxy({ logger: { log: () => {}, error: () => {}, warn: () => {} } });

Callers 1

Calls 2

_proxyBedrockMethod · 0.80
_proxyAnthropicMethod · 0.80

Tested by

no test coverage detected