From e95ec1dd2a631a5d8790cedbe770baa95f048d94 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 25 May 2026 21:38:58 +0300 Subject: chore(provisioning): remove dead LiteLLM decommission code LiteLLM was a legacy inference proxy that was removed from the stack months ago. The SSH-based decommission helper and its script generator were kept as cleanup guardrails, but they add unnecessary round-trips and YAGNI surface. Remove: - ProvisioningScripts#litellm_decommission_script - RemoteProvisioner#decommission_litellm - Call sites in ProvisioningOrchestrator#run and ModelSwitcher#switch No remaining references in the codebase. Legacy Hyperstack cloud firewall rule cleanup (port 4000) intentionally remains in ProvisioningOrchestrator#legacy_litellm_rules. --- lib/hyperstack/model_switcher.rb | 1 - lib/hyperstack/provisioning.rb | 21 --------------------- lib/hyperstack/provisioning_orchestrator.rb | 1 - 3 files changed, 23 deletions(-) (limited to 'lib') diff --git a/lib/hyperstack/model_switcher.rb b/lib/hyperstack/model_switcher.rb index 07f6cdb..379855c 100644 --- a/lib/hyperstack/model_switcher.rb +++ b/lib/hyperstack/model_switcher.rb @@ -27,7 +27,6 @@ module HyperstackVM host = state['public_ip'] raise Error, 'No public IP in state file.' if host.nil? || host.empty? - @provisioner.decommission_litellm(host) @provisioner.stop_vllm_container(host, old_container) if old_container != new_container info "Starting vLLM with preset '#{preset_name}' (#{preset['model']})..." diff --git a/lib/hyperstack/provisioning.rb b/lib/hyperstack/provisioning.rb index 2738275..19a3d33 100644 --- a/lib/hyperstack/provisioning.rb +++ b/lib/hyperstack/provisioning.rb @@ -257,21 +257,6 @@ module HyperstackVM script.join("\n") end - def litellm_decommission_script - script = [] - script << 'set -euo pipefail' - script << 'sudo systemctl stop litellm 2>/dev/null || true' - script << 'sudo systemctl disable litellm 2>/dev/null || true' - script << 'sudo rm -f /etc/systemd/system/litellm.service' - script << 'sudo systemctl daemon-reload' - script << 'sudo rm -f /ephemeral/litellm-config.yaml' - script << 'sudo rm -rf /ephemeral/litellm-env' - script << 'sudo rm -f /ephemeral/litellm.log' - script << "sudo ufw --force delete allow from #{Shellwords.escape(@config.wireguard_subnet)} to any port 4000 proto tcp >/dev/null 2>&1 || true" - script << 'echo litellm-decommission-ok' - script.join("\n") - end - private def normalized_model_list(models) @@ -336,12 +321,6 @@ module HyperstackVM raise Error, "vLLM install failed: #{output.strip}" unless status.success? end - def decommission_litellm(host) - info "Removing deprecated LiteLLM service from #{host} if present..." - output, status = @ssh_stream_runner.call(host, @scripts.litellm_decommission_script) - raise Error, "LiteLLM decommission failed: #{output.strip}" unless status.success? - end - def setup_vllm_stack(host, preset_config: nil) install_vllm(host, preset_config: preset_config) end diff --git a/lib/hyperstack/provisioning_orchestrator.rb b/lib/hyperstack/provisioning_orchestrator.rb index 8abfec8..7dbb10e 100644 --- a/lib/hyperstack/provisioning_orchestrator.rb +++ b/lib/hyperstack/provisioning_orchestrator.rb @@ -30,7 +30,6 @@ module HyperstackVM @state_store.save(state) @ssh_runner.ensure_trusted_host(state['public_ip']) - @provisioner.decommission_litellm(state['public_ip']) if @config.guest_bootstrap_enabled? && state['bootstrapped_at'].nil? @provisioner.bootstrap_guest(state['public_ip']) -- cgit v1.2.3