Version v2.0.1#8
Conversation
…d stricter checks
…d stricter checks
#7) * fix: change default base URLs from localhost to 127.0.0.1 to prevent Windows IPv6 resolution issues, pass model_id to llama-cpp, and correct model path parsing in the sweep command. * fix(llama_cpp): Correct model_id fallback and improve test robustness * test: improve llama-cpp backend tests for cleanup and backend name handling
There was a problem hiding this comment.
Pull request overview
Updates local-backend defaults and CI/testing around the v2.0.1 release, primarily to improve Windows localhost reliability and tighten llama.cpp backend behavior.
Changes:
- Switch default local HTTP base URLs from
localhostto127.0.0.1across resolver, backends, tests, and docs. - Update
LlamaCppBackendto require amodel_id, include it in the/completionpayload, and fall back to thatmodel_idwhen the server response omitsmodel. - Improve CLI sweep
--modelsparsing to handle extra=characters; add new unit tests and Codecov/coverage workflow config.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/test_resolve.py | Updates expected default base URLs to 127.0.0.1. |
| tests/unit/test_openai_compat.py | Updates base URL + request URL expectations to 127.0.0.1. |
| tests/unit/test_llama_cpp_payload.py | New async unit test asserting llama.cpp payload includes model. |
| tests/unit/test_llama_cpp_fallback.py | New async unit test asserting response model_id fallback behavior. |
| tests/unit/test_cli_parsing.py | New unit test covering robust --models parsing with extra =. |
| src/infer_check/resolve.py | Updates default resolver URLs/docs to 127.0.0.1. |
| src/infer_check/cli.py | Adjusts sweep parsing to strip leading = from paths after split. |
| src/infer_check/backends/vllm_mlx.py | Updates default base URL and docstring to 127.0.0.1. |
| src/infer_check/backends/llama_cpp.py | Requires model_id, includes it in request payload, improves connect error message, and adjusts result model_id fallback. |
| src/infer_check/backends/base.py | Passes model_id into LlamaCppBackend; updates default URLs and error message example. |
| README.md | Updates example base URLs to 127.0.0.1. |
| pyproject.toml | Adds pytest-asyncio to dev dependencies. |
| codecov.yml | Adds Codecov configuration. |
| .github/workflows/coverage.yml | Updates CI workflow steps for uv + Codecov uploads (but currently has an issue with pytest coverage upload). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Run tests with coverage | ||
| run: uv run pytest --cov=src --cov-branch --cov-report=xml | ||
| run: uv run pytest --cov --junitxml=junit.xml -o junit_family=legacy | ||
|
|
||
| - name: Run Mypy | ||
| run: uv run mypy src --cobertura-xml-report mypy_report | ||
|
|
||
| - name: Upload coverage to Codecov | ||
| - name: Upload mypy coverage | ||
| uses: codecov/codecov-action@v5 | ||
| if: "!cancelled()" | ||
| with: | ||
| files: ./coverage.xml, ./mypy_report/cobertura.xml | ||
| flags: pytest,mypy | ||
| files: ./mypy_report/cobertura.xml | ||
| flags: mypy | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
| slug: ${{ github.repository }} | ||
| fail_ci_if_error: 'true' | ||
|
|
||
| - name: Upload pytest cov | ||
| if: ${{ !cancelled() }} | ||
| uses: codecov/codecov-action@v5 | ||
| with: | ||
| files: ./junit.xml | ||
| flags: pytest |
There was a problem hiding this comment.
The workflow no longer generates or uploads pytest coverage data to Codecov: pytest --cov here doesn’t produce coverage.xml, and the “Upload pytest cov” step is uploading junit.xml as coverage (JUnit is a test-results format, not a coverage report). With fail_ci_if_error: 'true', this is likely to fail the workflow and/or result in missing coverage.
Suggested fix: generate a coverage artifact (e.g., --cov=src --cov-branch --cov-report=xml:coverage.xml or --cov-report=lcov), and upload that file in the coverage upload step; keep junit.xml only for the report_type: test_results upload (or remove files: so Codecov can auto-detect the coverage output).
No description provided.