MCPcopy Index your code

hub / github.com/ding113/claude-code-hub / functions

Functions6,623 in github.com/ding113/claude-code-hub

↓ 20 callersFunctionmakeChainItem
(overrides: Partial<ProviderChainItem> = {})
src/lib/redis/live-chain-store.test.ts:9
↓ 20 callersFunctionnormalizeProviderGroup
(value: unknown)
src/lib/utils/provider-group.ts:22
↓ 20 callersFunctionrecordFailure
(providerId: number, error: Error)
src/lib/circuit-breaker.ts:484
↓ 20 callersMethodresolveEffectivePriority
* 解析供应商的有效优先级:优先使用分组覆盖值,回退到全局默认值 * 支持逗号分隔的多分组(如 "cli,admin"),取匹配到的最小优先级
src/app/v1/_lib/proxy/provider-selector.ts:1121
↓ 19 callersFunctionbuildRequestDetails
( session: ProxySession )
src/app/v1/_lib/proxy/errors.ts:1328
↓ 19 callersFunctionbuildSecurityHeaders
( config?: Partial<SecurityHeadersConfig> )
src/lib/security/security-headers.ts:34
↓ 19 callersFunctionexpectSuccess
(module: string, action: string, body: Record<string, unknown> = {})
tests/e2e/api-complete.test.ts:63
↓ 19 callersFunctionfirstTextPart
( metadata: OpenAIImageRequestMetadata | null | undefined, name: string )
src/app/v1/_lib/proxy/openai-image-compat.ts:106
↓ 19 callersFunctionformatSseEvent
(eventName: string, payload: unknown)
src/app/v1/_lib/proxy/fake-streaming/emitters.ts:373
↓ 19 callersFunctiongenerateCostAlerts
(threshold: number)
src/lib/notification/tasks/cost-alert.ts:14
↓ 19 callersFunctiongetUserAllLimitUsage
(userId: number)
src/actions/users.ts:2135
↓ 19 callersFunctionisRawPassthroughEndpointPath
(pathname: string)
src/app/v1/_lib/proxy/endpoint-policy.ts:57
↓ 19 callersFunctionmakeBucket
( overrides: Partial<PublicStatusTimelineBucket> = {} )
tests/unit/app/status/derive-display-state.test.ts:9
↓ 19 callersFunctionnoContentResponse
(init: ResponseInit = {})
src/lib/api/v1/_shared/response-helpers.ts:28
↓ 19 callersFunctionnormalizeDecimalForSpreadsheet
(value: string | number | null | undefined)
src/lib/usage-logs/export/numeric.ts:45
↓ 19 callersFunctionpublicActionErrorDetail
(status: ProblemStatusCode)
src/lib/api/v1/_shared/error-envelope.ts:64
↓ 19 callersMethodregister
* 注册一个异步任务 * * @param taskId 任务唯一标识 * @param promise 异步任务 Promise * @param taskType 任务类型(用于日志) * @returns AbortController(可用于取消任务)
src/lib/async-task-manager.ts:77
↓ 18 callersFunctionbatchDeleteProviders
( params: BatchDeleteProvidersParams )
src/actions/providers.ts:2554
↓ 18 callersFunctionbuildTestProvider
(overrides: Partial<Provider> = {})
tests/unit/actions/providers-preview-engine.test.ts:37
↓ 18 callersMethodcancel
(reason)
src/app/v1/_lib/proxy/forwarder.ts:4956
↓ 18 callersFunctioncreateCsrfOriginGuard
(config: CsrfGuardConfig)
src/lib/security/csrf-origin-guard.ts:62
↓ 18 callersFunctioncreateEndpoint
(lastProbeOk: boolean | null)
tests/unit/settings/providers/endpoint-status.test.ts:11
↓ 18 callersFunctioncreateMockResponse
( responseBody: string, options?: { contentType?: string; ok?: boolean; status?: number; s
src/lib/provider-testing/test-service.test.ts:11
↓ 18 callersFunctioncreateProvider
( id: number, providerType: ProviderType, groupTag: string | null = null )
tests/unit/settings/providers/provider-batch-toolbar-selection.test.tsx:53
↓ 18 callersFunctioncreateThenableQuery
(result: T)
tests/unit/lib/availability-service.test.ts:5
↓ 18 callersFunctioncreateThenableQuery
(result: T, whereArgs?: unknown[])
tests/unit/repository/usage-logs-sessionid-filter.test.ts:36
↓ 18 callersFunctionformatProbability
( probability: number | undefined | null, decimals = 1 )
src/lib/utils/provider-chain-formatter.ts:15
↓ 18 callersMethodgetCurrentModel
* 获取当前模型(可能已重定向,用于转发)
src/app/v1/_lib/proxy/session.ts:744
↓ 18 callersFunctiongetGaugeColor
( value: number, thresholds: { warning: number; critical: number }, invertColors: boolean )
tests/unit/dashboard/availability/gauge-card.test.tsx:12
↓ 18 callersFunctionh
(entries: Record<string, string>)
src/lib/ip/extract-client-ip.test.ts:5
↓ 18 callersFunctioninsertMessageRequestRow
(input: InsertRequestInput)
tests/integration/usage-ledger.test.ts:64
↓ 18 callersFunctionisTransportError
(error: Error)
src/app/v1/_lib/proxy/errors.ts:746
↓ 18 callersFunctionmakeChainItem
(overrides: Partial<ProviderChainItem> = {})
src/lib/utils/provider-chain-display.test.ts:5
↓ 18 callersFunctionnextKey
(tag: string)
tests/integration/usage-ledger.test.ts:35
↓ 18 callersFunctionqueryProviderAvailability
( options: AvailabilityQueryOptions = {} )
src/lib/availability/availability-service.ts:310
↓ 18 callersFunctionrecord
(event: ProbeEvent)
tests/e2e/responses-ws-codex-cli-transport.test.ts:165
↓ 18 callersFunctionresolveAnthropicStreamActualResponseModel
( params: ResolveAnthropicStreamActualResponseModelParams )
src/app/v1/_lib/proxy/anthropic-actual-response-model.ts:59
↓ 18 callersFunctiontoVoidActionResult
(promise: Promise<unknown>)
src/lib/api-client/v1/actions/_compat.ts:23
↓ 17 callersFunctionapplyAnthropicProviderOverridesWithAudit
( provider: AnthropicProviderOverrideConfig, request: Record<string, unknown> )
src/lib/anthropic/provider-overrides.ts:108
↓ 17 callersFunctionapplyProviderBatchPatch
( input: unknown )
src/actions/providers.ts:2031
↓ 17 callersFunctionbuildKey
(overrides?: Partial<Key>)
tests/unit/security/api-key-auth-cache-redis-key.test.ts:77
↓ 17 callersFunctionconstantTimeEqual
(a: string, b: string)
src/lib/security/constant-time-compare.ts:11
↓ 17 callersFunctioncreateMockState
( overrides: { routing?: Partial<ProviderFormState["routing"]>; ui?: Partial<ProviderFormState["ui"]
tests/unit/settings/providers/options-section.test.tsx:82
↓ 17 callersFunctiondetectThinkingBudgetRectifierTrigger
( errorMessage: string | null | undefined )
src/app/v1/_lib/proxy/thinking-budget-rectifier.ts:31
↓ 17 callersFunctionextractActualResponseModelForProvider
( providerType: ProviderType | null | undefined, isStream: boolean, body: string | null | undefined )
src/app/v1/_lib/proxy/actual-response-model.ts:113
↓ 17 callersFunctionextractCodexSessionId
( headers: Headers, requestBody: Record<string, unknown> )
src/app/v1/_lib/codex/session-extractor.ts:50
↓ 17 callersFunctionfix
(input: string)
src/app/v1/_lib/proxy/response-fixer/sse-fixer.test.ts:5
↓ 17 callersFunctionflushPromises
()
tests/unit/settings/prices/upload-price-dialog-upload-flow.test.tsx:55
↓ 17 callersMethodgetCostLease
* Get a cost lease for an entity/window combination * * 1. Try to get cached lease from Redis * 2. If valid (not expired), return it * 3.
src/lib/rate-limit/lease-service.ts:117
↓ 17 callersFunctiongetCurrencySymbol
(currencyCode?: CurrencyCode | string)
src/lib/utils/currency.ts:140
↓ 17 callersFunctiongetHiddenColumns
(userId: number, tableId: string)
src/lib/column-visibility.ts:63
↓ 17 callersFunctiongetStatisticsWithCache
( timeRange: TimeRange, mode: "users" | "keys" | "mixed", userId?: number )
src/lib/redis/statistics-cache.ts:53
↓ 17 callersFunctionisClientAbortError
(error: Error)
src/app/v1/_lib/proxy/errors.ts:713
↓ 17 callersFunctionmakeEndpoint
(id: number, overrides: Partial<ProbeTarget> = {})
tests/unit/lib/provider-endpoints/probe-scheduler.test.ts:19
↓ 17 callersFunctionmakeLog
(overrides: Partial<UsageLogRow>)
src/app/[locale]/dashboard/logs/_components/virtualized-logs-table.test.tsx:117
↓ 17 callersFunctionmakeSettings
(overrides: Record<string, unknown> = {})
tests/unit/notification/notification-queue.test.ts:39
↓ 17 callersMethodmarkProviderFailed
( session: ProxySession, failedProviderIds: number[], providerId: number )
src/app/v1/_lib/proxy/forwarder.ts:4853
↓ 17 callersFunctionrecordEndpointFailure
(endpointId: number, error: Error)
src/lib/endpoint-circuit-breaker.ts:334
↓ 17 callersFunctionresolveAuth
(c: Context, tier: AuthTier)
src/lib/api/v1/_shared/auth-middleware.ts:68
↓ 17 callersFunctionrunAsSession
(userId: number, keyId: number, fn: () => Promise<T>)
tests/integration/my-usage-imported-ledger.test.ts:225
↓ 17 callersFunctionstartMockServer
( handler: (socket: import("ws").WebSocket, req: import("http").IncomingMessage) => void )
src/app/v1/_lib/responses-ws/__tests__/upstream-adapter.test.ts:24
↓ 17 callersFunctionsuccess
()
src/app/v1/_lib/proxy/openai-image-compat.ts:165
↓ 17 callersFunctionsumUserTotalCost
( userId: number, maxAgeDays: number = 365, resetAt?: Date | null )
src/repository/statistics.ts:499
↓ 17 callersFunctiontoDecimal
(value: DecimalInput)
src/lib/utils/currency.ts:46
↓ 17 callersFunctiontoSystemSettings
(dbSettings: any)
src/repository/_shared/transformers.ts:233
↓ 16 callersFunctionactionJson
(c: Context, result: ActionResult<T>)
src/app/api/v1/resources/providers/handlers.ts:780
↓ 16 callersMethodaddSpecialSetting
(setting: SpecialSetting)
src/app/v1/_lib/proxy/session.ts:430
↓ 16 callersFunctionanalyzeBatchProviderSettings
(providers: ProviderDisplay[])
src/app/[locale]/settings/providers/_components/batch-edit/analyze-batch-settings.ts:119
↓ 16 callersMethodcleanup
* Cleanup expired Agents * @returns Number of agents cleaned up
src/lib/proxy-agent/agent-pool.ts:159
↓ 16 callersFunctioncreateMessage
(params: { userId: number; key: string; model: string; originalModel?: string; endpoint?: string | n
tests/api/my-usage-readonly.test.ts:133
↓ 16 callersFunctioncreateProvider
(overrides: Partial<Provider> = {})
tests/unit/proxy/proxy-forwarder-retry-limit.test.ts:131
↓ 16 callersFunctioncreateProvider
(overrides: Partial<Provider> = {})
tests/unit/proxy/provider-selector-cross-type-model.test.ts:50
↓ 16 callersFunctioncreateSession
({ originalModel, redirectedModel, sessionId, messageId, enableHighConcurrencyMode = false, provid
tests/integration/billing-model-source.test.ts:158
↓ 16 callersFunctioncreateSession
(requestUrl: URL = new URL("https://example.com/v1/messages"))
tests/unit/proxy/proxy-forwarder-retry-limit.test.ts:186
↓ 16 callersFunctioncreateThenableQuery
(result: T)
tests/unit/repository/usage-logs-slim-pagination.test.ts:3
↓ 16 callersFunctiondetectApiKeyWarnings
(rawKey: string)
src/lib/utils/validation/api-key-warnings.ts:56
↓ 16 callersFunctiondetectClientFull
(session: ProxySession, pattern: string)
src/app/v1/_lib/proxy/client-detector.ts:209
↓ 16 callersFunctiondetectThinkingSignatureRectifierTrigger
( errorMessage: string | null | undefined )
src/app/v1/_lib/proxy/thinking-signature-rectifier.ts:18
↓ 16 callersFunctionenqueueMessageRequestUpdate
(id: number, patch: MessageRequestUpdatePatch)
src/repository/message-write-buffer.ts:365
↓ 16 callersFunctionextractZodErrorCode
(error: z.ZodError)
src/lib/utils/zod-i18n.ts:176
↓ 16 callersFunctionfindUsageLogsBatch
( filters: UsageLogBatchFilters )
src/repository/usage-logs.ts:149
↓ 16 callersFunctionflushTicks
(times = 1)
tests/unit/settings/providers/api-test-button.test.tsx:62
↓ 16 callersFunctiongetGlobalActiveSessionsKey
()
src/lib/redis/active-session-keys.ts:13
↓ 16 callersFunctiongetModelVendor
(modelId: string)
src/lib/model-vendor-icons.tsx:73
↓ 16 callersFunctiongetTimeRangeForPeriodWithMode
( period: TimePeriod, resetTime = "00:00", mode: DailyResetMode = "fixed" )
src/lib/rate-limit/time-utils.ts:98
↓ 16 callersFunctiongetUsageRate
(current: number, limit: number | null)
src/lib/utils/quota-helpers.ts:48
↓ 16 callersFunctioninferPhase
(chain: ProviderChainItem[])
src/lib/redis/live-chain-store.ts:23
↓ 16 callersFunctionisBenignBrokenPipeError
(err: unknown)
src/lib/lifecycle/benign-errors.ts:62
↓ 16 callersMethodisWarmupRequest
* 检查是否为 Claude Messages Warmup 请求(仅用于 Anthropic /v1/messages) * * 判定标准(尽量严格,降低误判): * - endpoint 必须是 /v1/messages(排除 count_tokens 等) * - me
src/app/v1/_lib/proxy/session.ts:845
↓ 16 callersFunctionlookupIp
( ip: string, options: LookupIpOptions = {} )
src/lib/ip-geo/client.ts:185
↓ 16 callersFunctionmakePriceRecord
( modelName: string, priceData: ModelPriceData, source: ModelPrice["source"] = "litellm" )
tests/integration/billing-model-source.test.ts:142
↓ 16 callersFunctionmakeSystemSettings
( billingModelSource: SystemSettings["billingModelSource"], codexPriorityBillingSource: SystemSettings["co
tests/integration/billing-model-source.test.ts:100
↓ 16 callersMethodprocess
(session: ProxySession, response: Response)
src/app/v1/_lib/proxy/response-fixer/index.ts:259
↓ 16 callersFunctionresetUserLimitsOnly
(userId: number)
src/actions/users.ts:2232
↓ 16 callersFunctionresolveEndpointDisplayStatus
( endpoint: { lastProbeOk: boolean | null; isEnabled?: boolean | null }, circuitState?: EndpointCircuitSta
src/app/[locale]/settings/providers/_components/endpoint-status.ts:138
↓ 16 callersFunctionresolveProviderPatternRegex
(pattern: string)
src/lib/provider-pattern-regex.ts:24
↓ 16 callersFunctionrun
(argv)
scripts/audit-messages-emoji.js:160
↓ 16 callersFunctionsample
(hitRateTokens: number)
tests/unit/lib/cache-hit-rate-alert/cooldown-dedup.test.ts:32
↓ 16 callersFunctionsetDeferredStreamingFinalization
( session: ProxySession, meta: DeferredStreamingFinalization )
src/app/v1/_lib/proxy/stream-finalization.ts:42
↓ 16 callersFunctionshouldShowCostBadgeInCell
( providerChain: ProviderChainItem[] | null | undefined, costMultiplier: number | null | undefined )
src/lib/utils/provider-chain-display.ts:13
← previousnext →201–300 of 6,623, ranked by callers