diff --git a/scripts/ci/amd/amd_ci_install_dependency.sh b/scripts/ci/amd/amd_ci_install_dependency.sh index 8ef905960..5c997d1d2 100755 --- a/scripts/ci/amd/amd_ci_install_dependency.sh +++ b/scripts/ci/amd/amd_ci_install_dependency.sh @@ -72,6 +72,16 @@ install_with_retry() { return 1 } +# The anthropic SDK passes `socket_options` to httpx.HTTPTransport, which only +# exists in httpx>=0.25.0. The CI image ships an older httpx, and several deps +# installed below (lmms-eval, aiter's requirements.txt, etc.) can pull a stale +# httpx back in, so test_anthropic_server fails with: +# TypeError: HTTPTransport.__init__() got an unexpected keyword argument 'socket_options' +# Call this as the LAST pip operation so nothing can downgrade httpx afterwards. +ensure_httpx() { + install_with_retry docker exec ci_sglang pip install --cache-dir=/sgl-data/pip-cache --upgrade 'httpx>=0.25.0' +} + # Helper function to git clone with retries git_clone_with_retry() { local repo_url="$1" @@ -212,6 +222,7 @@ if docker exec ci_sglang test -d /sgl-workspace/mori; then fi if [[ -n "${SKIP_AITER_BUILD}" ]]; then + ensure_httpx exit 0 fi @@ -332,6 +343,10 @@ fi echo "[CI-AITER-CHECK] === AITER VERSION CHECK END ===" +# Must be the final pip operation: force httpx>=0.25.0 so the anthropic SDK can +# construct its httpx transport (see ensure_httpx definition above). +ensure_httpx + # # Clear pre-built AITER kernels from Docker image to avoid segfaults # # The Docker image may contain pre-compiled kernels incompatible with the current environment