Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 13.1 KB

FEATURE_MAP.md

File metadata and controls

42 lines (29 loc) · 13.1 KB

CLIProxyAPI: capability map

Initially verified on 2026-09-29; usage timing, query caching and operational log health rechecked on 2026-10-17. This is a scoped navigation aid, not a complete product audit or a replacement for existing guidance. Recheck implementation when using it; extend entries only as tasks confirm the relevant behavior. Do not treat roadmap ideas as implemented features.

Capability Entry / UI API / orchestration Implementation / data Review boundary
Multi-provider proactive quota guard Configuration advanced section / quota-guard YAML (legacy codex-quota-guard compatible) Existing configuration save, hot reload and bounded quota refresh workers Codex, Claude, Grok, Kimi and Antigravity percentage adapters Short-window defaults 90 ± 5; weekly and monthly defaults 93 ± 3. Any observed window pauses the account; fresh lower usage restores it. Background verification fails closed on missing, failed or stale quota. All eligible providers use 5 + 25 * remaining-margin / sampled-threshold minutes (5–30m), capped by warmup, observed consumption speed and resumed/burst traffic. Shared cache deadlines shorten with the schedule. Up to 10% query jitter is capped at 30m; each original observation expires after its maximum interval plus 1m grace. Known threshold resets suspend polling until reset verification. Background and management reads share cached observations, a four-request concurrency limit, retry delays of at least five minutes with Retry-After or jittered exponential backoff; three valid network observations and thirty failure-free minutes are required to clear retry escalation; next_check_at exposes the deadline. Allowlisted, sanitized observation/transition logs include usage, thresholds, reset/freshness times and failure categories; management quota_guard / provider_quota diagnostics explain pauses. Already admitted work can still overshoot. Standalone routing only; provider eligibility follows actual quota endpoints.
Quota-paced weighted routing Routing board / routing.quota-pacing and optional quota-pacing-pool Same eligible pool and affinity decisions as weighted round-robin Fresh guarded Codex OAuth windows scale manual weight in quarter steps from 0.5 to 1.5. Each reservation retains its normalized credit allocation. V8 credentials report the factor, limiting window and remaining sample lifetime. Opt-in standalone only. Window reset, stale or invalid evidence returns the soft factor to one. Existing guard blocks continue to apply.
HTTP routing and provider execution internal/api/server.go internal/runtime/executor internal/translator Trace the executor and canonical thinking pipeline before changing protocol translation; preserve existing translator restrictions. CORS preflight names accepted API headers and echoes requested headers without enabling credentials. A locally detected Responses stream missing its terminal frame stops credential fallback without cooling the selected credential.
K3.1 Pro request compatibility Chat, Messages and Responses, streaming and non-streaming Kimi executor (including Claude delegation) and OpenCode executor internal/runtime/executor/helps/kimi_request.go Final payload reconciliation omits numeric temperature so the provider selects its mode-specific default and disables reasoning when tools are forced. Other models and automatic tool choices retain existing behavior; concurrency and expired credentials remain upstream failures.
Kimi concurrency admission Chat, Messages and Responses, streaming and non-streaming Kimi execution boundary and existing auth manager fallback internal/runtime/executor/helps/kimi_errors.go, sdk/cliproxy/auth/conductor_cooldown.go Only explicit structured admission rejection becomes retryable 503 with a two-second model cooldown. No quota backoff, no replay after output, no changes to thinking semantics.
Claude review protocol continuity Native Messages and count_tokens entry points internal/runtime/executor/claude_executor_request.go, helps/claude_beta_capabilities.go Caller beta extensions survive credential/fingerprint classification; existing JSON/SSE response paths preserve safeguard verdicts and tool IDs Does not relax fingerprint trust, change cache TTL, fabricate verdicts or guarantee upstream feature availability.
Grok CLI chat compatibility xAI OAuth chat, streaming and non-streaming internal/runtime/executor/xai_executor_request.go Shared CLI version and User-Agent identify client 1.0.46, following the merged upstream identity CLI identity applies only to the official chat-proxy endpoint; official API, media and custom-header overrides retain existing behavior.
Credentials, pools and selection internal/api/handlers/management/account_pools.go sdk/cliproxy/auth internal/store Capacity, leases, cooling and credential storage have distinct roles; inspect selection and refresh together. Cooldown state paths remain relative to the configured auth directory, including when that directory is itself relative.
Usage and diagnostics internal/api/handlers/management/usage_dashboard.go internal/usage internal/api/handlers/management/usage_statistics.go Requests and execution attempts are distinct. Additive service-health counters exclude cancellation, caller errors and unknown records; incomplete delivery counts as failure, with nullable rates when no samples exist. Legacy totals and billing remain unchanged. Optional timing separates first bytes, output, text/reasoning and upstream response clocks. Versioned, bounded dashboard snapshots aggregate outside the store lock. Optional IANA timezone controls DST-aware chart buckets; omitted timezone stays UTC. Coordinate response contracts with the management frontend.
Operational log health Management /logs and the frontend log page internal/logging/async_output.go Bounded file-log queue, error reserve and cumulative loss/write-error counters Operational logging may reject under pressure; billable usage delivery is independent. Failure categories never export raw errors. Generated request-log names are confined to the configured log directory and reject path traversal components.
Token pricing internal/pricing/calculate.go internal/pricing/service.go internal/pricing/fallback.json Dynamic catalog overrides embedded fallback; billing snapshots remain immutable. GPT-6.1 Sol fallback supports context thresholds and effective service tiers.
OpenCode upstream review opencode2api-monitor.yml GitHub Actions / gh API Issue body/comments; summary and review artifact when Issues are disabled Preserve the HEAD/tag-SHA/release status marker. Artifact fallback deduplicates only retrievable, unexpired reports; upstream detection remains unchanged.
Node update command cpa-update; legacy update-cliproxyapi remains an alias deploy/cpa-node/install.sh, deploy/cpa-node/update-node.sh Self-refreshing wrapper detects systemd or Docker; batch updates install the same command Compare published asset and installed binary versions before installer/config/service changes. Equal versions return success without restart or config backup; unreadable versions abort. Actual upgrades allow 180s for panel readiness with quiet retries. The launcher still refreshes updater code. Remote servers are not migrated by a repository push alone.
Management assets and reload internal/managementasset internal/watcher cmd/server The sibling management frontend consumes /v8/management; verify both sides for contract changes.

Use personal/main, not upstream origin, for project pushes. The parent CPA scope includes only this backend and Cli-Proxy-API-Management-Center. Retain English authored docs/comments and required Go compile checks.

Before adding a feature, inspect adjacent flows and the current source of truth; shared filters, data definitions and access rules must not diverge across entry points.

Release delivery

Personal mainline verification runs the full suite, server build and smoke on Ubuntu with default CGO before creating a version tag and dispatches release.yaml. All binary platforms must pass before publication. Final checksums use current Release downloads, validated against GitHub asset digests; rerun artifacts cannot substitute stale archive bytes. Darwin CGO archives use Intel macOS runners with explicit target-architecture checks. FreeBSD jobs reuse installed LLVM tools and install only missing prerequisites. Deployment patches use the previous published ancestor, excluding failed draft tags. FreeBSD sysroot download authenticates every source with a pinned SHA256 before extraction. personal-container.yml then builds and smoke-tests both native Linux architectures using the existing Dockerfile and publishes repository-owned GHCR tags. A manual run can select an existing published tag, verify its source commit, and retry only container delivery without retagging. The operator still owns production deployment.

Codex transport uses per-connection x-codex-websocket-max-message-bytes for pre-upload selection. An explicit peer close 1009 during upload and before any response text also permits same-account HTTP for independent requests. Active duplex and lease-bound attempts retain their transport. HTTP and WebSocket forward all x-codex-exclude values. Their final handshake values participate in connection reuse and exact continuation checks. Oversized stateful continuations require replay, and warmup never becomes HTTP generation. Structured NO_MORE_RETRY blocks same-account recovery; capacity rotation still obeys CPA admission, lease and delivery boundaries. See November adaptation.

OpenAI-compatible providers persist optional test-model through management GET/PUT/PATCH and YAML reload. Empty selects the first configured model; this preference does not change gateway routing. The management test selector supports case-insensitive model search. Other provider families retain their existing test-preference semantics.

OpenAI-compatible providers and individual keys have persisted IDs. Rename, notes and reordering preserve account-pool membership; management mutations target provider ID with legacy fallback. Per-key notes appear in the editor, detail view and account groups. Legacy IDs are retained; only a unique matching historical pool binding is recovered. First load persists migrated IDs in the configuration. Ambiguous missing references remain inert.

The v8 integration retains personal account pools, exclusive leases, quota observations and usage/pricing under /v8/management, alongside the upstream grouped configuration, plugin and routing contracts. Legacy v7 YAML is normalized at the configuration boundary; personal root fields and OpenAI-compatible provider/key identities, notes and test-model survive canonical saves. V8 access-key rotation migrates pool permissions and leases before the new configuration becomes active. Legacy management endpoints remain available but new features use v8.

Streaming completion preserves the personal delivery boundary: a response terminal frame does not end a PoO-enabled stream before its proof or final error arrives. Internal model request cancellation retains upstream's empty-stream cancellation behavior. Native Codex model discovery applies personal account-pool authorization. Ordinary quota cooldown remains bounded at one hour; upstream forced cooldown is a separate layer. Authentication failures remain visible and ineligible for dispatch while the v8 refresh lifecycle can recover nonterminal failures.

Node installation and update understand both legacy and v8 block YAML. Targeted configuration updates retain unrelated provider and personal fields; unsupported inline parent maps fail before rewriting the file. Nginx management restrictions cover both v0 and v8 paths. The updater migrates only the installer-generated location with its management ACL marker; validation/reload failures restore the previous files. Release smoke uses the v8 contract with a legacy YAML input, grouped provider save/read/rename and the full personal usage insight flow. Go release builders follow the 1.26.10 module requirement, and deployment bundles pin the paired v1.28.3 CPA management release.

Quota reads recognize confirmed Codex access-token revocation. The v8 usage dashboard and records share the optional error_origin filter. Embedded GPT-6.2 pricing records the applicable Ultrafast period. Codex OAuth request preparation removes unused SDK IDs from inline replayed text.