Skip to content

feat: switch to the modelpack model-spec#415

Merged
chlins merged 1 commit intomainfrom
feat/bump-modelpack
Feb 12, 2026
Merged

feat: switch to the modelpack model-spec#415
chlins merged 1 commit intomainfrom
feat/bump-modelpack

Conversation

@chlins
Copy link
Member

@chlins chlins commented Feb 12, 2026

This pull request updates the codebase to use the new github.com/modelpack/model-spec/specs-go/v1 import path instead of the deprecated github.com/dragonflyoss/model-spec/specs-go/v1, and updates related code references accordingly. It also updates a constant annotation key to reflect the correct organization.

Closes #317

Dependency and import updates:

  • Replaced all imports of github.com/dragonflyoss/model-spec/specs-go/v1 with github.com/modelpack/model-spec/specs-go/v1 throughout the codebase and tests to use the new canonical model spec package. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Code and constant updates:

  • Updated all references to legacymodelspec types and constants in pkg/backend/attach.go to use modelspec equivalents, ensuring consistency with the new import. [1] [2] [3]
  • Changed the value of the annotationModelfile constant from "org.cnai.modctl.modelfile" to "org.cncf.modctl.modelfile" in pkg/backend/build.go to reflect the correct organization namespace.

@chlins chlins added the enhancement New feature or request label Feb 12, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @chlins, 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 performs a significant dependency migration, moving the project's reliance from a deprecated model-spec package to its new, canonical location under the modelpack organization. This change ensures the project utilizes the most current and officially supported model specification, enhancing maintainability and future compatibility. Additionally, an organizational annotation key has been corrected to align with the updated branding.

Highlights

  • Model Spec Migration: The codebase has been updated to use the new github.com/modelpack/model-spec/specs-go/v1 import path, replacing the deprecated github.com/dragonflyoss/model-spec/specs-go/v1 across all relevant files and tests.
  • Annotation Key Update: The annotationModelfile constant in pkg/backend/build.go has been changed from "org.cnai.modctl.modelfile" to "org.cncf.modctl.modelfile" to reflect the correct organizational namespace.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • pkg/backend/attach.go
    • Replaced legacymodelspec with modelspec for media type priority mapping.
    • Updated legacymodelspec.Model to modelspec.Model for model configuration.
    • Changed legacymodelspec references to modelspec for media type definitions in the getProcessor function.
  • pkg/backend/attach_test.go
    • Updated the model-spec import path.
  • pkg/backend/build.go
    • Updated the model-spec import path.
    • Changed the annotationModelfile constant value.
  • pkg/backend/build/builder.go
    • Updated the model-spec import path.
  • pkg/backend/build/builder_test.go
    • Updated the model-spec import path.
  • pkg/backend/processor/code_test.go
    • Updated the model-spec import path.
  • pkg/backend/processor/doc_test.go
    • Updated the model-spec import path.
  • pkg/backend/processor/model_config_test.go
    • Updated the model-spec import path.
  • pkg/backend/processor/model_test.go
    • Updated the model-spec import path.
  • test/mocks/backend/build/builder.go
    • Updated the model-spec import path.
Activity
  • No specific activity (comments, reviews, or progress updates) has been recorded for this pull request yet.
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.

@chlins chlins enabled auto-merge (squash) February 12, 2026 08:18
Copy link

@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 correctly updates the import paths from github.com/dragonflyoss/model-spec/specs-go/v1 to github.com/modelpack/model-spec/specs-go/v1 and updates the annotation key as described. The changes are mostly mechanical but well-executed. I've identified one area in pkg/backend/attach.go where the code can be refactored to improve maintainability by reducing duplication. My suggestion is to adopt a more data-driven approach for selecting processors.

@chlins chlins force-pushed the feat/bump-modelpack branch from 1758d73 to d79e7b4 Compare February 12, 2026 08:27
Signed-off-by: chlins <chlins.zhang@gmail.com>
@chlins chlins force-pushed the feat/bump-modelpack branch from d79e7b4 to 83bef26 Compare February 12, 2026 08:46
Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

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

LGTM

@chlins chlins merged commit b21be44 into main Feb 12, 2026
4 of 7 checks passed
@chlins chlins deleted the feat/bump-modelpack branch February 12, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modctl is still using legacy dependency github.com/dragonflyoss/model-spec in various places

2 participants