feat: Add health_check() method to OllamaAdapter#57
Conversation
|
Hey @gauravxthakur great contribution! The implementation is clean and correct — /api/tags is the right endpoint, Two tiny nitpicks (not blocking):
Neither is a blocker and merging as-is. Thanks for the thorough PR description and for |
|
Thanks @hidai25 for the feedback and for merging! Really glad the httpx decision aligned with the project's direction. Noted on the assert_called_once_with and the TimeoutException test. I'll make sure to include those patterns in my next PR. |
…ge (hidai25#59) ## Summary - Split `[all]` optional dependency extra to exclude `sentence-transformers` (and its ~2GB torch/CUDA transitive deps) - New `[all-local]` extra for users who want local GPU embeddings - Docker image uses `[all]` by default — stays lightweight (~200MB vs ~2.5GB) - Updated design doc and README to reflect the split Closes hidai25#57 ## Design Conformance | # | Requirement | Source | Status | Evidence | |---|---|---|---|---| | 1 | `[all]` extra does NOT include `sentence-transformers` | Issue hidai25#57, AC 1 | CONFORMANT | `pyproject.toml:27` | | 2 | New `[all-local]` extra includes everything | Issue hidai25#57, AC 2 | CONFORMANT | `pyproject.toml:28` | | 3 | Dockerfile uses `--extra all` (no change needed) | Issue hidai25#57, AC 3 | CONFORMANT | `Dockerfile:17,22` | | 4 | `uv.lock` regenerated after the split | Issue hidai25#57, AC 4 | CONFORMANT | uv.lock diff | | 5 | README documents the extras split | Issue hidai25#57, AC 6 | CONFORMANT | `README.md:31-32,45-46` | | 6 | Design doc updated with `[all-local]` | Design doc, lines 773-778 | CONFORMANT | `docs/design.md:778` | Reviewed by @architect-reviewer — all requirements CONFORMANT. ## Test plan - [ ] `uv sync --extra all` does NOT install sentence-transformers - [ ] `uv sync --extra all-local` DOES install sentence-transformers - [ ] `docker build -t test .` produces a slim image (~200MB) - [ ] All 227 existing tests pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Description
Implemented the async health_check() method for OllamaAdapter to verify server availability.
Related Issue
#36
Fixes #36
Type of Change
Changes Made
Testing
Test Configuration
Tests Added/Modified
Manual Testing Steps
Checklist
Code Quality
mypyand fixed any type errorsDocumentation
Testing
Dependencies
Screenshots
Additional Notes
The issue tips suggested using aiohttp. However, after reviewing the current implementation of HTTPAdapter.health_check() and pyproject.toml, I found the project is standardized on httpx. I used httpx to maintain consistency with the existing codebase.
Reviewer Notes
Please verify that the transition to httpx for this adapter aligns with the project's long-term direction, as it differs from the suggestion in the issue description.
By submitting this pull request, I confirm that: