Conversation
- Add deploy capacity list/get/create/scale/renew/delete/unsubscribe, deploy overflow, and deploy operation get/wait commands - Extend deploy API and types for reservation capacity (kTPM), prepaid info, capacity instances and operations - Refactor plan strategies to support the PTU reservation model with bilingual flag validation; keep MU/LORA legacy behavior - Centralize request timeout and abort handling in the HTTP client - Add refundConsolePage URL helper for prepaid unsubscribe links - Add unit/e2e coverage and update README and finetune skill references
gujieye
force-pushed
the
feat/inference-train-command
branch
from
September 22, 2026 06:55
e1b73a0 to
47c24de
Compare
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.
Summary
Adds first-class support for PTU (provisioned throughput) reservations to the
deploycommand family, so users can provision, scale, renew, and release reserved kTPM capacity from the CLI. Existing MU/LORA deployment behavior is preserved.New capacity deployment subcommands
deploy capacity listdeploy capacity getdeploy capacity createdeploy capacity scaledeploy capacity renewdeploy capacity deletedeploy capacity unsubscribedeploy overflowdeploy operation getdeploy operation waitHigh-risk write operations carry bilingual
riskprompts and require--yes; writes generate a one-timerequestIdfor idempotency and server-side tracing.Key type extensions (
packages/core/src/deploy)types.ts:ReservationCapacity,PrePaidInfo,CapacityInstance,CapacityOperation.ScaleDeploymentRequestnow covers both the legacy MU shape and the new PTU shape (absolute per-instance kTPM, optional prepaid config,order_type).api.tsadds wrappers:listCapacityInstances,getCapacityInstance,getCapacityOperation,createCapacityInstance,scaleCapacityInstance,renewCapacityInstance,deleteCapacityInstance,updateDeploymentOverflow, with unified URL encoding helpers.reservation.tscentralizes reservation/prepaid flag structures.Strategy refactor (
plans.ts/reservation.ts)ptuStrategy.validateFlagsenforces PTU rules with bilingual errors: rejects legacy--capacity/--deploy-spec/--billing-method; validates--charge-type(pre_paid/post_paid, withptu_defaultprepaid-only); requires prepaid params and kTPM to be grouped and safe integers.muStrategyauto-selects a matching deploy template fromlistDeployableModelswhen not in--dry-runand no explicit--deploy-spec; dry-run / explicit spec skip the catalog call.client/http.ts) centralizes request timeout + abort handling and preserves the caller's abort reason.Tests
Unit tests:
packages/core/tests/deploy-api.test.tspackages/core/tests/deploy-write-api.test.tspackages/core/tests/http.test.tspackages/commands/tests/deploy-capacity-write.test.tspackages/commands/tests/deploy-legacy-write.test.tspackages/commands/tests/deploy-query.test.tspackages/commands/tests/deploy-wait-http.test.tsE2E tests:
packages/commands/tests/e2e/deploy.e2e.test.tsDocs/skill references (
README.md,README.zh.md,skills/bailian-finetune/*) updated for the new PTU semantics.