MCPcopy
hub / github.com/Doorman11991/smallcode / getChainConfig

Function getChainConfig

src/model/chain.js:42–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40let _chainConfig = null;
41
42function getChainConfig() {
43 // Cache after first read — env vars don't change mid-run
44 if (_chainConfig) return _chainConfig;
45 _chainConfig = {
46 enabled: process.env.SMALLCODE_CHAIN === 'true',
47 classifier: process.env.SMALLCODE_CHAIN_CLASSIFIER || null,
48 planner: process.env.SMALLCODE_CHAIN_PLANNER || null,
49 executor: process.env.SMALLCODE_CHAIN_EXECUTOR || null,
50 baseUrl: process.env.SMALLCODE_CHAIN_BASE_URL
51 || process.env.SMALLCODE_BASE_URL
52 || 'http://localhost:1234/v1',
53 classifierUrl: process.env.SMALLCODE_CHAIN_CLASSIFIER_URL || null,
54 plannerUrl: process.env.SMALLCODE_CHAIN_PLANNER_URL || null,
55 executorUrl: process.env.SMALLCODE_CHAIN_EXECUTOR_URL || null,
56 };
57 return _chainConfig;
58}
59
60// ─── Planner call ──────────────────────────────────────────────────────────
61

Callers 4

callPlannerFunction · 0.85
getExecutorModelFunction · 0.85
getExecutorUrlFunction · 0.85
runAgentLoopFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected