(
providerName?: string | undefined,
oauthRef?: KimiOAuthTokenRef | undefined,
)
| 262 | } |
| 263 | |
| 264 | tokenProvider( |
| 265 | providerName?: string | undefined, |
| 266 | oauthRef?: KimiOAuthTokenRef | undefined, |
| 267 | ): BearerTokenProvider { |
| 268 | const name = providerName ?? KIMI_CODE_PROVIDER_NAME; |
| 269 | const oauthHost = this.oauthHostFor(oauthRef); |
| 270 | const oauthKey = oauthRef?.key ?? this.defaultOAuthKey(undefined, oauthHost); |
| 271 | return { |
| 272 | getAccessToken: (options) => this.managerFor(name, oauthKey, oauthHost).ensureFresh(options), |
| 273 | }; |
| 274 | } |
| 275 | |
| 276 | async getManagedUsage( |
| 277 | providerName?: string | undefined, |
no test coverage detected