MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / isChatGptOAuthRateLimited

Function isChatGptOAuthRateLimited

sdk/src/impl/model-provider.ts:56–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54 * Check if ChatGPT OAuth is currently rate-limited.
55 */
56export function isChatGptOAuthRateLimited(): boolean {
57 if (chatGptOAuthRateLimitedUntil === null) {
58 return false
59 }
60 if (Date.now() >= chatGptOAuthRateLimitedUntil) {
61 chatGptOAuthRateLimitedUntil = null
62 return false
63 }
64 return true
65}
66
67/**
68 * Reset the ChatGPT OAuth rate-limit cache.

Callers 2

getModelForRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected