Usage limits (deprecated)
defineUsageLimitProvider is deprecated — declare an account provider with defineAccounts instead.
Deprecated
defineUsageLimitProvider and the usageLimits plugin field are deprecated. Use
defineAccounts, which adds sign-in, per-account usage, and account
switching.
Plugins that still declare usageLimits keep working. Pragma adapts each provider into a
single-login account provider:
- its
idbecomes the provider key (it will not merge with other plugins' rows), title,iconPath,dashboardUrl,primaryLimitId,refreshIntervalMsandloadcarry over unchanged,- it has one account — the harness's own login — shown with a legacy badge, with no sign-in and no switching.
To migrate, move the provider's fields under usageLimits of an account provider:
// Before
usageLimits: [
defineUsageLimitProvider({
id: "my-agent",
title: "My Agent",
dashboardUrl: "https://my-agent.dev/usage",
primaryLimitId: "messages",
load: loadUsage,
}),
],
// After
accounts: defineAccounts([
{
provider: "anthropic",
agent: "my-agent",
dashboardUrl: "https://my-agent.dev/usage",
usageLimits: { primaryLimitId: "messages", load: loadUsage },
},
]),