MCPcopy Create free account

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

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

↓ 5 callersFunctionensureOpenAIChatStreamUsageOption
( body: Record<string, unknown>, providerType: string | null | undefined, requestPath: string )
src/app/v1/_lib/proxy/openai-chat-usage-options.ts:3
↓ 5 callersFunctionensurePricingResolutionSpecialSetting
( session: ProxySession, resolvedPricing: Awaited<ReturnType<ProxySession["getResolvedPricingByBillingSour
src/app/v1/_lib/proxy/response-handler.ts:164
↓ 5 callersFunctionensureVisibleProviderIds
(c: Context, ids: number[])
src/app/api/v1/resources/providers/handlers.ts:553
↓ 5 callersMethodevictByKey
(key: string, retiredBy: AgentRetirementReason, retireReason: string)
src/lib/proxy-agent/agent-pool.ts:613
↓ 5 callersMethodevictEndpoint
* Evict all Agents for a specific endpoint
src/lib/proxy-agent/agent-pool.ts:148
↓ 5 callersFunctionexceedsProviderGroupDescriptionLimit
(value: string | null | undefined)
src/lib/public-status/description-limit.ts:7
↓ 5 callersFunctionexecuteProviderApiTest
( data: ProviderApiTestArgs, options: { path: string | ((model: string, apiKey: string) => string);
src/actions/providers.ts:3895
↓ 5 callersFunctionexpectStatusCodeOnlyFinalizedBoundary
(sqlText: string)
tests/unit/lib/availability-service.test.ts:56
↓ 5 callersFunctionextractAnthropicEffortFromSpecialSettings
( specialSettings: SpecialSetting[] | null | undefined )
src/lib/utils/anthropic-effort.ts:25
↓ 5 callersFunctionextractFirstTextSnippet
( response: ProviderApiResponse, maxLength?: number )
src/actions/providers.ts:3334
↓ 5 callersFunctionextractUsageMetrics
(value: unknown)
src/app/v1/_lib/proxy/response-handler.ts:3105
↓ 5 callersFunctionfetchGroups
()
src/app/[locale]/settings/providers/_components/forms/provider-form/index.tsx:817
↓ 5 callersFunctionfindDailyModelLeaderboard
()
src/repository/leaderboard.ts:1086
↓ 5 callersFunctionfindLatestPriceByModel
(modelName: string)
src/repository/model-price.ts:35
↓ 5 callersFunctionfindModelLeaderboardWithTimezone
* 通用模型排行榜查询函数(使用 SQL AT TIME ZONE 确保时区正确) * 根据系统配置的 billingModelSource 决定使用哪个模型字段进行统计
src/repository/leaderboard.ts:1120
↓ 5 callersFunctionfindProviderCacheHitRateLeaderboardWithTimezone
* 通用供应商缓存命中率排行榜查询函数 * * 计算规则: * - 仅统计需要缓存的请求(cache_creation_input_tokens 与 cache_read_input_tokens 不同时为 0/null) * - 命中率 = cache_read / (input + ca
src/repository/leaderboard.ts:794
↓ 5 callersFunctionfindProviderEndpointsByVendorAndType
( vendorId: number, providerType: ProviderType )
src/repository/provider-endpoints.ts:998
↓ 5 callersFunctionfindProviderLeaderboardWithTimezone
* 通用供应商排行榜查询函数(使用 SQL AT TIME ZONE 确保时区正确) * includeModelStats=true 时会额外返回按模型拆分的统计数据(modelStats)
src/repository/leaderboard.ts:633
↓ 5 callersFunctionfindProviderModelCacheHitRateMetricsForAlert
( timeRange: TimeRange, providerType?: ProviderType, config: CacheHitRateAlertQueryConfig = {} )
src/repository/cache-hit-rate-alert.ts:113
↓ 5 callersFunctionfindUserCacheHitRateLeaderboardWithTimezone
* 查询自定义日期范围供应商消耗排行榜 * includeModelStats=true 时会额外返回按模型拆分的统计数据(modelStats)
src/repository/leaderboard.ts:918
↓ 5 callersFunctionfinishRequest
(options?: { closeCode?: number; forgetSession?: boolean })
src/app/v1/_lib/responses-ws/upstream-adapter.ts:645
↓ 5 callersFunctionflush
()
tests/unit/error-rules-list-refresh-ui.test.tsx:156
↓ 5 callersMethodflush
()
src/repository/message-write-buffer.ts:289
↓ 5 callersFunctionflushMessageRequestWriteBuffer
()
src/repository/message-write-buffer.ts:377
↓ 5 callersFunctionflushTicks
(times = 4)
tests/unit/settings/providers/model-multi-select.test.tsx:157
↓ 5 callersFunctionformatDate
(date: Date)
src/app/[locale]/dashboard/logs/_components/logs-date-range-picker.tsx:30
↓ 5 callersFunctionformatDateTime
(date: Date | string, timezone: string)
src/lib/webhook/utils/date.ts:14
↓ 5 callersFunctionformatGeminiResponse
(models: FetchedModel[])
src/app/v1/_lib/models/available-models.ts:406
↓ 5 callersFunctionformatMs
(ms: number)
src/app/[locale]/dashboard/logs/_components/error-details-dialog/components/LatencyBreakdownBar.tsx:17
↓ 5 callersFunctionformatOpenAIResponse
(models: FetchedModel[])
src/app/v1/_lib/models/available-models.ts:361
↓ 5 callersFunctionformatPerMillionTokenPriceLabel
(value?: number)
src/app/[locale]/settings/prices/_components/price-list.tsx:269
↓ 5 callersFunctionformatPerTokenPriceToPerMillion
(value?: number)
src/app/[locale]/settings/prices/_components/model-price-drawer.tsx:71
↓ 5 callersFunctionformatSseData
(payload: unknown)
src/app/v1/_lib/proxy/fake-streaming/emitters.ts:377
↓ 5 callersFunctionformatValue
(value: number, unit?: string)
src/app/[locale]/dashboard/_components/user/user-limit-badge.tsx:37
↓ 5 callersMethodfromSession
( session: Pick<ProxySession, "getEndpointPolicy"> & { isRawCrossProviderFallbackEnabled?: (() => bo
src/app/v1/_lib/proxy/guard-pipeline.ts:161
↓ 5 callersMethodget5hWindowResetAt
( id: number, type: "key" | "provider" | "user", resetMode: DailyResetMode = "rolling" )
src/lib/rate-limit/service.ts:178
↓ 5 callersMethodgetAccessToken
(key: string)
src/app/v1/_lib/gemini/auth.ts:29
↓ 5 callersFunctiongetCacheStats
()
src/actions/error-rules.ts:615
↓ 5 callersMethodgetCacheTtlResolved
()
src/app/v1/_lib/proxy/session.ts:375
↓ 5 callersFunctiongetCachedUser
(userId: number)
src/lib/security/api-key-auth-cache.ts:321
↓ 5 callersFunctiongetClientIp
(source: HeadersLike, override?: IpExtractionConfig)
src/lib/ip/index.ts:39
↓ 5 callersMethodgetCurrentCostBatch
* 批量获取多个供应商的限额消费(Redis Pipeline) * 用于避免 N+1 查询问题 * * @param providerIds - 供应商 ID 列表 * @param dailyResetConfigs - 每个供应商的日限额重置配置 * @retur
src/lib/rate-limit/service.ts:1553
↓ 5 callersFunctiongetDashboardProviderEndpoints
(input: { vendorId: number; providerType: ProviderType; })
src/actions/provider-endpoints.ts:344
↓ 5 callersFunctiongetDockerComposeExec
()
src/lib/database-backup/docker-executor.ts:14
↓ 5 callersMethodgetLastSelectionContext
* 获取上次选择的决策上下文
src/app/v1/_lib/proxy/session.ts:907
↓ 5 callersFunctiongetOverlay
()
tests/unit/login/login-loading-state.test.tsx:82
↓ 5 callersFunctiongetOverviewData
()
src/actions/overview.ts:40
↓ 5 callersFunctiongetParseHeaderRecordWarnCalls
()
tests/unit/lib/session-manager-helpers.test.ts:6
↓ 5 callersFunctiongetProviderModelRedirectTarget
( model: string, rules: ProviderModelRedirectRule[] | null | undefined )
src/lib/provider-model-redirects.ts:117
↓ 5 callersFunctiongetSafeErrorToastMessage
(message: string, fallback: string)
src/lib/utils/user-visible-error.ts:68
↓ 5 callersFunctiongetSelectedChildren
( values: string[], preset: ClientRestrictionPresetOption )
src/lib/client-restrictions/client-presets.ts:117
↓ 5 callersMethodgetSource
(id: string)
src/components/ui/__tests__/map.test.tsx:321
↓ 5 callersFunctiongetSwitch
(id: string)
tests/unit/settings/system-settings-form-upstream-error-message.test.tsx:141
↓ 5 callersFunctiongetTranslation
(translations: Record<string, unknown>, path: string, fallback: string)
src/app/[locale]/dashboard/_components/user/forms/limit-rules-display.tsx:30
↓ 5 callersFunctiongetUserStatistics
( timeRange: TimeRange = DEFAULT_TIME_RANGE )
src/actions/statistics.ts:30
↓ 5 callersFunctiongetUsers
(params?: GetUsersBatchParams)
src/actions/users.ts:459
↓ 5 callersFunctiongetWebhookTargetById
(id: number)
src/repository/webhook-targets.ts:89
↓ 5 callersFunctionhandleDisabledCircuitBreaker
( providerId: number, health: ProviderHealth, config: CircuitBreakerConfig )
src/lib/circuit-breaker.ts:233
↓ 5 callersFunctionhandleFilterChange
(newFilters: Omit<typeof filters, "page">)
src/app/[locale]/dashboard/logs/_components/usage-logs-view-virtualized.tsx:243
↓ 5 callersFunctionhasKeyQuotaSet
(quota: KeyQuota)
src/lib/utils/quota-helpers.ts:28
↓ 5 callersFunctionimportRebuildWorkerModule
()
tests/unit/public-status/rebuild-worker.test.ts:80
↓ 5 callersFunctionindexOf
(haystack: string, needle: string)
src/app/v1/_lib/proxy/response-fixer/response-fixer.test.ts:461
↓ 5 callersFunctioninsertLedgerOnlyRow
(params: { requestId?: number; userId: number; key: string; model: string; endpoint: string; costU
tests/integration/my-usage-imported-ledger.test.ts:164
↓ 5 callersFunctionintervalToRepeat
* 将“每 N 分钟”间隔映射为 Bull 的 repeat 选项。 * Bull cron 的分钟字段仅 0-59,且分钟步进表达式在 N 不整除 60 时(如 45)会在整点边界产生不均匀间隔, * 因此仅当 N<=59 且能整除 60 时使用 cron(可携带时区);否则退化为固定毫秒间隔
src/lib/notification/notification-queue.ts:777
↓ 5 callersFunctioninvalidateStatisticsCache
( timeRange?: TimeRange, userId?: number )
src/lib/redis/statistics-cache.ts:153
↓ 5 callersFunctionisBrowser
()
src/app/[locale]/status/_lib/group-order-store.ts:4
↓ 5 callersFunctionisBuiltinKeyword
(pattern: string)
src/app/v1/_lib/proxy/client-detector.ts:168
↓ 5 callersMethodisDefinitelyNotPresent
* 返回: * - true:过滤器“肯定判断不存在”(可直接拒绝) * - false:过滤器认为“可能存在”(必须继续走 DB) * - null:过滤器未就绪或未启用(不要短路)
src/lib/security/api-key-vacuum-filter.ts:144
↓ 5 callersFunctionisPlainObject
(value: unknown)
src/lib/notification/notification-queue.ts:55
↓ 5 callersFunctionisPriceLikeFieldKey
(key: string)
src/lib/utils/model-price-fields.ts:114
↓ 5 callersFunctionisPrivateIp
(ip: string)
src/lib/ip/private-ip.ts:58
↓ 5 callersMethodisRawCrossProviderFallbackEnabled
()
src/app/v1/_lib/proxy/session.ts:412
↓ 5 callersFunctionisStandardProxyEndpointPath
(pathname: string)
src/app/v1/_lib/proxy/endpoint-family-catalog.ts:462
↓ 5 callersFunctionjsonResponse
(body: Record<string, unknown>, status: number)
tests/unit/api/health-routes.test.ts:14
↓ 5 callersFunctionloadLogoutPost
()
tests/security/session-fixation-rotation.test.ts:80
↓ 5 callersFunctionloadMessages
()
tests/unit/settings/providers/model-multi-select.test.tsx:130
↓ 5 callersFunctionloadMessages
()
tests/unit/settings/providers/allowed-model-rule-editor.test.tsx:95
↓ 5 callersFunctionloadPublicStatusPageData
(input?: { groupSlug?: string; })
src/lib/public-status/public-api-loader.ts:79
↓ 5 callersFunctionloadServerModule
()
tests/unit/server-shutdown.test.ts:24
↓ 5 callersFunctionmakeContext
(apiKey: string)
tests/unit/models/available-models-auth-outcome.test.ts:51
↓ 5 callersFunctionmakeEndpoint
(input: { id: number; vendorId: number; providerType: ProviderType; url: string; })
tests/unit/proxy/proxy-forwarder-endpoint-audit.test.ts:89
↓ 5 callersFunctionmakeLogoutRequest
()
tests/security/session-fixation-rotation.test.ts:71
↓ 5 callersFunctionmakePriceData
(overrides: Partial<ModelPriceData> = {})
tests/unit/lib/cost-calculation-priority.test.ts:5
↓ 5 callersFunctionmakeRequest
(pathname: string, cookies: Record<string, string> = {})
tests/unit/proxy/proxy-auth-cookie-passthrough.test.ts:25
↓ 5 callersFunctionmakeReturningResult
(count: number)
tests/unit/lib/log-cleanup/service-count.test.ts:39
↓ 5 callersFunctionmakeSuffix
()
tests/integration/provider-endpoint-index-and-repair.test.ts:9
↓ 5 callersFunctionmakeTimeRange
(startTime: Date, endTime: Date = NOW)
tests/unit/actions/key-quota-cost-reset.test.ts:78
↓ 5 callersFunctionmarkResponsesWsUnsupported
( providerId: number, endpointId: number | null | undefined, reason: string, ttlMs: number = DEFAULT_T
src/app/v1/_lib/responses-ws/unsupported-cache.ts:25
↓ 5 callersFunctionmount
(element: React.ReactNode)
tests/unit/error-rules-list-refresh-ui.test.tsx:147
↓ 5 callersFunctionnormalize
(value: unknown)
src/app/v1/_lib/proxy/actual-response-model.ts:132
↓ 5 callersFunctionnormalizeCacheHitRateAlertWindowMode
( value: unknown )
src/repository/notifications.ts:216
↓ 5 callersFunctionnormalizeResponseInput
(session: ProxySession)
src/app/v1/_lib/proxy/response-input-rectifier.ts:80
↓ 5 callersFunctionnormalizeRule
(rule: ProviderModelRedirectRule)
src/app/[locale]/settings/providers/_components/model-redirect-editor.tsx:42
↓ 5 callersFunctionnormalizeUserListParams
(params?: GetUsersBatchParams)
src/actions/users.ts:92
↓ 5 callersFunctionnormalizeValue
(value: number)
tests/unit/dashboard/availability/gauge-card.test.tsx:166
↓ 5 callersFunctionopenPicker
()
tests/unit/settings/providers/model-multi-select.test.tsx:171
↓ 5 callersFunctionparseBoolean
(value: unknown)
src/app/v1/_lib/proxy/openai-image-compat.ts:145
↓ 5 callersFunctionparseIntWithDefault
(value: string | undefined, fallback: number)
src/lib/provider-endpoints/probe-scheduler.ts:17
↓ 5 callersFunctionparseNumericLimit
(val: string | null)
src/actions/key-quota.ts:92
↓ 5 callersFunctionparsePositiveInt
(value: string | undefined, fallback: number)
tests/vitest.base.ts:33
← previousnext →1,201–1,300 of 6,623, ranked by callers