docs: Document runpodctl model commands, Hugging Face mirroring, and config environment variables - #710
docs: Document runpodctl model commands, Hugging Face mirroring, and config environment variables#710promptless[bot] wants to merge 3 commits into
Conversation
Document the previously-undocumented runpodctl model command family (add, list, remove), including the new --wait-for-hash/-v flags on model add and the --hash/--version version-removal flags on model remove from runpodctl PR #302. Add model to the command groups table and register the new reference page in navigation.
Add the --hash-timeout flag to the model add reference and document the RUNPOD_API_KEY, RUNPOD_GRAPHQL_URL, and RUNPOD_API_URL environment variables (which override config file values) introduced in runpodctl PR #302.
| Directory containing the model files to upload. | ||
| </ResponseField> | ||
|
|
||
| <ResponseField name="--wait-for-hash" type="bool" default="false"> |
There was a problem hiding this comment.
Documented the new --wait-for-hash and -v, --verbose flags on runpodctl model add from PR #302's cmd/model/addModelToRepo.go (flag registration and the --wait-for-hash requires --model-path constraint), plus the progress bar and total-model-size output added in the same file.
| Model name. | ||
| </ResponseField> | ||
|
|
||
| <ResponseField name="--owner" type="string"> |
There was a problem hiding this comment.
Documented the new --hash and --version flags on runpodctl model remove from PR #302's cmd/model/removeModel.go, including the mutual-exclusivity check (only one of --hash or --version can be provided) and that a matching version is marked removed rather than deleting the whole model.
| Wait for uploaded model files to finish hashing before the command returns. Requires `--model-path`. When hashing completes, `runpodctl` prints a message confirming the model is ready to deploy along with its model URL. | ||
| </ResponseField> | ||
|
|
||
| <ResponseField name="--hash-timeout" type="duration" default="30m0s"> |
There was a problem hiding this comment.
Documented the new --hash-timeout duration flag on model add; its default of 30m0s and the "0 disables the timeout" behavior come from the flag registration and modelHashWaitTimeout = 30 * time.Minute in cmd/model/addModelToRepo.go.
|
|
||
| ## Environment variables | ||
|
|
||
| You can also configure the CLI using environment variables. When set, these take precedence over the corresponding values in your config file. |
There was a problem hiding this comment.
Documented the RUNPOD_API_KEY, RUNPOD_GRAPHQL_URL, and RUNPOD_API_URL environment variables and their precedence over config values, based on the new internal/configenv/configenv.go package: APIKeyEnv→apiKey, GraphQLURLEnv→apiUrl, RESTURLEnv→restApiUrl, with envOrConfig giving a non-empty env var priority over the config file.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Add coverage for the --huggingface-model flag (runpodctl PR #320, STO-330) that mirrors a Hugging Face model into the Runpod model repository server-side, including source-vs-destination semantics and mutual exclusivity with the local-upload flags.
jebenexer
left a comment
There was a problem hiding this comment.
Local review: checked out this branch against current main (post-#320 merge) — merges cleanly, no conflicts despite being a bit behind. Cross-verified every documented flag and env var against the actual source:
model add/model list/model removeflags matchcmd/model/*.goexactly, including the--huggingface-modelmirroring semantics from the now-merged runpodctl#320.RUNPOD_API_KEY/RUNPOD_GRAPHQL_URL/RUNPOD_API_URLprecedence verified againstinternal/configenv/configenv.go— all correct.- Links to
runpodctl-serverless.mdx/runpodctl-config.mdxresolve. CI (Mintlify deploy/validation, tooltip imports) is clean.
No blockers. Left 2 minor comments (missing required annotations on --name/--owner, and an optional callout for the undocumented RUNPOD_INVOKE_URL). Approving — this is the accurate, current reference and should be the canonical runpodctl model doc (see #644, recommended for closure as a stale duplicate).
| To mirror an existing Hugging Face model into the Runpod model repository, use `--huggingface-model` with the source model in `owner/repo` form. `--name` sets the destination model name in the Runpod repository, and `--owner` is optional when mirroring. | ||
|
|
||
| The transfer runs server-side, so there is no local upload session, file upload, or progress bar. Runpod creates the new model version right away and transfers the files from Hugging Face in the background. | ||
|
|
There was a problem hiding this comment.
Nit: --name isn't marked required here, but the CLI enforces it via cobra.MarkFlagRequired("name") on model add. Similarly, in the "Remove a model" section below, --owner and --name are both mandatory at runtime (runRemoveModel errors with "both --owner and --name must be provided" if either is missing) but neither ResponseField has a required attribute. Worth adding required to these three so users don't have to discover it from a CLI error.
| The Runpod GraphQL API endpoint URL. Overrides the `apiUrl` value in your config file. | ||
| </ResponseField> | ||
|
|
||
| <ResponseField name="RUNPOD_API_URL" type="string"> |
There was a problem hiding this comment.
Verified against internal/configenv/configenv.go on current main — RUNPOD_API_KEY→apiKey, RUNPOD_GRAPHQL_URL→apiUrl, RUNPOD_API_URL→restApiUrl all check out exactly as documented. One optional addition: there's also a fourth env var, RUNPOD_INVOKE_URL (overrides invokeUrl, used for invoking Serverless endpoints specifically rather than the control-plane API). Not a correctness issue since it's arguably out of scope here, just flagging in case you want full coverage on this page.
|
Just a reminder: If you'd like me to act on any feedback you have via Github comments, just type @Promptless in your suggestion and I'll get right on it! (I won't show up in the user dropdown, but I'll process any request that has @Promptless in the comment body.) |
Open this suggestion in Promptless to view citations and reasoning process
Adds a
runpodctl modelreference page covering the model repository commands (add, list, remove), including the--wait-for-hash,--hash-timeout, and-v/--verboseflags onmodel addand the mutually exclusive--hash/--versionversion-removal flags onmodel removeintroduced in runpodctl PR #302. Addsmodelto the CLI overview command groups table and registers the page in navigation. Also documents theRUNPOD_API_KEY,RUNPOD_GRAPHQL_URL, andRUNPOD_API_URLenvironment variables on theconfigreference page, which now reliably override config file values.Also documents the new
--huggingface-modelflag onrunpodctl model add(runpodctl PR #320, STO-330), which mirrors an existing Hugging Face model into the Runpod model repository server-side. The reference page now explains the source (--huggingface-model, inowner/repoform) versus destination (--name) semantics, that--owneris optional when mirroring, and that mirroring cannot be combined with the local-upload flags.Trigger Events
Tip: Add more repositories in your Configuration to keep multiple doc sites in sync 📚