Skip to content

chat: vLLM preflight strips every '/v1' from the base URL, not just the suffix #446

Description

@amd-vivekag

From the PR #422 Copilot re-review (suppressed comment, src/aorta/chat/inference/providers/local_vllm.py:44). Verified live on 1090cd26.

url = settings.vllm_base_url.rstrip("/").replace("/v1", "") + "/health"

str.replace removes every occurrence. A valid base such as https://host/v1-gateway/v1 becomes https://host-gateway/health, so preflight polls a URL that does not exist and reports a healthy server unreachable after the full timeout.

Fix: strip only a trailing /v1 --

base = settings.vllm_base_url.rstrip("/")
url = (base[: -len("/v1")] if base.endswith("/v1") else base) + "/health"

Small, but it wants a couple of table-driven cases (plain host, trailing /v1, /v1 in a path segment, no /v1 at all) rather than a one-line change, and it is unrelated to the review classes #422 was addressing.

Also worth checking in the same pass: remote_openai / remote_litellm do not do this, so this is the only site.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions