musistudio/claude-code-router · error · Error

Provider account does not support Codex manual reset…

Error message

Provider account does not support Codex manual reset credits.

What it means

codexResetProvider requires the selected account to have a Codex manual reset credits connector. providerAccountHasCodexResetCreditsConnector(target.account) returned false, meaning the account's connector config lacks Codex reset-credits support.

Solutions

  1. Configure the account with the Codex reset credits connector type
  2. Select a different account/credential that has the connector
  3. Update the provider manifest so the account exposes reset-credits capabilities
Defensive patterns

Strategy: validation

Validate before calling

if (!providerAccountHasCodexResetCreditsConnector(account)) throw new Error('account lacks codex reset-credits connector');

Prevention

When it happens

Trigger: Calling codexResetProvider on an account whose connector is not a Codex reset-credits connector (e.g. a generic HTTP JSON account or a different provider family).

Common situations: Pointing the manual reset flow at a non-Codex account; account connector config edited or migrated and lost the codex reset-credits type; using a custom manifest without the connector.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of musistudio/claude-code-router@99f24806c6 (2026-08-27). Data as JSON: /api/errors/912717829f003b10. Report an issue: GitHub.

Appendix: source

Thrown at packages/core/src/providers/account-service.ts:492

function codexResetProvider(config: AppConfig, providerName: string, credentialId: string | undefined): GatewayProviderConfig {
  const normalizedProviderName = normalizeProviderName(providerName);
  const provider = config.Providers.find((candidate) =>
    isGatewayProviderEnabled(candidate) &&
    normalizeProviderName(candidate.name) === normalizedProviderName
  );
  if (!provider) {
    throw new Error("Provider account was not found.");
  }

  const target = providerAccountTargets(provider).find((candidate) => {
    const candidateCredentialId = candidate.credential ? providerCredentialRuntimeId(candidate.provider, candidate.credential) : undefined;
    return !credentialId || candidateCredentialId === credentialId;
  });
  if (!target) {
    throw new Error("Provider account credential was not found.");
  }
  if (!providerAccountHasCodexResetCreditsConnector(target.account)) {
    throw new Error("Provider account does not support Codex manual reset credits.");
  }

  return target.credential
    ? providerWithCredentialApiKey(target.provider, target.credential, target.account)
    : { ...target.provider, account: target.account };
}

function providerAccountHasCodexResetCreditsConnector(account: ProviderAccountConfig): boolean {
  return normalizeConnectors(account).some((connector) =>
    connector.type === "http-json" &&
    /\/wham\/rate-limit-reset-credits(?:$|[?#/])/i.test(connector.endpoint.trim())
  );
}

function providerAccountUnavailableSnapshots(provider: GatewayProviderConfig): ProviderAccountSnapshot[] {
  const credentials = activeProviderCredentials(provider);
  if (credentials.length > 0) {
    return credentials

View on GitHub (pinned to 99f24806c6)