the fde-174 cache resolver rewrites engine_args.model to an on-disk snapshot path when the model is found only under a lowercased hf cache dir. the openai served model name is derived from engine_args.model, so it silently became the filesystem path and requests using the real repo id returned 404. set served_model_name to the original repo id whenever the model is rewritten to a path, unless an explicit served name (or OPENAI_SERVED_MODEL_NAME_OVERRIDE) is provided. add the first python tests in the repo (tests/) covering the cache-path resolution and served-name decoupling, plus a Tests github workflow that runs pytest on prs and pushes to main. vllm/torch are stubbed when absent so the suite runs on a plain cpu runner.
33 lines
573 B
YAML
33 lines
573 B
YAML
name: Tests
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- "**"
|
|
push:
|
|
branches:
|
|
- "main"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
pytest:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Install test dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r tests/requirements.txt
|
|
|
|
- name: Run unit tests
|
|
run: python -m pytest tests -v
|