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

Function toRateLimitInfo

web/src/server/free-session/public-api.ts:140–148  ·  view source on GitHub ↗
(
  model: string,
  snapshot: SessionQuotaSnapshot,
)

Source from the content-addressed store, hash-verified

138}
139
140function toRateLimitInfo(
141 model: string,
142 snapshot: SessionQuotaSnapshot,
143): FreebuffSessionRateLimit {
144 return {
145 model,
146 ...snapshot.info,
147 }
148}
149
150/** Fetch the caller's current shared premium-session quota snapshot for
151 * `model`, or undefined if the model is unlimited. Used by both POST (after

Callers 2

fetchRateLimitSnapshotFunction · 0.85
fetchRateLimitsByModelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected