MCPcopy Create free account

hub / github.com/QuantumNous/new-api / functions

Functions9,514 in github.com/QuantumNous/new-api

↓ 4 callersFunctionformatValue
(value: unknown)
web/src/features/models/components/dialogs/upstream-conflict-dialog.tsx:72
↓ 4 callersFunctiongetChannelTypeIcon
(type: number)
web/src/features/channels/lib/channel-utils.ts:47
↓ 4 callersFunctiongetDefaultAdvancedCustomIncomingPath
( converter: AdvancedCustomConverter )
web/src/features/channels/lib/advanced-custom.ts:442
↓ 4 callersFunctiongetDefaultDays
(granularity?: TimeGranularity)
web/src/features/dashboard/lib/filters.ts:138
↓ 4 callersFunctiongetJSONList
(jsonStr string)
setting/console_setting/validation.go:53
↓ 4 callersFunctiongetMinTopupAmount
(topupInfo: TopupInfo | null)
web/src/features/wallet/lib/payment.ts:153
↓ 4 callersFunctiongetModelListGroups
(c *gin.Context)
controller/model.go:179
↓ 4 callersFunctiongetPreferredSyncField
( ratioTypes: Partial<Record<RatioType, RatioDifferenceEntry>>, ratioType: RatioType, sourceName: string
web/src/features/system-settings/models/upstream-ratio-sync-helpers.ts:105
↓ 4 callersFunctiongetRollingDateRange
( days: number, fromDate: Date = new Date() )
web/src/lib/time.ts:90
↓ 4 callersFunctiongetRouteIncomingPath
(route: AdvancedCustomRoute)
web/src/features/channels/components/dialogs/advanced-custom-editor-dialog.tsx:138
↓ 4 callersFunctiongetStatus
()
web/src/lib/api.ts:70
↓ 4 callersFunctiongetSuccessRateDotClass
(rate: number)
web/src/features/performance-metrics/lib/format.ts:92
↓ 4 callersFunctionhasAnyCacheTokens
( other: LogOtherData | null | undefined )
web/src/features/usage-logs/lib/format.ts:302
↓ 4 callersFunctionhasMessageContent
(message: Message)
web/src/features/playground/lib/message/message-utils.ts:56
↓ 4 callersFunctioninferResponseRelayFormat
(response any)
relaykit/relayconvert/response_registry.go:708
↓ 4 callersFunctioninsertUserForPaymentGuardTest
(t *testing.T, id int, quota int)
model/payment_method_guard_test.go:12
↓ 4 callersFunctionintPtr
(v int)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_resp.go:230
↓ 4 callersFunctionisConverterPathAllowed
( incomingPath: string, converter: AdvancedCustomConverter )
web/src/features/channels/lib/advanced-custom.ts:836
↓ 4 callersFunctionisPlainObject
(value: unknown)
web/src/features/system-settings/hooks/use-settings-form.ts:34
↓ 4 callersFunctionisRedemptionExpired
( expired_time: number, status: number )
web/src/features/redemption-codes/lib/utils.ts:40
↓ 4 callersFunctionisResponsesToolOutputType
(outputType string)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_resp.go:250
↓ 4 callersFunctionisWaffoPancakeTopUpEnabled
()
controller/payment_webhook_availability.go:76
↓ 4 callersFunctionlinkStableKey
(link: Pick<DashboardFlowLink, 'source' | 'target'>)
web/src/features/dashboard/lib/flow.ts:503
↓ 4 callersFunctionloadKeyStatus
( page: number = currentPage, size: number = pageSize, status: number | null = statusFilter )
web/src/features/channels/components/dialogs/multi-key-manage-dialog.tsx:114
↓ 4 callersFunctionlogHelper
(ctx context.Context, level string, msg string)
logger/logger.go:97
↓ 4 callersFunctionmodelMeta
(modelName string, meta map[string]rankingModelMeta)
service/rankings.go:256
↓ 4 callersFunctionmustConvertResponsesToGemini
(t *testing.T, req dto.OpenAIResponsesRequest)
relay/channel/gemini/adaptor_responses_test.go:156
↓ 4 callersFunctionmustGeminiRawMessage
(t *testing.T, value any)
relay/channel/gemini/adaptor_responses_test.go:171
↓ 4 callersFunctionnewAwsInvokeContext
(parent context.Context)
relay/channel/aws/relay-aws.go:43
↓ 4 callersFunctionnewAwsInvokeError
(requestContext context.Context, err error, operation string)
relay/channel/aws/relay-aws.go:50
↓ 4 callersFunctionnewProtectedFetchHTTPClientWithProxy
(resolver ssrfResolver, dialContext func(ctx context.Context, network, address string) (net.Conn, error), getP
service/protected_fetch_client.go:66
↓ 4 callersFunctionnewResponsesChatTestContext
(t *testing.T, body string, isStream bool)
relay/channel/openai/chat_via_responses_test.go:19
↓ 4 callersFunctionnewWaffoPancakeClientFromCreds
(merchantID, privateKey string)
service/waffo_pancake.go:86
↓ 4 callersFunctionnormalizeJsonString
(value: string, fallback = '[]')
web/src/features/system-settings/content/utils.ts:29
↓ 4 callersFunctionnormalizeLang
normalizeLang normalizes language code to supported format
i18n/i18n.go:201
↓ 4 callersFunctionparseHttpStatusCodeRules
( input: unknown )
web/src/lib/http-status-code-rules.ts:32
↓ 4 callersFunctionparseJSONArray
(jsonStr string, typeName string)
setting/console_setting/validation.go:25
↓ 4 callersFunctionparseJsonArray
(data: unknown)
web/src/features/wallet/hooks/use-topup-info.ts:39
↓ 4 callersFunctionparseJsonToRows
(json: string)
web/src/components/json-editor.tsx:86
↓ 4 callersFunctionparseJsonToRows
(json: string)
web/src/features/channels/components/model-mapping-editor.tsx:78
↓ 4 callersFunctionparsePasskeyFinishRequest
(c *gin.Context)
controller/passkey.go:38
↓ 4 callersFunctionperformRateLimitRequest
(router http.Handler, path string, remoteAddr string)
middleware/rate_limit_test.go:40
↓ 4 callersFunctionprocessNegativeIndex
(data []byte, path string)
relay/common/override.go:563
↓ 4 callersFunctionrandomUsage
(rng *rand.Rand)
service/tiered_settle_test.go:946
↓ 4 callersFunctionratioQuota
(usage *dto.Usage, isClaudeSemantic bool, modelRatio, completionRatio, cacheRatio, imageRatio, groupRatio floa
service/tiered_settle_test.go:671
↓ 4 callersFunctionrefreshChannelRuntimeCache
()
controller/channel_upstream_update.go:523
↓ 4 callersFunctionremoveCookie
(name: string)
web/src/lib/cookies.ts:57
↓ 4 callersFunctionreplaceRoutes
( nextRoutes: AdvancedCustomRoute[], nextRouteKeys = routeRows.map((routeRow) => routeRow.routeKey)
web/src/features/channels/components/dialogs/advanced-custom-editor-dialog.tsx:255
↓ 4 callersFunctionresolveChatUrl
({ template, apiKey, serverAddress, }: ResolveChatUrlParams)
web/src/features/chat/lib/chat-links.ts:152
↓ 4 callersFunctionresolveWaffoPancakeAdminCreds
resolveWaffoPancakeAdminCreds prefers body creds (typed-but-not-yet-saved values, for verification) and falls back to persisted creds when the body is
controller/topup_waffo_pancake.go:156
↓ 4 callersFunctionsanitizeDBError
只收敛数据库服务端生成的驱动错误(消息可能内联数据值);网络/上下文等 其它错误不含查询数据,原样保留以便排障。
model/gorm_logger.go:68
↓ 4 callersFunctionsanitizeLikePattern
sanitizeLikePattern 校验并清洗用户输入的 LIKE 搜索模式。 规则: 1. 转义 ! 和 _(使用 ! 作为 ESCAPE 字符,兼容 MySQL/PostgreSQL/SQLite) 2. 连续的 % 合并为单个 % 3. 最多允许 2 个 % 4. 含 % 时(模糊搜索),
model/token.go:120
↓ 4 callersFunctionseedSubscriptionResetSub
(t *testing.T, sub *UserSubscription)
model/subscription_reset_test.go:17
↓ 4 callersFunctionsettleTaskBillingOnComplete
settleTaskBillingOnComplete 任务完成时的统一计费调整。 优先级:1. adaptor.AdjustBillingOnComplete 返回正数 → 使用 adaptor 计算的额度 2. taskResult.TotalTokens > 0 → 按 token 重算 3
service/task_polling.go:643
↓ 4 callersFunctionsetupDashboardAuthMiddlewareTest
(t *testing.T)
middleware/auth_test.go:24
↓ 4 callersFunctionsetupFlowControllerTestDB
(t *testing.T)
controller/usedata_flow_test.go:20
↓ 4 callersFunctionsideDrawerSwitchItemClassName
(className?: string)
web/src/components/drawer-layout.ts:54
↓ 4 callersFunctionsimulatePollBilling
=========================================================================== CAS + Billing integration tests Simulates the flow in updateVideoSingleTas
service/task_billing_test.go:573
↓ 4 callersFunctionsplitRefreshToken
(raw string)
service/auth_session.go:361
↓ 4 callersFunctiontestConn
(t *testing.T)
service/protected_fetch_client_test.go:32
↓ 4 callersFunctiontoCustomOAuthProviderResponse
(p *model.CustomOAuthProvider)
controller/custom_oauth.go:49
↓ 4 callersMethodtoolDelta
(tool *responsesStreamTool, explicitDelta string)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:386
↓ 4 callersFunctiontriggerRefresh
()
web/src/features/redemption-codes/components/redemptions-provider.tsx:47
↓ 4 callersFunctiontryParseRequestRuleExpr
( expr: string )
web/src/features/pricing/lib/billing-expr.ts:494
↓ 4 callersFunctionupdateModelStatus
( id: number, status: number )
web/src/features/models/api.ts:96
↓ 4 callersFunctionupdateUserCacheField
updateUserCacheField prevents individual cache refreshes from bypassing the auth-version fence. It intentionally does nothing when the complete hash i
model/user_cache.go:271
↓ 4 callersFunctionuseAuthRedirect
()
web/src/features/auth/hooks/use-auth-redirect.ts:32
↓ 4 callersFunctionuseCarousel
()
web/src/components/ui/carousel.tsx:54
↓ 4 callersFunctionuseChatPresets
()
web/src/features/chat/hooks/use-chat-presets.ts:67
↓ 4 callersFunctionuseConfirmation
()
web/src/components/ai-elements/confirmation.tsx:48
↓ 4 callersFunctionuseCountdown
(options: UseCountdownOptions = {})
web/src/hooks/use-countdown.ts:26
↓ 4 callersFunctionuseFormField
()
web/src/components/ui/form.tsx:153
↓ 4 callersFunctionuseLayout
()
web/src/context/layout-provider.tsx:98
↓ 4 callersFunctionusePromptInputAttachments
()
web/src/components/ai-elements/prompt-input.tsx:263
↓ 4 callersFunctionuseThemeRadiusPx
( cssVariable = '--radius-md', refreshKey?: string )
web/src/lib/theme-radius.ts:40
↓ 4 callersFunctionuserCacheTTLSeconds
()
model/user_cache.go:54
↓ 4 callersFunctionwithSystemTaskRegistry
withSystemTaskRegistry swaps the package registry for the given handlers for the duration of a test and restores the original registry afterward.
service/system_task_test.go:17
↓ 4 callersFunctionwriteRateLimited
writeRateLimited rejects the request with 429 and a Retry-After hint so clients can back off instead of treating the rejection as a fatal error. The i
middleware/rate-limit.go:139
↓ 4 callersFunctionwriteUserSessionDenyFence
(session *UserSession, status string, now int64, reason string)
model/user_session.go:384
↓ 3 callersMethodAddAbilities
(tx *gorm.DB)
model/ability.go:196
↓ 3 callersMethodAddPolicy
(_ string, ptype string, rule []string)
service/authz/adapter.go:57
↓ 3 callersFunctionAddToken
(c *gin.Context)
controller/token.go:264
↓ 3 callersFunctionAdminAuth
()
middleware/auth.go:98
↓ 3 callersFunctionAdminBindSubscription
Admin bind (no payment). Creates a UserSubscription from a plan.
model/subscription.go:705
↓ 3 callersFunctionAdminResetPlanSubscriptions
(planId int, advanceResetTime bool)
model/subscription.go:1101
↓ 3 callersFunctionApplyChannelGroupFilter
(query *gorm.DB, group string)
model/channel.go:156
↓ 3 callersMethodArgumentsString
ArgumentsString returns function call arguments in the string form expected by Chat Completions.
relaykit/dto/openai_response.go:342
↓ 3 callersFunctionCORS
()
middleware/cors.go:9
↓ 3 callersMethodCacheCreationTokensTotal
CacheCreationTokensTotal returns the cache-write token count regardless of which field the upstream reported it in: Claude-derived conversions populat
relaykit/dto/openai_response.go:275
↓ 3 callersFunctionCacheGetRandomSatisfiedChannel
CacheGetRandomSatisfiedChannel tries to get a random channel that satisfies the requirements. 尝试获取一个满足要求的随机渠道。 For "auto" tokenGroup with cross-group
service/channel_select.go:83
↓ 3 callersFunctionChatCompletionsRequestToResponsesRequest
(req *dto.GeneralOpenAIRequest)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_req.go:76
↓ 3 callersFunctionClaimExternalAuthAssertionWithTx
ClaimExternalAuthAssertionWithTx records a provider assertion in the caller's transaction so replay protection can commit atomically with the authenti
model/auth_flow.go:133
↓ 3 callersFunctionClaudeData
(c *gin.Context, resp dto.ClaudeResponse)
relay/helper/common.go:61
↓ 3 callersFunctionClearRefreshCookie
(c *gin.Context)
service/auth_session.go:315
↓ 3 callersFunctionCompileFromCache
CompileFromCache compiles an expression string, using a cached program when available. The cache is keyed by the SHA-256 hex digest of the expression.
pkg/billingexpr/compile.go:77
↓ 3 callersFunctionComputeTieredQuotaWithRequest
(snap *BillingSnapshot, params TokenParams, request RequestInput)
pkg/billingexpr/settle.go:21
↓ 3 callersFunctionConsumeAuthFlowWithAction
ConsumeAuthFlowWithAction consumes a flow and runs action in the same database transaction. An action failure rolls the consumption back.
model/auth_flow.go:189
↓ 3 callersMethodConvertEmbeddingRequest
(c *gin.Context, info *relaycommon.RelayInfo, request dto.EmbeddingRequest)
relay/channel/adapter.go:23
↓ 3 callersMethodConvertOpenAIRequest
(c *gin.Context, info *relaycommon.RelayInfo, request *dto.GeneralOpenAIRequest)
relay/channel/advancedcustom/adaptor.go:47
↓ 3 callersMethodConvertOpenAIResponsesRequest
(c *gin.Context, info *relaycommon.RelayInfo, request dto.OpenAIResponsesRequest)
relay/channel/advancedcustom/adaptor.go:118
← previousnext →801–900 of 9,514, ranked by callers