You are my setup assistant. Goal: when my Claude subscription hits its limit, I keep working in Claude Code on the free NVIDIA Build models (Kimi K3, DeepSeek V4.1 Flash, GLM 5.3, GLM 5.3 Flash) through a local LiteLLM proxy. The plain claude command must stay on my subscription.

I will not paste my NVIDIA key (it starts with nvapi-) into the chat: I will put it into the file you create.

Work step by step and briefly report the result after each step:
1. Detect the system: macOS, Linux or Windows. Check whether uv is installed. If not, install it with the official command from astral.sh. Install LiteLLM with uv tool install 'litellm[proxy]' and show litellm --version.
2. Create the folder ~/.litellm (on Windows %USERPROFILE%\.litellm) and in it the file nvidia.yaml with exactly this content:
# LiteLLM: Claude Code -> free NVIDIA Build models (build.nvidia.com)
# Run: litellm --config ~/.litellm/nvidia.yaml --host 127.0.0.1 --port 4000
model_list:
  - model_name: kimi-k3
    litellm_params:
      model: nvidia_nim/moonshotai/kimi-k3
      api_key: os.environ/NVIDIA_NIM_API_KEY
  - model_name: deepseek-v4.1-flash
    litellm_params:
      model: nvidia_nim/deepseek-ai/deepseek-v4.1-flash
      api_key: os.environ/NVIDIA_NIM_API_KEY
  - model_name: glm-5.3
    litellm_params:
      model: nvidia_nim/z-ai/glm-5.3
      api_key: os.environ/NVIDIA_NIM_API_KEY
  - model_name: glm-5.3-flash
    litellm_params:
      model: nvidia_nim/z-ai/glm-5.3-flash
      api_key: os.environ/NVIDIA_NIM_API_KEY

litellm_settings:
  drop_params: true      # drop parameters the model does not accept
  request_timeout: 600
  num_retries: 2         # retry on 429: the limit is 40 requests a minute

general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY

3. In the same folder create nvidia.env with two lines: NVIDIA_NIM_API_KEY=nvapi-PASTE-YOUR-KEY and LITELLM_MASTER_KEY=sk-local- followed by 24 random Latin letters and digits. On macOS and Linux set its permissions to 600. Open the file for me in an editor and wait until I paste the key and write "done". Do not read the file and never print the key.
4. After "done", test the key with one request to NVIDIA: POST https://integrate.api.nvidia.com/v1/chat/completions, header Authorization: Bearer with the key from nvidia.env, model moonshotai/kimi-k3, message "Answer in one word: working?", max_tokens 300. Show only the status code and the model's text.
5. Create the launcher. On macOS and Linux it is ~/.local/bin/claude-nvidia, executable: it loads ~/.litellm/nvidia.env, starts litellm --config ~/.litellm/nvidia.yaml --host 127.0.0.1 --port 4000 in the background with its log in ~/.litellm/proxy.log if the proxy does not yet answer on /health/liveliness, and runs claude "$@" with ANTHROPIC_BASE_URL=http://127.0.0.1:4000, ANTHROPIC_AUTH_TOKEN=the LITELLM_MASTER_KEY value, ANTHROPIC_MODEL, ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL and CLAUDE_CODE_SUBAGENT_MODEL set to $NV_MODEL or kimi-k3, ANTHROPIC_DEFAULT_HAIKU_MODEL=glm-5.3-flash, CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1, CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1. On Windows do the same as %USERPROFILE%\.litellm\claude-nvidia.ps1 and clear those variables after claude exits. Make sure the script's folder is on PATH.
6. Start the proxy and test it with an Anthropic-format request: POST http://127.0.0.1:4000/v1/messages, headers Authorization: Bearer with LITELLM_MASTER_KEY and anthropic-version: 2023-06-01, model kimi-k3, max_tokens 300. Show the status code and the text.
7. Explain in four lines: how I work normally, how I switch to free mode (claude-nvidia, and claude-nvidia -c continues the last conversation in the folder), how to pick another model (NV_MODEL=deepseek-v4.1-flash claude-nvidia) and where the log is.

Rules: never write the key into project files, git or this chat. Do not change ~/.claude/settings.json. Delete nothing. If a command fails, show the error and propose a fix before going further.