MCPcopy Index your code

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

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

↓ 16 callersFunctionvalidateKey
( keyString: string, options?: { /** * 允许仅访问只读页面(如 my-usage),跳过 canLoginWebUi 校验 */ allo
src/lib/auth.ts:181
↓ 15 callersFunctionaddDays
(date: Date, days: number)
src/app/[locale]/dashboard/_components/user/forms/quick-expire-picker.tsx:20
↓ 15 callersFunctionapplyGeminiGoogleSearchOverride
( provider: GeminiProviderOverrideConfig, request: Record<string, unknown>, endpointPathname?: string |
src/lib/gemini/provider-overrides.ts:46
↓ 15 callersFunctionbuildProviderSnapshot
( provider: Provider, userGroup: string | null, overrides: Partial<DispatchSimulatorProviderSnapshot> =
src/actions/dispatch-simulator.ts:53
↓ 15 callersFunctioncompareVersions
(current: string, latest: string)
src/lib/version.ts:72
↓ 15 callersFunctioncreateChainMock
(resolvedData: unknown[])
tests/unit/repository/leaderboard-user-model-stats.test.ts:10
↓ 15 callersFunctioncreateQuery
(result: T, whereArgs?: unknown[])
tests/unit/repository/provider-groups.test.ts:47
↓ 15 callersFunctiondrainAsyncTasks
()
tests/integration/billing-model-source.test.ts:314
↓ 15 callersFunctiongetBodyText
()
tests/unit/settings/providers/options-section.test.tsx:194
↓ 15 callersMethodgetClientSafeMessage
* 获取适合返回给客户端的安全错误信息 * 不包含供应商名称等敏感信息,仅返回从上游提取的错误消息 * * 与 getDetailedErrorMessage() 的区别: * - getDetailedErrorMessage(): 包含供应商名称,用于内部日志记录
src/app/v1/_lib/proxy/errors.ts:494
↓ 15 callersFunctionisFiniteNumber
(value: unknown)
src/lib/notification/notification-queue.ts:59
↓ 15 callersFunctionisValidIANATimezone
(timezone: string)
src/lib/utils/timezone.ts:74
↓ 15 callersFunctionlooksLikeAwsExternalAnthropicUrl
(providerUrl?: string | null)
src/app/v1/_lib/headers.ts:55
↓ 15 callersFunctionmakeProvider
(id: number, overrides: Record<string, unknown> = {})
tests/unit/actions/providers-undo-engine.test.ts:45
↓ 15 callersFunctionmakeRequest
( body: unknown, opts?: { locale?: string; acceptLanguage?: string } )
tests/unit/api/auth-login-route.test.ts:50
↓ 15 callersFunctionprocessPriceTableInternal
( jsonContent: string, overwriteManual?: string[], source: ModelPriceSource = "litellm" )
src/actions/model-prices.ts:109
↓ 15 callersFunctionraw
(text = SAMPLE)
tests/unit/proxy/request-body-codec.test.ts:27
↓ 15 callersFunctionrectifyBillingHeader
( message: Record<string, unknown> )
src/app/v1/_lib/proxy/billing-header-rectifier.ts:25
↓ 15 callersFunctionrectifyResponseInput
( message: Record<string, unknown> )
src/app/v1/_lib/proxy/response-input-rectifier.ts:33
↓ 15 callersFunctionredactResponseBody
(body: unknown)
src/lib/utils/message-redaction.ts:396
↓ 15 callersFunctionredactSensitive
(value: T, extraKeys: string[] = [])
src/lib/audit/redact.ts:42
↓ 15 callersFunctionresolveProviderGroupsWithDefault
(value: unknown)
src/lib/utils/provider-group.ts:54
↓ 15 callersFunctionsendResponseCreate
(client: RawWsClient, body: Record<string, unknown>)
tests/e2e/responses-ws-codex-cli-transport.test.ts:749
↓ 15 callersMethodstoreSessionResponsePhaseSnapshot
* 按 before/after phase 存储响应快照。 * before 用于记录原始上游结果,after 用于记录返回客户端的最终结果。
src/lib/session-manager.ts:2136
↓ 15 callersFunctionsubscribeCacheInvalidation
( channel: string, callback: CacheInvalidationCallback )
src/lib/redis/pubsub.ts:220
↓ 15 callersFunctiontoFiniteNumber
(value: string | number | null | undefined)
src/lib/usage-logs/export/numeric.ts:22
↓ 14 callersFunctionapiFetch
(path: string, options: ApiFetchOptions = {})
src/lib/api-client/v1/fetcher.ts:23
↓ 14 callersMethodapplyGlobal
(session: ProxySession)
src/lib/request-filter-engine.ts:478
↓ 14 callersFunctionapplySwapCacheTtlBilling
(usage: UsageMetrics, swap: boolean | undefined)
src/app/v1/_lib/proxy/response-handler.ts:3617
↓ 14 callersFunctionbuildSessionDetailSnapshotKey
( sessionId: string, sequence: number, kind: SessionDetailSnapshotKind, phase: SessionDetailViewMode,
src/lib/session-manager.ts:110
↓ 14 callersFunctioncacheActiveKey
(key: Key)
src/lib/security/api-key-auth-cache.ts:273
↓ 14 callersMethodcheckTotalCostLimit
* 检查总消费限额(带 Redis 缓存优化) * 使用 5 分钟 TTL 缓存减少数据库查询频率
src/lib/rate-limit/service.ts:430
↓ 14 callersFunctionclearUserCostCache
( options: ClearUserCostCacheOptions )
src/lib/redis/cost-cache-cleanup.ts:52
↓ 14 callersFunctionclick
(el: Element)
src/app/[locale]/dashboard/sessions/[sessionId]/messages/_components/session-messages-client.test.tsx:45
↓ 14 callersFunctioncomputeQuickEditLimit
( mode: QuickEditMode, draft: string, currentLimit: number | null, unit: QuickEditUnit, allowClear:
src/components/quota/quota-quick-edit-popover.tsx:29
↓ 14 callersFunctioncreateConfirmedClaudeCodeSession
(userAgent: string)
tests/unit/proxy/client-detector.test.ts:55
↓ 14 callersFunctioncreateProviderFilter
( providerIds: number[], scope: "header" | "body", action: "remove" | "set" | "json_path" | "text_replac
tests/unit/request-filter-binding.test.ts:51
↓ 14 callersFunctioncreateRedisMock
()
tests/unit/redis/statistics-cache.test.ts:38
↓ 14 callersFunctioncreateRequest
(headers: Record<string, string>)
tests/security/csrf-origin-guard.test.ts:4
↓ 14 callersFunctioncreateSession
()
src/app/v1/_lib/proxy/response-fixer/response-fixer.test.ts:35
↓ 14 callersFunctiondecodeThinkingSignatureModel
( base64Signature: string | null | undefined, fieldPath: readonly number[] = DEFAULT_FIELD_PATH )
src/app/v1/_lib/proxy/thinking-signature-model.ts:25
↓ 14 callersFunctiondetectFormatByEndpoint
(pathname: string)
src/app/v1/_lib/proxy/format-mapper.ts:51
↓ 14 callersFunctiondetectProviderType
(text: string)
src/lib/utils/provider-text-parser.ts:42
↓ 14 callersFunctioneditKey
( keyId: number, data: { name: string; expiresAt?: string; canLoginWebUi?: boolean; isEnab
src/actions/keys.ts:429
↓ 14 callersFunctionflushPromises
()
tests/unit/settings/prices/price-list-interactions.test.tsx:45
↓ 14 callersMethodgetCachedPriceDataByBillingSource
* 根据系统配置的计费模型来源获取价格数据(带缓存) * * billingModelSource: * - "original": 优先使用重定向前模型(getOriginalModel) * - "redirected": 优先使用重定向后模型(request.model
src/app/v1/_lib/proxy/session.ts:1001
↓ 14 callersFunctiongetErrorMessage
( t: (key: string, params?: Record<string, string | number>) => string, code: ErrorCode | string, params
src/lib/utils/error-messages.ts:169
↓ 14 callersFunctiongetLeaseTimeRange
( window: LeaseWindowType, resetTime = "00:00", mode: DailyResetMode = "fixed" )
src/lib/rate-limit/lease.ts:73
↓ 14 callersFunctiongetProxyAgentForProvider
( provider: Provider | ProviderProxyConfig, targetUrl: string, enableHttp2 = false )
src/lib/proxy-agent.ts:277
↓ 14 callersFunctionhasValidPriceData
(priceData: ModelPriceData)
src/lib/utils/price-data.ts:54
↓ 14 callersFunctionisSessionMessages
(value: unknown)
src/lib/session-detail-snapshots.ts:13
↓ 14 callersFunctionisVendorTypeCircuitOpen
( vendorId: number, providerType: ProviderType )
src/lib/vendor-type-circuit-breaker.ts:116
↓ 14 callersFunctionmakeProvider
(overrides: Partial<Provider>)
tests/unit/proxy/provider-selector-group-priority.test.ts:5
↓ 14 callersMethodmarkUnhealthy
* Mark one dispatcher generation as unhealthy. * * 空闲 dispatcher 会立即关闭;仍有在途请求的 dispatcher 会被退役, * 等对应请求全部 release 后再关闭。dispatcherId 必须来自 getA
src/lib/proxy-agent/agent-pool.ts:138
↓ 14 callersFunctionnextProviderId
()
tests/integration/usage-ledger.test.ts:30
↓ 14 callersFunctionnextUserId
()
tests/integration/usage-ledger.test.ts:25
↓ 14 callersFunctionomit
(keys: readonly string[], dropped: readonly string[])
tests/unit/repository/system-config-degradation-ladder.test.ts:96
↓ 14 callersFunctionparseDateInputAsTimezone
(input: string, timezone: string)
src/lib/utils/date-input.ts:25
↓ 14 callersFunctionproxyHandler
(request: NextRequest)
src/proxy.ts:29
↓ 14 callersFunctionrectifyThinkingBudget
( message: Record<string, unknown> )
src/app/v1/_lib/proxy/thinking-budget-rectifier.ts:57
↓ 14 callersFunctionrender
(node: ReactNode)
src/app/[locale]/dashboard/_components/ip-details-dialog.test.tsx:55
↓ 14 callersFunctionrenderWithIntl
(node: ReactNode)
src/components/ui/__tests__/code-display.test.tsx:18
↓ 14 callersFunctionresetUserAllStatistics
(userId: number)
src/actions/users.ts:2346
↓ 14 callersMethodsetRawCrossProviderFallbackEnabled
(enabled: boolean)
src/app/v1/_lib/proxy/session.ts:408
↓ 14 callersFunctionsetReactInputValue
(input: HTMLInputElement | HTMLTextAreaElement, value: string)
tests/unit/settings/prices/model-price-drawer-prefill-and-submit-ui.test.tsx:53
↓ 14 callersFunctionshouldShowOnboarding
(type: OnboardingType)
src/lib/onboarding.ts:32
↓ 14 callersMethodshouldTrackSessionObservability
()
src/app/v1/_lib/proxy/session.ts:426
↓ 14 callersFunctionsumKeyCostInTimeRange
( keyId: number, startTime: Date, endTime: Date )
src/repository/statistics.ts:726
↓ 13 callersFunctionactionError
(c: Context, result: Extract<ActionResult<unknown>, { ok: false }>)
src/app/api/v1/resources/users/handlers.ts:318
↓ 13 callersFunctionallText
()
src/app/[locale]/dashboard/_components/ip-details-dialog.test.tsx:70
↓ 13 callersFunctionbuildUnifiedSpecialSettings
( params: BuildUnifiedSpecialSettingsParams )
src/lib/utils/special-settings.ts:176
↓ 13 callersFunctionbuildUsageLogConditions
(filters: UsageLogFilterParams)
src/repository/_shared/usage-log-filters.ts:136
↓ 13 callersMethodcheckCostLimits
* 检查金额限制(Key、Provider 或 User) * 优先使用 Redis,失败时降级到数据库查询(防止 Redis 清空后超支)
src/lib/rate-limit/service.ts:233
↓ 13 callersFunctioncopyTextToClipboard
(text: string)
src/lib/utils/clipboard.ts:39
↓ 13 callersFunctioncreateCircuitBreakerMock
(overrides: Partial<Record<string, unknown>> = {})
tests/unit/lib/provider-endpoints/probe.test.ts:26
↓ 13 callersFunctioncreateGlobalFilter
( scope: "header" | "body", action: "remove" | "set" | "json_path" | "text_replace", target: string, r
tests/unit/request-filter-binding.test.ts:32
↓ 13 callersFunctioncreateLoggerMock
()
tests/unit/lib/endpoint-circuit-breaker.test.ts:11
↓ 13 callersFunctioncreateTestKey
(params: { userId: number; key: string; name: string; canLoginWebUi: boolean; })
tests/api/my-usage-readonly.test.ts:110
↓ 13 callersFunctionct
(key: string)
src/app/[locale]/settings/providers/_components/forms/test-result-card.tsx:111
↓ 13 callersFunctiondecodedText
(result: { buffer: ArrayBuffer })
tests/unit/proxy/request-body-codec.test.ts:31
↓ 13 callersFunctiondetectClientStreamIntent
(input: StreamIntentInputs)
src/app/v1/_lib/proxy/fake-streaming/stream-intent.ts:32
↓ 13 callersFunctionemitErrorEvent
(ws, code, message)
server.js:103
↓ 13 callersFunctionflushTicks
(times = 3)
tests/unit/settings/providers/allowed-model-rule-editor.test.tsx:122
↓ 13 callersFunctionflushTicks
(times = 3)
tests/unit/settings/providers/provider-vendor-view-circuit-ui.test.tsx:183
↓ 13 callersFunctiongetTTLForPeriod
(period: TimePeriod, resetTime = "00:00")
src/lib/rate-limit/time-utils.ts:131
↓ 13 callersFunctiongetTranslation
(translations: Record<string, unknown>, path: string, fallback: string)
src/app/[locale]/dashboard/_components/user/forms/danger-zone.tsx:37
↓ 13 callersFunctioninjectClaudeMetadataUserId
( message: Record<string, unknown>, session: ProxySession )
src/app/v1/_lib/proxy/forwarder.ts:1016
↓ 13 callersFunctioninvalidateGroupMultiplierCache
()
src/repository/provider-groups.ts:51
↓ 13 callersFunctionisHedgeRace
(chain: ProviderChainItem[])
src/lib/utils/provider-chain-formatter.ts:186
↓ 13 callersFunctionmakeLog
(overrides: Partial<UsageLogRow>)
src/app/[locale]/dashboard/logs/_components/usage-logs-table.test.tsx:53
↓ 13 callersFunctionmakeLog
(overrides: Partial<UsageLogRow> = {})
tests/unit/usage-logs/export-xlsx.test.ts:6
↓ 13 callersFunctionmakePriceData
(overrides: Partial<ModelPriceData> = {})
tests/unit/lib/cost-calculation-breakdown.test.ts:10
↓ 13 callersFunctionmakePriceRecord
(modelName: string, priceData: ModelPriceData)
tests/unit/proxy/session.test.ts:65
↓ 13 callersFunctionmockJsonResponse
(body: unknown)
src/lib/provider-testing/test-service.test.ts:33
↓ 13 callersFunctionnormalizeAllowedModelRules
(value: unknown)
src/lib/allowed-model-rules.ts:61
↓ 13 callersFunctionparseJson
(c: Context, schema: JsonBodySchema<T>)
src/app/api/v1/resources/providers/handlers.ts:760
↓ 13 callersFunctionrenderWithIntl
(node: ReactNode)
src/app/[locale]/dashboard/logs/_components/provider-chain-popover.test.tsx:120
↓ 13 callersFunctionsanitizeRedirectPath
(from: string)
src/app/[locale]/login/redirect-safety.ts:6
↓ 13 callersFunctionsanitizeUrl
(url: string | URL)
src/app/v1/_lib/proxy/errors.ts:1247
↓ 13 callersFunctionsetProviderWithSessionRef
(session: ProxySession, provider: Provider)
tests/unit/proxy/proxy-forwarder-hedge-first-byte.test.ts:240
← previousnext →301–400 of 6,623, ranked by callers