litellm/tests/test_litellm/proxy/client/cli
devin-ai-integration[bot] f9c6eda909
fix(cli): quote the Claude Code apiKeyHelper for cmd.exe on Windows (#39174)
* fix(cli): quote the Claude Code apiKeyHelper for cmd.exe on Windows

lite up and lite login --config-claude wrote the helper command with
POSIX shlex quoting, so a backslashed Windows install path came out
wrapped in single quotes that cmd.exe and PowerShell take literally.
Quote every token with the cmd.exe rules already used for agent shims
when running on Windows, and keep the POSIX output unchanged elsewhere.

Resolves LIT-6627

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(cli): split the Windows apiKeyHelper with cmd.exe and C runtime rules

The invocation test pulled tokens back out with a regex, which cannot see
the doubled quotes or the percent guard quote_for_cmd emits. Model the two
parsers that read the helper on Windows instead and check argv round
trips for backslashed, spaced, metacharacter, percent and quoted tokens

---------

Co-authored-by: yassin <yassin@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-01 15:08:00 -07:00
..
autoroute fix(cli): keep an existing ENABLE_TOOL_SEARCH value 2026-08-31 06:00:45 +00:00
__init__.py Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
test_agents.py fix(cli): keep an existing ENABLE_TOOL_SEARCH value 2026-08-31 06:00:45 +00:00
test_auth_commands.py feat(cli): set ENABLE_TOOL_SEARCH=true for lite claude 2026-08-31 05:52:17 +00:00
test_claude_settings.py fix(cli): quote the Claude Code apiKeyHelper for cmd.exe on Windows (#39174) 2026-09-01 15:08:00 -07:00
test_config_commands.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_credentials_commands.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_encryption_commands.py feat(proxy): add AES-256-GCM at-rest credential encryption with versioned format and re-encryption migration (#31215) 2026-06-29 20:14:22 +02:00
test_global_options.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_keys_commands.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_model_groups_commands.py feat(cli): add lite up/down to ambiently route Claude Code through the proxy (#33231) 2026-07-15 21:46:02 -07:00
test_models_commands.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_pkce_login.py test: require a match= on broad pytest.raises, and drop duplicate parametrize cases (#37769) 2026-08-20 20:24:49 -07:00
test_up_commands.py fix(cli): quote the Claude Code apiKeyHelper for cmd.exe on Windows (#39174) 2026-09-01 15:08:00 -07:00
test_users_commands.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00