Repository navigation
internal: rename provider to engine, catalog to resolve, module to llm-helper - #59
Merged
Merged
Conversation
…m-helper First step of moving engine, model and recipe knowledge out of Go and into the catalogue. Each catalogue kind is now read by the internal package of the same name (engine, recipe, hardware), and the package that combines them with a model's card no longer shares a name with catalogue/. The module path matches the repo. No behaviour change. On-disk names (the config dir, VLLM_HELPER_* env vars, PROVIDER, VLLM_BIN, service names) are unchanged.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues require changes to the package and module renaming refactor.
No open issues 🎉
What changed in this PR
This refactor aligns internal package names with the catalogue structure, preparing for more engine, model, and recipe knowledge to move into data definitions. It preserves existing configuration keys, on-disk paths, and service names.
Changes:
- Rename
internal/providertointernal/engineandinternal/catalogtointernal/resolve, updating callers and existing tests. - Change both Go module paths to
github.com/coder/llm-helperand update release version-stamping paths. - Update documentation and package comments to describe the renamed packages and layout.
| File | Description |
|---|---|
tools/recipediff/go.mod |
Rename the recipediff module. |
scripts/gendocs/main.go |
Update documentation generator imports. |
main.go |
Update CLI entry-point import. |
internal/web/server.go |
Update server imports. |
internal/web/server_internal_test.go |
Update server test imports. |
internal/web/models.go |
Use renamed engine and resolve packages. |
internal/web/docssite.go |
Update embedded documentation import. |
internal/web/docssite_internal_test.go |
Update documentation-site test import. |
internal/web/docs.go |
Update documentation renderer import. |
internal/web/docs_internal_test.go |
Update documentation test import. |
internal/web/api.go |
Update API handler imports. |
internal/web/activate.go |
Update profile activation imports. |
internal/vllm/validate.go |
Update configuration import. |
internal/toolchain/toolchain_darwin.go |
Update macOS detection import. |
internal/resolve/tiktoken.go |
Rename package and update imports. |
internal/resolve/tiktoken_internal_test.go |
Move tokenizer tests into resolve. |
internal/resolve/resolve.go |
Rename catalog package and use engine types. |
internal/resolve/resolve_internal_test.go |
Adapt existing tests to renamed packages. |
internal/recipe/validate_internal_test.go |
Update catalogue import. |
internal/recipe/tested.go |
Use engine lookup and model types. |
internal/recipe/tested_internal_test.go |
Update hardware test import. |
internal/recipe/local.go |
Update package name in loading-order comment. |
internal/recipe/launch.go |
Use engine launch and staging types. |
internal/recipe/container.go |
Use engine mount type. |
internal/recipe/args.go |
Update hardware import. |
internal/profile/profile.go |
Update profile dependencies. |
internal/profile/profile_test.go |
Update profile test imports. |
internal/profile/generated_test.go |
Update generated-profile test imports. |
internal/plugin/spark/spark.go |
Update Spark plugin imports. |
internal/plugin/registry.go |
Update configuration import. |
internal/plugin/registry_internal_test.go |
Update registry test import. |
internal/plugin/plugin.go |
Update plugin interface dependencies. |
internal/plugin/coder/sync.go |
Use renamed engine lookup. |
internal/plugin/coder/sync_internal_test.go |
Update sync test imports. |
internal/plugin/coder/route_test.go |
Update Coder plugin import. |
internal/plugin/coder/prune_test.go |
Update Coder plugin import. |
internal/plugin/coder/options_internal_test.go |
Update configuration test import. |
internal/plugin/coder/client_test.go |
Update Coder client test import. |
internal/plugin/coder/adopt_test.go |
Update Coder adoption test import. |
internal/nodes/registry.go |
Update configuration import. |
internal/hf/testsupport.go |
Name resolve in test-support comment. |
internal/hf/snippet.go |
Update configuration import. |
internal/hardware/hardware.go |
Update embedded catalogue import. |
internal/hardware/hardware_test.go |
Update hardware test import. |
internal/engine/registry.go |
Rename provider package and package comment. |
internal/engine/registry_test.go |
Adapt registry tests to engine naming. |
internal/engine/local.go |
Rename package to engine. |
internal/engine/engine.go |
Rename package and update dependencies. |
internal/engine/engine_test.go |
Adapt engine definition tests to new package. |
internal/detect/report.go |
Update hardware import. |
internal/detect/process.go |
Update configuration import. |
internal/detect/process_internal_test.go |
Update process test import. |
internal/detect/hardware_test.go |
Update detection test import. |
internal/detect/hardware_internal_test.go |
Update hardware test import. |
internal/detect/fixtures_internal_test.go |
Update fixture test import. |
internal/detect/endpoint_test.go |
Update endpoint test import. |
internal/detect/container_test.go |
Update container test import. |
internal/detect/classify.go |
Update hardware classification import. |
internal/control/gpus.go |
Update GPU control imports. |
internal/control/gguf.go |
Update GGUF support imports. |
internal/control/control.go |
Use engine lookup and constants. |
internal/control/control_internal_test.go |
Update control test imports. |
internal/config/shellwords_test.go |
Update shell parsing test import. |
internal/config/config_test.go |
Update configuration test import. |
internal/cli/watch.go |
Update restart observer imports. |
internal/cli/watch_internal_test.go |
Update observer test imports. |
internal/cli/vllmbin_internal_test.go |
Update binary discovery test import. |
internal/cli/vllmargs.go |
Use engine interfaces and serve specifications. |
internal/cli/vllmargs_internal_test.go |
Adapt serve argument tests to engine types. |
internal/cli/upgrade.go |
Update upgrade imports. |
internal/cli/upgrade_internal_test.go |
Update upgrade test imports. |
internal/cli/start.go |
Update startup imports. |
internal/cli/shardcmd.go |
Update shard command imports. |
internal/cli/shard_mp.go |
Update multiprocessing shard imports. |
internal/cli/shard_internal_test.go |
Use engine specification in shard tests. |
internal/cli/setup.go |
Use renamed engine registry and constants. |
internal/cli/service.go |
Update service command imports. |
internal/cli/serve.go |
Update web server import. |
internal/cli/search.go |
Use resolve results and engine lookup. |
internal/cli/run_test.go |
Update CLI import and binary build target. |
internal/cli/root.go |
Load local definitions through engine package. |
internal/cli/recipes.go |
Update recipe import. |
internal/cli/recipes_internal_test.go |
Update recipe test import. |
internal/cli/recipelaunch.go |
Use engine constants for recipe profiles. |
internal/cli/recipelaunch_internal_test.go |
Adapt local engine setup in tests. |
internal/cli/recipehealth.go |
Update recipe health imports. |
internal/cli/recipehealth_internal_test.go |
Update health test import. |
internal/cli/profiles.go |
Use resolve planning and engine lookup. |
internal/cli/poolserve.go |
Update pool serving imports. |
internal/cli/plugins.go |
Update plugin registration imports. |
internal/cli/nodecmd.go |
Update node command imports. |
internal/cli/nodecmd_internal_test.go |
Update node command test imports. |
internal/cli/node_test.go |
Update node registry test import. |
internal/cli/metallimit.go |
Update configuration import. |
internal/cli/metallimit_other.go |
Update non-macOS imports. |
internal/cli/metallimit_internal_test.go |
Update Metal limit test import. |
internal/cli/metallimit_darwin.go |
Update macOS Metal limit imports. |
internal/cli/metal_darwin.go |
Update Metal probe imports. |
internal/cli/memfit.go |
Update memory sizing imports. |
internal/cli/memfit_linux.go |
Update Linux detection import. |
internal/cli/memfit_internal_test.go |
Update memory sizing test import. |
internal/cli/memfit_darwin.go |
Update macOS detection import. |
internal/cli/memfit_darwin_internal_test.go |
Update macOS sizing test import. |
internal/cli/hardwarecmd.go |
Update hardware command imports. |
internal/cli/hardware_test.go |
Update hardware test import. |
internal/cli/ggufplugin.go |
Update GGUF command imports. |
internal/cli/gendocs.go |
Update embedded documentation import. |
internal/cli/gendocs_internal_test.go |
Update reference-generation test import. |
internal/cli/enginescmd.go |
Use renamed engine registry and types. |
internal/cli/engines_test.go |
Adapt local engine directory tests. |
internal/cli/engines_internal_test.go |
Use engine model and snapshot helpers. |
internal/cli/editset.go |
Use engine key and profile validation lookup. |
internal/cli/doctor_internal_test.go |
Update diagnostic test imports. |
internal/cli/detectcmds.go |
Use engine registry in diagnostics. |
internal/cli/clusterrunner.go |
Update cluster runner imports. |
internal/cli/clusterrunner_internal_test.go |
Update cluster runner test import. |
internal/cli/capabilities.go |
Update capability probe imports. |
go.mod |
Rename the root module. |
docs/providers.md |
Point contributor guidance to engine tests. |
docs/docs_test.go |
Update documentation package import. |
cmd/vllm-helper-docs/main.go |
Update documentation server import. |
catalogue/engines/README.md |
Point catalogue guidance to engine tests. |
AGENTS.md |
Document catalogue-to-package layout. |
.goreleaser.yaml |
Update version and commit linker paths. |
Review effort: Balanced
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.
First PR in moving engine, model and recipe knowledge out of Go and into the catalogue. After this, each catalogue kind is read by the internal package with the same name, so a contributor can tell where things live from the folder names.
Changes
internal/providerinternal/engine(readscatalogue/engines/)internal/cataloginternal/resolve(combines engine, recipe and the model's card and config into launch settings)github.com/coder/vllm-helpergithub.com/coder/llm-helper, includingtools/recipediffand the goreleaser version ldflagsinternal/recipeandinternal/hardwarealready matchedcatalogue/recipes/andcatalogue/hardware/. Files inside the moved packages were renamed to match (provider.gotoregistry.go,catalog.gotoresolve.go). AGENTS.md's layout section states the convention.No behaviour change. On-disk names stay the same:
~/.config/vllm-helper,VLLM_HELPER_*env vars,PROVIDER,VLLM_BIN,VLLM_API_KEYand the service names. No CHANGELOG entry, since nothing user-visible changed.Verification
gofmt,go veton Linux and macOS,go test -race ./..., builds for linux/amd64 and darwin/arm64.-X github.com/coder/llm-helper/internal/cli.Version=9.9.9reportsllm-helper 9.9.9, so the release ldflags still land.