MCPcopy
hub / github.com/codeaashu/claude-code / makeTestQuery

Function makeTestQuery

src/services/claudeAiLimits.ts:199–218  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

197}
198
199async function makeTestQuery() {
200 const model = getSmallFastModel()
201 const anthropic = await getAnthropicClient({
202 maxRetries: 0,
203 model,
204 source: 'quota_check',
205 })
206 const messages: MessageParam[] = [{ role: 'user', content: 'quota' }]
207 const betas = getModelBetas(model)
208 // biome-ignore lint/plugin: quota check needs raw response access via asResponse()
209 return anthropic.beta.messages
210 .create({
211 model,
212 max_tokens: 1,
213 messages,
214 metadata: getAPIMetadata(),
215 ...(betas.length > 0 ? { betas } : {}),
216 })
217 .asResponse()
218}
219
220export async function checkQuotaStatus(): Promise<void> {
221 // Skip network requests if nonessential traffic is disabled

Callers 1

checkQuotaStatusFunction · 0.85

Calls 4

getSmallFastModelFunction · 0.85
getAnthropicClientFunction · 0.85
getAPIMetadataFunction · 0.85
createMethod · 0.65

Tested by

no test coverage detected