# >>> claude-mode >>> # Installed by claude-code-switcher. Do not edit between the markers; # re-run install.sh instead. # # `claude-mode` itself is a normal executable on PATH, so nothing here is needed # to use it. This block exists only for the wrapper below. # # settings.json is the single source of truth for gateway config, so any # inherited copy of these variables is stripped before launch: a stale # ANTHROPIC_API_KEY would silently bypass the gateway, and stale # ANTHROPIC_BASE_URL / *_MODEL values would break native Anthropic auth. Only # the child process is affected - the rest of your shell is untouched. claude() { local real real="$(command -v claude 2>/dev/null)" if [ -z "$real" ] || [ "$real" = "claude" ]; then # `command -v` resolved to this function; find the real binary on PATH. real="$(type -P claude 2>/dev/null)" fi if [ -z "$real" ]; then echo "claude: not found on PATH" >&2 return 127 fi env -u ANTHROPIC_API_KEY \ -u ANTHROPIC_AUTH_TOKEN \ -u ANTHROPIC_BASE_URL \ -u ANTHROPIC_DEFAULT_OPUS_MODEL \ -u ANTHROPIC_DEFAULT_SONNET_MODEL \ -u ANTHROPIC_DEFAULT_HAIKU_MODEL \ -u ANTHROPIC_DEFAULT_FABLE_MODEL \ -u CLAUDE_CODE_SUBAGENT_MODEL \ -u CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY \ -u CLAUDE_CODE_ATTRIBUTION_HEADER \ -u CLAUDE_CODE_AUTO_COMPACT_WINDOW \ -u CLAUDE_CODE_MAX_CONTEXT_TOKENS \ -u CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC \ -u API_TIMEOUT_MS \ "$real" "$@" } # <<< claude-mode <<<