Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@ Upstream CC status mapping (`CC_STATUS_MAP`; anything unlisted becomes `502 upst

The machine-readable classification from the upstream error body (`error.code`, e.g. `BAD_REQUEST` / `USAGE_EXCEEDED`) is passed through as `error.code`.

CC reports failures inside the response stream rather than always using an HTTP status: `{"type":"error","error":{...,"statusCode":N,"isRetryable":B}}`. The proxy takes that status (a leading `<NNN>` in the message wins over it, matching the CLI) and maps it the same way as an HTTP-level error; for example, an upstream-declared 400 / 429 reaches the client with its own status instead of being collapsed into a blanket 502.

## Model List

The proxy returns a live model list via `GET /v1/models`. Below are common models for reference; the actual list depends on the live API response — see [Command Code Pricing](https://commandcode.ai/docs/resources/pricing-limits) for plan details.
Expand Down
2 changes: 2 additions & 0 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,8 @@ curl http://127.0.0.1:3050/v1/responses \

上游错误体里的机器可读分类(`error.code`,如 `BAD_REQUEST` / `USAGE_EXCEEDED`)会透传到下游错误体的 `error.code`。

CC 把失败放在响应流里上报,而不是总用 HTTP 状态返回:`{"type":"error","error":{...,"statusCode":N,"isRetryable":B}}`。代理会取这个状态(消息里的 `<NNN>` 前缀优先,与 CLI 一致),按与 HTTP 层错误相同的方式映射;例如上游声明的 400 / 429 会带着自己的状态到达客户端,而不是一律折叠成 502。

## 模型列表

代理访问 `GET /v1/models` 会返回实时模型列表。以下为常见模型参考,完整列表以实际接口返回为准——各模型套餐可参考 [Command Code Pricing](https://commandcode.ai/docs/resources/pricing-limits)。
Expand Down