Repository navigation
Replies: 2 comments
|
A local prototype on T3 Code 0.1.11 (macOS arm64) verified the account-limits part of this proposal. With the existing Qoder CLI login, Would you be open to a focused PR that shows the local Qoder account's plan, add-on, and organization Credits in the existing Limits view? If so, which capability boundary would you prefer for the quota reader? I'd like to keep Qoder-specific behavior out of the generic ACP Registry adapter. |
|
+1. Until this lands, I put together a small local dashboard that covers two ACP Registry agents, Kimi Code and Z.ai / GLM. It sits alongside everything T3 already tracks and copies the Usage page layout (usage, cost and Limits). It's open source if anyone wants to use it in the meantime: https://github.com/Hamza-Labs-Core/t3code-usage-dashboard It only reads T3's data ( A few things I learned that may help whoever builds this into T3:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Problem
Turns executed with ACP Registry agents (such as
qodercn, a Qoder CLI instance running the Qoder China endpoint) never appear on the Usage page (docs/user/usage.md). Inpackages/contracts/src/usage.ts,UsageProviderKindonly includes eight built-in providers.AcpRegistryDriverinpackages/provider-acp-registry/src/server/driver.tsdoes not implementusage(ProviderUsageReaderinpackages/provider-core/src/server/usage.ts), andapps/server/src/provider/builtInDrivers.tsomits it fromBUILT_IN_USAGE_DRIVERS. BecauseUsageServiceinapps/server/src/usage/UsageService.tsonly aggregates drivers fromBUILT_IN_USAGE_DRIVERS, ACP turn tokens are completely dropped from Usage. Users see no Breakdown row, no token type split, and no way to inspect or price ACP agent models.The Limits view has the same gap:
packages/provider-acp-registry/src/server/driver.tsinitializesmakeManagedServerProviderwithoutcheckUsageLimitsorrefreshUsage(ServerProviderUsageLimits,ProviderUsageLimitsReportinpackages/provider-core/src/server/snapshot.ts). Built-in providers like Grok fetch limits through status probes (readGrokAccountinpackages/provider-grok/src/server/usageLimits.ts, paired withcheckGrokProviderStatusinpackages/provider-grok/src/server/status.ts). Generic ACP agents and custom endpoints cannot surface quota or reset times even when upstream services provide them.Proposal
Two complementary changes, both through the existing capability system instead of special cases:
acp/<agentId>/<modelId>), similar to how Pi prefixes provider models. Surface unpriced models in the Breakdown table and let users configure USD rates via the existing Model prices table without building a separate pricing system.AcpRegistrySettingsinpackages/provider-acp-registry/src/settings.ts, so generic ACP providers can populateServerProviderUsageWindowentries and exposerefreshUsagewithout hardcoding individual agent IDs.docs/internals/adding-a-provider.mdforbids adding agent-specific branches to the generic ACP adapter.How it could work
UsageProviderKindinpackages/contracts/src/usage.ts.ProviderUsageReaderonAcpRegistryDriver, registered inBUILT_IN_USAGE_DRIVERSinapps/server/src/provider/builtInDrivers.ts.apps/server/src/usage/UsageService.ts, aggregate ACP turn token counts from recorded server turn state, grouped by agent and model. Unpriced models appear in Breakdown; users select Set price to add custom rates to the existing Model prices table (docs/user/usage.md).AcpRegistrySettingsspecifies a usage probe configuration (such as an HTTP endpoint or command returning quota windows).packages/provider-acp-registry/src/server/driver.tsevaluates the configured probe and passescheckUsageLimitstomakeManagedServerProvider.ServerProviderUsageLimits(session,weekly, ormonthlywindows withusedPercentandresetsAt).refreshUsagere-runs the probe on demand or after ausage_limitturn failure.Alternatives
docs/internals/adding-a-provider.mdguidance to avoid per-agent drivers for ACP agents./usage-limitsthread views.Extra context
Per
docs/user/usage.md, models without public rates already contribute tokens and appear as unpriced until priced via custom model prices, and the Usage page documents unified tracking across providers. Reusing that workflow and standardizing limit reporting via provider capabilities gives ACP agents the same visibility as built-in providers while preserving T3 Code's architectural boundaries.All reactions