Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request performs a significant cleanup by removing unused functions, structs, and dependencies across the codebase. Key changes include the removal of the llamacpp GPU detection logic and socket handling, the deletion of several builder methods in the distribution package, and the pruning of unused utility functions in the responses and TLS packages. I have no feedback to provide.
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The change in
llamacppWindows download logic now unconditionally selects thecpuvariant and removes GPU capability detection (ShouldUseGPUVariant, nv-gpu-info helpers, gpuinfo_* files); if Windows GPU support is still desired, consider preserving a minimal capability check or clearly marking this as an intentional deprecation of GPU variants on Windows. - The new
metrics.SchedulerInterfacecouples metrics collection tohttp.ResponseWriter/*http.Request; if you intend to reuse it outside HTTP handlers, consider narrowing it to the minimal non-HTTP methods needed (e.g., just returning data structures) and keeping HTTP concerns in the handler layer.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The change in `llamacpp` Windows download logic now unconditionally selects the `cpu` variant and removes GPU capability detection (`ShouldUseGPUVariant`, nv-gpu-info helpers, gpuinfo_* files); if Windows GPU support is still desired, consider preserving a minimal capability check or clearly marking this as an intentional deprecation of GPU variants on Windows.
- The new `metrics.SchedulerInterface` couples metrics collection to `http.ResponseWriter`/`*http.Request`; if you intend to reuse it outside HTTP handlers, consider narrowing it to the minimal non-HTTP methods needed (e.g., just returning data structures) and keeping HTTP concerns in the handler layer.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
The following code is actively used by the Docker Desktop backend (pinata/common/cmd/com.docker.backend/internal/inference/manager.go): - ShouldUseGPUVariant and ShouldUseGPUVariantLock (set via settings) - CanUseGPU() called to detect GPU capability - GPU detection functions (hasCUDA11CapableGPU, hasOpenCL, hasNVIDIAGPU) - ghw, pcidb, howett.net/plist dependencies This code appears unused within model-runner alone, but is consumed by the closed-source Docker Desktop integration.
Contributor
Author
|
@sourcery-ai review |
ericcurtin
approved these changes
Apr 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request primarily removes unused or redundant code throughout the codebase. It eliminates several functions, types, and files that are no longer in use, as well as some third-party dependencies. These changes help reduce technical debt and potential confusion for future development.