Skip to content

Conversation

@ilopezluna
Copy link
Contributor

The package endpoint is not needed as well as the Package method in model manager.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ilopezluna, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing code maintainability and reducing technical debt by systematically removing unused code related to model packaging. The changes involve excising the ModelPackageRequest data structure, the /models/package HTTP endpoint and its handler, and the Package method from the model manager, along with any associated unnecessary imports. This cleanup streamlines the codebase, making it leaner and easier to understand without impacting current functionality.

Highlights

  • Model Packaging Removal: The entire model packaging functionality, including its API definition, HTTP endpoint, and manager method, has been removed as it was deemed unused.
  • API Definition Cleanup: The ModelPackageRequest struct, previously used for defining model packaging requests, has been deleted from pkg/inference/models/api.go.
  • HTTP Endpoint Deletion: The POST /inference/models/package route and its corresponding handler function handlePackageModel have been removed from pkg/inference/models/http_handler.go.
  • Manager Method Removal: The Package method, responsible for the business logic of packaging models, has been removed from the Manager struct in pkg/inference/models/manager.go.
  • Unused Import Cleanup: Associated unused imports, specifically github.com/docker/model-runner/pkg/internal/utils and github.com/docker/model-runner/pkg/distribution/builder, have been removed.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively removes the unused /package endpoint and its associated logic, including the ModelPackageRequest struct, the handlePackageModel HTTP handler, and the manager.Package method. The changes are clean, self-contained, and align with the goal of removing unnecessary code. The related unused imports are also cleaned up. This is a good code hygiene improvement. I have reviewed the changes and found no issues.

@ilopezluna ilopezluna requested a review from a team December 16, 2025 19:04
@ilopezluna ilopezluna marked this pull request as ready for review December 16, 2025 19:04
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

# Conflicts:
#	pkg/inference/models/http_handler.go
@ilopezluna ilopezluna merged commit deee70f into main Dec 17, 2025
6 of 9 checks passed
@ilopezluna ilopezluna deleted the remove-unused-endpoint branch December 17, 2025 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants