SuperAPI AI Directory

arkcli-custommodel

Agents & models

View repository

Updated 10-16 07:07

About this skill

arkcli models custommodel

CRITICAL — Before starting, you MUST first use the Read tool to read ../arkcli-shared/SKILL.md, which contains the authentication gate, configuration troubleshooting, and shared security rules CRITICAL — All models custommodel commands must have their corresponding reference documentation read with the Read tool before execution; directly calling commands blindly is prohibited. CRITICAL — Write operations (upload / update / delete / quantize) must first confirm user intent. Before deletion, must confirm whether any endpoints still reference it.

Guards and Usage Principles

  • Custom model related requirements should prioritize using arkcli models custommodel ...
  • Although these commands are of standard CLI type, their implementation entry still comes from shortcuts/models/
  • Only when product commands cannot cover the case should you fall back to ../arkcli-api-explorer/SKILL.md
  • This skill is not the basic model query entry point; basic model catalog queries are redirected to ../arkcli-models/SKILL.md
  • Write operations and asynchronous tasks must link the impact scope, polling method, and follow-up actions together; do not stop at a single command

Applicable Scenarios

  • Import trained/fine-tuned weights from veTOS to ARK custom models
  • Query existing custom models under the account ("What custom models do I have / what are their statuses")
  • View custom model details, artifact form, active endpoint references
  • Modify custom model display name or description
  • Delete custom models no longer in use
  • Quantize an already ready custom model, preparing to use +deploy as the target

Anti-trigger Signals

  • Find official basic models → use ../arkcli-models/SKILL.md of search/list/get
  • Directly invoke custom model inference → must first +deploy, then go through +chat / +gen
  • Trigger model fine-tuning task (the customization job itself) → redirect to ../arkcli-train-finetune/SKILL.md
  • Register from fine-tuning task step (global_step_N) as cm-(= "export training artifacts") → redirect to ../arkcli-train-finetune/SKILL.md of arkcli train finetune artifacts list / export,Do notuse this skill's upload(that is for "the user's own TOS files", backend Action UploadModel; mcj output goes through CreateCustomModel, a completely different API)
  • After already obtaining endpoint-id, want to manage endpoint → redirect to ../arkcli-infer-endpoint/SKILL.md

cm-* direct inference boundary

  • When the user requests "use cm-* for direct conversation/inference/testing effects", this skill must also be loaded. Clearly state that cm-* is a custom model resource ID and cannot be directly passed to +chat / +gen; before inference, an Endpoint needs to be separately obtained or deployed.
  • The request itself does not authorize deployment, querying Endpoints under the account, or initiating inference. Without further user authorization, do not execute arkcli +deploy、arkcli +chat、arkcli infer endpoint list, and do not combine jq or other scanning schemes.
  • Only explain the boundary and next-step options; only after the user explicitly requests to continue deployment should you redirect to ../arkcli-deploy/SKILL.md and follow its confirmation process.

Core Concepts

  • This skill uniformly refers to resources managed by arkcli models custommodel ... asCustomModel(CustomModel, with ID in the form cm-xxxxx); it and ../arkcli-models/SKILL.md in search/list/get the official FoundationModel for the operation istwo independent sets of resources
  • There are two sources of custom models:
    • import — the user uploads weights from TOS to import (this skill upload command, goes through UploadModel API)
    • customization — produced through a model fine-tuning task (goes through ../arkcli-train-finetune/SKILL.md the train finetune artifacts export,the underlying layer is another OpenAPI Action CreateCustomModel, and upload are not interoperable)
  • Lifecycle state machine:preparation → processing → ready(success) or failed; the export scenario additionally has exporting / exportfailed
  • Quantization is a separate process: first available-quantizations <id> check the available modes, and view supported_inference_types_by_quantization to predict the deployment/payment forms supported by each quantization method; then quantize <id> --quantization <mode> submit the quantization task, and the result is aindependent new cm-xxxxx. The source model, the quantization result model, and the finally deployed endpoint are three different types of resources, and their IDs cannot be used interchangeably
  • Custom model ID (cm-xxxxx)is not <name>-<primary_version> in the form,cannot be directly used as the +chat / +gen of --model; you must first obtain an endpoint through arkcli +deploy , and get ep-xxx to call inference. If the custom model already has a Running Endpoint,+deploy will directly reuse the existing endpoint

Quick decision

List parameters and output contract

  • custommodel list --sort-order only accepts lowercase asc / desc. When other values are received, treat it as a local parameter error; do not attempt to call the interface or blindly retry after changing to another case.
  • When using --format table or --format csv , each result.items[] model is one row; do not treat the pagination response root object or the result map as model records. Use JSON/YAML when you need to preserve complete pagination metadata.

Clarifying the custom model target before deployment

Execute this section only when the user's final goal is "deploy my custom model as an Endpoint" but no unique cm-* is given; when the user has explicitly given cm-* , skip it.

  1. Execute only one read-only query:arkcli models custommodel list --mine --statuses ready --page-all --page-delay 500 --format json. This candidate query is executed at most once per round; even if it returns an authentication, configuration, or network error, you must not retry with a different wording or scan the local configuration.
  2. Candidates can only come from this round's structured results. If the query fails, the result fields are incomplete, or it cannot be confirmed that all have been retrieved, stop and explain the reason as-is; it is forbidden to fill in from memory cm-*and do not execute deployment first either.
  3. Converge by 0 / 1 / N:
    • 0: stop, and prompt the user to first upload, quantize, or complete exporting the fine-tuning artifact.
    • 1: restate that model's id / name / foundation_model / create_time, and hand it off as the sole target to arkcli-deploy。
    • N: use the structured selection capability provided by the host, and list each candidate's id / name / foundation_model / create_time directly for the user to choose; do not hardcode any host's tool name in a generic Skill, and do not additionally hardcode the Other option.
  4. Before the sole target is determined, do not execute arkcli +deploy、arkcli infer endpoint create or the Raw API. After target selection is complete, hand off to arkcli-deploy, and continue to comply with its write-operation confirmation; selecting a model itself does not equal authorizing deployment.

Agent quick execution order

  1. When unsure of the authentication status, first arkcli auth status
  2. "My custom models" semantics: directly custommodel list --mine,Do not apply shared's default Tags filtering(the custommodel server natively supports --mine)
  3. Three required fields before upload:--name / --base-model <foundation-model-id> / --tos tos://<bucket>/<prefix>; if any is missing, it will be rejected by the server
  4. upload / quantize is an asynchronous task: after it returns, use custommodel get <id> to poll status,do not loop upload/quantize in place
  5. quantize Before , you must run available-quantizations <id>: different base models support different quantization modes, and blind submission will be rejected by the server; if the user cares about deployment forms such as tokens / model units, prioritize looking at the returned supported_inference_types_by_quantization
  6. quantize --dry-run only outputs the local preview.v1, and will not call CreateQuantizedCustomModel;steps[].payload only describes real request fields, and backend DryRunshould not appear. It is not server-side validation; after checking, you still need to confirm before executing the real quantization
  7. delete / update / quantize is a write operation; before executing, restate the scope of impact to the user
  8. delete by default goes through [Y/N] secondary confirmation;--yes means skipping the local second confirmation,--dry-run means preview only without deleting. Only after the user has explicitly confirmed the deletion target and scope of impact can the agent add --yes to the command
  9. get --transform is custommodel get 's own field whitelist, not a global GJSON expression; when querying nested paths, do not treat it as a global --transform

Typical business flow

1. Upload a new custom model from TOS

auth status → custommodel upload --name X --base-model <fm-id> --tos tos://b/p
            → custommodel get <id>  (轮询直到 status=ready)
            → custommodel get <id> --transform 'artifact_types'  (看产物形态)

2. Quantize a ready custom model

custommodel get <id>  (确认 status=ready)
        → custommodel available-quantizations <id>  (看支持哪些 mode)
        → custommodel quantize <id> --quantization <mode> --dry-run
        → 用户确认量化目标和影响范围
        → custommodel quantize <id> --quantization <mode>
        → custommodel get <new-id>  (量化结果是新 cm-xxxxx,再次轮询)

3. Prepare to give +deploy as the target

custommodel list --mine --statuses ready --page-all --page-delay 500 --format json
        → 按 0 / 1 / N 澄清唯一 cm-xxxxx
        → +deploy --model cm-xxxxx ...   (若已有 Running Endpoint 会复用;详见 ../arkcli-deploy/SKILL.md)

4. Clean up custom models no longer in use

custommodel get <id> --transform 'active_endpoints'  (确认无 endpoint 引用)
        → custommodel delete <id> --dry-run
        → custommodel delete <id>  (交互二确)或 custommodel delete <id> --yes

Anti-patterns (required reading for agents)

  • Do not use arkcli models search / list to find custom models — those two only go through the FoundationModel catalog, and self-uploaded models are never in it. To find self-uploaded models, use custommodel list --search <kw> or --mine
  • Do not, after upload , immediately quantize — upload is an asynchronous task, and status goes through preparation → processing → ready; first custommodel get <id> to confirm ready, then proceed to available-quantizations → quantize
  • Do not give quantize a available-quantizations mode not listed by — different base models support different quantization sets, and blind submission will definitely fail. First available-quantizations <id>, and choose from the returned
  • Do not pass cm-xxxxx directly to +chat / +gen 's --model — a custom model must first obtain an endpoint via +deploy (ep-xxx) before it can be called for inference;+deploy may reuse an existing Running Endpoint
  • Do not pick one of multiple ready custom models to deploy on your own — first follow "Clarify the custom model goal before deployment" to have the user choose from this round's real-time results
  • Do not proactively supplement for the sake of automation --yes — when there is no --yes the CLI will prompt a [Y/N] double confirmation; only when the user has already confirmed deletion of cm-xxxxx and knows the endpoint reference risk should you include
  • Do not use the shared Tags client-side filtering under the "my" semantics — custommodel list --mine is server-side native filtering, which is more accurate and saves more requests
  • Do not frequently hit get to poll status — the recommended interval is ≥ 10s, otherwise you will be rate-limited

Command overview

Command Description
arkcli models custommodel list Pagination + multi-dimensional filtering
arkcli models custommodel get <id> Details / poll status
arkcli models custommodel upload Import from TOS (asynchronous)
arkcli models custommodel update <id> Rename / change description
arkcli models custommodel delete <id> [--yes] [--dry-run] Delete (destructive, irreversible); by default requires double confirmation,--yes to skip,--dry-run to preview
arkcli models custommodel available-quantizations <id> Check available quantization modes (must run before quantize)
arkcli models custommodel quantize <id> --quantization <mode> [--dry-run] Quantize (asynchronous);--dry-run local preview only, does not call the backend

Common fallbacks

Reference