feat(server): turn the LiteLLM proxy off by default (P1.1)
Every sidecar start outside the desktop app looked for Python, probed
each interpreter for litellm and, when it found one, started a LiteLLM
child. The community edition must not need Python, so LiteLLM is now
opt-in: startService starts it only when config.json contains
"litellm": { "enabled": true } (WaggleConfig.isLiteLLMEnabled). Otherwise
there is no Python lookup, no LiteLLM health probe and no child process,
and the built-in provider proxy serves every request, as it already did
in the desktop app. --skip-litellm and WAGGLE_SKIP_LITELLM=1 still force
it off.
The lookup for a bundled resources/python/python.exe is removed: no
build ships one. When LiteLLM is enabled it runs on the user's own
Python from PATH.
This commit is contained in:
@@ -120,6 +120,28 @@ describe('WaggleConfig', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('LiteLLM opt-in', () => {
|
||||
it('is off by default and when not explicitly enabled', () => {
|
||||
const configDir = makeTempDir();
|
||||
expect(new WaggleConfig(configDir).isLiteLLMEnabled()).toBe(false);
|
||||
|
||||
fs.writeFileSync(
|
||||
path.join(configDir, 'config.json'),
|
||||
JSON.stringify({ defaultModel: 'claude-sonnet-4-6', providers: {}, litellm: {} }),
|
||||
);
|
||||
expect(new WaggleConfig(configDir).isLiteLLMEnabled()).toBe(false);
|
||||
});
|
||||
|
||||
it('is on when config.json sets litellm.enabled to true', () => {
|
||||
const configDir = makeTempDir();
|
||||
fs.writeFileSync(
|
||||
path.join(configDir, 'config.json'),
|
||||
JSON.stringify({ defaultModel: 'claude-sonnet-4-6', providers: {}, litellm: { enabled: true } }),
|
||||
);
|
||||
expect(new WaggleConfig(configDir).isLiteLLMEnabled()).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('governed CLI config', () => {
|
||||
it('normalizes, deduplicates, and persists the CLI allowlist', () => {
|
||||
const configDir = makeTempDir();
|
||||
|
||||
Reference in New Issue
Block a user