[feat request] Support ListModelTokenLimit / UpdateModelTokenLimit for per-model inference token quota

Open
#15 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
go
Domain
api, cli

Research direction

Start in internal/apis/model/ by reading the existing model.list_model_rate_limit operation and its registration pattern. Confirm the OpenTOP action name and request contract for the update operation before implementing either registration. Done means both token-limit operations are available through arkcli api, with the list response exposing the reported quota and usage fields.

Written by the indexing model from the issue text.

Description

背景

火山方舟控制台「开通管理」页每个已开通模型都有一个**推理限额(Token Limit)**配置:超过这个 token 总量后模型会被限流,需要在控制台手动调高。这是按模型独立的 token 总量配额,不是 RPM/TPM(每分钟速率),也不是免费额度资源包(FreeInference / DataPermission)。

控制台对应接口:

  • POST /api/top/ark/cn-beijing/2024-01-01/ListModelTokenLimit
  • 对应的更新接口(推测为 UpdateModelTokenLimit,需维护者确认实际 action 名)

现状

arkcli 已注册的 model.* action 里:

  • model.list_model_rate_limit 只返回 RPM/TPM(每分钟速率),没有 token 总量维度
  • model.list_model_charge_items 只返回资源包余额,没有用户配置的限额上限
  • model.list_model_meta_datas 是模型能力元数据,不是用户配额

model.list_model_token_limit / model.update_model_token_limit 均未在 arkcli 注册,arkcli api model.list_model_token_limitunknown action

期望

internal/apis/model/ 注册这两个 operation:

1. model.list_model_token_limit

请求体:

{"FoundationModelNames": ["glm-5-2", "doubao-seed-2-1-pro"]}

响应体(实测):

{
  "Result": {
    "ModelTokenLimits": [
      {
        "FoundationModelName": "glm-5-2",
        "TokenLimit": 2008227,
        "CurrentUsage": 833808,
        "TokenLimitStartTime": "2026-07-30T09:59:53+08:00",
        "CurrentUsageRefreshTime": "2026-07-30T10:13:27+08:00"
      }
    ]
  }
}
2. model.update_model_token_limit

具体 action 名和参数请维护者按 OpenTOP 实际契约定。推测请求体包含 FoundationModelName + TokenLimit(新值)。

使用场景

Agent / 自动化运维场景下需要:

  • 监控各模型 token 配额使用率(CurrentUsage / TokenLimit),接近上限时告警
  • 批量调整多个模型的 TokenLimit(开通新模型时一次性配好)
Dominant language
Go
Stars
133
Forks
13
Avg merge
2m
Merged PRs (30d)
2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from volcengine/ark-cli

All issues in volcengine/ark-cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.