provider-onboarding
Installation
SKILL.md
Provider Onboarding & Credential Architecture
This document defines the requirements, shared machinery, and safety invariants for onboarding new quota providers or modifying existing adapters in quota-axi.
Clean-Room & Dependency Policy
- Clean-room implementation: Adapter behavior (retry-after handling, snake/camel field tolerance, window parsing) must be an original implementation derived solely from the vendor's own HTTP/OAuth behavior. quota-axi carries no vendored third-party adapter code. The Z.AI adapter is the single attribution exception (derived from opencode-glm-quota, MIT) credited in
src/providers/zai.ts. - HTTP & proxy handling: Remote HTTP requests must route through
src/lib/http.ts(providerFetch) so standardHTTP_PROXY,HTTPS_PROXY, andNO_PROXYpolicies apply consistently without leaking proxy credentials in logs. Do not use globalfetchdirectly.- Node 26 compatibility:
src/lib/http.tspairs the installedundicibuild'sProxyAgentwith that same build'sfetchbecause Node's built-in global fetch only accepts dispatchers from its bundledundici, and Node 26 rejects externalProxyAgentinstances withInvalidArgumentError: invalid onError method.
- Node 26 compatibility:
- Process table reads: Any process-table inspection (e.g. Antigravity loopback detection or Claude process checks) must route through
currentUserProcessListArgsinsrc/lib/process.tsto handle platform flag differences portably (Linux procps rejects BSD-xalongside-u).
Provider Onboarding Checklist
When adding a new provider or migrating an existing adapter: