Skip to content

feat: add license compliance scanning for GGUF models#188

Merged
Defilan merged 5 commits intomainfrom
feat/license-compliance
Feb 28, 2026
Merged

feat: add license compliance scanning for GGUF models#188
Defilan merged 5 commits intomainfrom
feat/license-compliance

Conversation

@Defilan
Copy link
Member

@Defilan Defilan commented Feb 27, 2026

Summary

  • Extract general.license from GGUF file metadata via the parser
  • Add License field to GGUFMetadata in the Model CRD
  • Normalize GGUF license strings to known SPDX IDs in the controller
  • Add pkg/license package with license database and Normalize() function
  • Add llmkube license check command that reads license from deployed k8s Model resources
  • Add llmkube license list command to browse known licenses
  • Surface license in llmkube inspect output from GGUF file metadata
  • Remove hardcoded license fields from catalog — GGUF metadata is the source of truth

Closes #23

Test plan

  • go test ./pkg/license/... — license database lookup, normalization, properties
  • go test ./pkg/gguf/... — GGUF parser license extraction
  • go test ./pkg/cli/... — catalog and CLI integration
  • E2E: license list — table headers, known license IDs and names, help docs
  • E2E: license check — non-existent model error, missing GGUF metadata message, patched license status output, unknown license handling
  • Manual: llmkube catalog list — no LICENSE column
  • Manual: llmkube catalog info llama-3.1-8b — no license section
  • Manual: llmkube inspect <model.gguf> — shows license from file metadata
  • Manual: llmkube license list — shows known license types
  • Manual: llmkube license check <model-name> — reads license from deployed model

Extract license metadata from GGUF files, add license fields to the
model catalog, and surface license details (commercial use, restrictions)
in the CLI via catalog list/info, inspect, and a new license command.

Closes #23

Signed-off-by: Christopher Maher <chris@mahercode.io>
@Defilan Defilan force-pushed the feat/license-compliance branch from 549dc75 to 60ef5d2 Compare February 27, 2026 17:31
Remove hardcoded license fields from the model catalog and instead
rely on license metadata extracted from GGUF files at download time.
This eliminates the maintenance burden of manually curating license
info for every catalog entry.

- Remove `license` field from all catalog models and the Model struct
- Remove LICENSE column from `catalog list` and license section from
  `catalog info`
- Rework `license check` to read from deployed k8s Model resources
  (Status.GGUF.License) with --namespace flag support
- Normalize GGUF license strings via license.Normalize() in the
  controller before storing in status
- Fix Normalize() false-matching "permit"/"limited" as "mit"
- Update tests accordingly

Signed-off-by: Defilan <defilan@users.noreply.github.com>
Signed-off-by: Christopher Maher <chris@mahercode.io>
Signed-off-by: Defilan <defilan@users.noreply.github.com>
Signed-off-by: Christopher Maher <chris@mahercode.io>
Covers license list output (table headers, known IDs) and license check
with cluster integration (non-existent model, missing GGUF metadata,
patched license status, unknown license handling).

Signed-off-by: Christopher Maher <chris@mahercode.io>
…exist

The license check e2e tests were in a separate top-level Describe block
that ran before the Manager block installed CRDs, causing "no matches
for kind Model" failures. Move cluster-dependent tests into the Manager
Ordered block so they run after CRD installation and controller deployment.

Signed-off-by: Christopher Maher <chris@mahercode.io>
@Defilan Defilan force-pushed the feat/license-compliance branch from 6c39104 to 6c452e1 Compare February 28, 2026 21:06
@Defilan Defilan merged commit c26400a into main Feb 28, 2026
15 checks passed
@Defilan Defilan deleted the feat/license-compliance branch February 28, 2026 21:21
This was referenced Feb 26, 2026
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.

License compliance scanner for GGUF models

1 participant