MCPcopy Create free account

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

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

↓ 3 callersFunctionupdateOpenAIImageCount
(info *relaycommon.RelayInfo, count int64)
relay/channel/openai/relay_image.go:25
↓ 3 callersFunctionupdateOptionMap
(key string, value string)
model/option.go:275
↓ 3 callersMethodupdateUsageState
()
model/twofa.go:92
↓ 3 callersFunctionupdateUserCacheFieldAtVersion
(userId int, field string, value interface{}, authVersion int64)
model/user_auth_cache.go:243
↓ 3 callersFunctionusageFromClaudeResponse
(resp *dto.ClaudeResponse)
relaykit/relayconvert/response_registry.go:782
↓ 3 callersFunctionuseCarouselApi
()
web/src/components/ai-elements/inline-citation.tsx:115
↓ 3 callersFunctionuseDialogs
()
web/src/hooks/use-dialog.ts:131
↓ 3 callersFunctionuseInvalidateOnSuccess
()
web/src/features/system-settings/auth/custom-oauth/hooks/use-custom-oauth-mutations.ts:31
↓ 3 callersFunctionuseSettingsForm
({ onSubmit, compareValues, defaultValues, ...formOptions }: SettingsFormOptions<T>)
web/src/features/system-settings/hooks/use-settings-form.ts:185
↓ 3 callersFunctionuseStatusData
( enabledKey: string, dataKey: string )
web/src/features/dashboard/hooks/use-status-data.ts:26
↓ 3 callersFunctionuseSystemOptions
()
web/src/features/system-settings/hooks/use-system-options.ts:23
↓ 3 callersFunctionuseTopNavLinks
()
web/src/hooks/use-top-nav-links.ts:46
↓ 3 callersFunctionuseTurnstile
()
web/src/features/auth/hooks/use-turnstile.ts:28
↓ 3 callersFunctionuseWebPreview
()
web/src/components/ai-elements/web-preview.tsx:57
↓ 3 callersFunctionuserAuthFenceTTLSeconds
A pending fence only covers the interval between publishing the next version and the surrounding database transaction reaching a decision. Its TTL mus
model/user_auth_cache.go:39
↓ 3 callersFunctionuserRateLimitFactory
userRateLimitFactory creates a rate limiter keyed by authenticated user ID instead of client IP, making it resistant to proxy rotation attacks. Must b
middleware/rate-limit.go:192
↓ 3 callersFunctionvalidateJsonString
( value: string, options: JsonValidationOptions = {} )
web/src/features/system-settings/models/utils.ts:145
↓ 3 callersFunctionvalidateOptionValue
(key string, value string)
model/option.go:208
↓ 3 callersFunctionvalidateTurnstile
()
web/src/features/auth/hooks/use-turnstile.ts:40
↓ 3 callersFunctionverifyTelegramAuthorization
(params url.Values, token string, now time.Time)
controller/telegram.go:298
↓ 3 callersFunctionwarnLegacyProxyURLOnce
(config *proxyURLConfig)
service/http_client.go:150
↓ 3 callersFunctionwechatLoginByCode
(code: string)
web/src/features/auth/api.ts:161
↓ 3 callersFunctionwithNormalizedEmailLock
withNormalizedEmailLock serializes concurrent writers that target the same normalized email inside tx, so a "check then write" sequence cannot be race
model/user.go:324
↓ 3 callersFunctionwriteDashboardAuthError
(c *gin.Context, err error)
middleware/auth.go:209
↓ 3 callersFunctionwriteStoredValue
(key: string, data: T)
web/src/features/playground/lib/storage/storage.ts:80
↓ 2 callersFunctionAcSearch
(findText string, dict []string, stopImmediately bool)
service/str.go:132
↓ 2 callersFunctionAllOption
()
model/option.go:23
↓ 2 callersFunctionAppendChannelAffinityAdminInfo
(c *gin.Context, adminInfo map[string]interface{})
service/channel_affinity.go:702
↓ 2 callersMethodApply
(query *gorm.DB)
model/user.go:52
↓ 2 callersMethodApplyOtherRatiosToDecimal
(value decimal.Decimal)
types/price_data.go:88
↓ 2 callersFunctionBodyStorageCleanup
BodyStorageCleanup 请求体存储清理中间件 在请求处理完成后自动清理磁盘/内存缓存
middleware/body_cleanup.go:11
↓ 2 callersFunctionBuildAPIBaseURL
(baseURL, version, projectID, region string)
relay/channel/vertex/url_builder.go:38
↓ 2 callersFunctionBuildBillingExprRequestInputFromRequest
(request dto.Request, headers map[string]string)
relay/helper/billing_expr_request.go:37
↓ 2 callersFunctionBuildParamOverrideContext
BuildParamOverrideContext 提供 ApplyParamOverride 可用的上下文信息。 目前内置以下字段: - upstream_model/model:始终为通道映射后的上游模型名。 - original_model:请求最初指定的模型名。 - request_path
relay/common/override.go:2048
↓ 2 callersFunctionBuildProxyURL
BuildProxyURL constructs the video proxy URL using the public task ID. e.g., "https://your-server.com/v1/videos/task_xxxx/content"
relay/channel/task/taskcommon/helpers.go:65
↓ 2 callersFunctionBuildPublisherModelURL
(baseURL, version, projectID, region, publisher, modelName, action string)
relay/channel/vertex/url_builder.go:63
↓ 2 callersFunctionBumpUserAuthVersion
BumpUserAuthVersion is the transaction-owning variant used by password, role, status and security-factor changes outside another transaction.
model/user_auth_cache.go:212
↓ 2 callersFunctionChatCompletionsResponseToResponsesResponse
(resp *dto.OpenAITextResponse, id string)
relaykit/relayconvert/response_compat.go:83
↓ 2 callersFunctionChatCompletionsResponseToResponsesResponse
(resp *dto.OpenAITextResponse, id string)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_resp.go:34
↓ 2 callersMethodCheckClusterNameAvailability
CheckClusterNameAvailability checks if a cluster name is available
pkg/ionet/deployment.go:327
↓ 2 callersFunctionCheckUserExistOrDeleted
CheckUserExistOrDeleted check if user exist or deleted, if not exist, return false, nil, if deleted or exist, return true, nil
model/user.go:240
↓ 2 callersFunctionCleanupOldDiskCacheFiles
CleanupOldDiskCacheFiles 清理旧的缓存文件 maxAge: 文件最大存活时间 注意:此函数只删除文件,不更新统计(因为无法知道每个文件的原始大小)
common/disk_cache.go:109
↓ 2 callersMethodClearBinding
(bindingType string)
model/user.go:814
↓ 2 callersFunctionClearCurrentChannelAffinityCache
(c *gin.Context)
service/channel_affinity.go:644
↓ 2 callersFunctionClearUserAuthorizationInTx
(tx *gorm.DB, userID int)
service/authz/override.go:97
↓ 2 callersMethodClose
()
relay/channel/gemini/relay_responses_test.go:192
↓ 2 callersFunctionContainsAudioCompletionRatio
(name string)
setting/ratio_setting/model_ratio.go:645
↓ 2 callersFunctionContainsAudioRatio
(name string)
setting/ratio_setting/model_ratio.go:639
↓ 2 callersFunctionContainsGroupRatio
(name string)
setting/ratio_setting/group_ratio.go:66
↓ 2 callersFunctionContainsPayMethod
(method string)
setting/operation_setting/payment_setting_old.go:52
↓ 2 callersFunctionContentPartToFileSource
(part map[string]any)
relaykit/relayconvert/internal/oai_responses/req_helpers.go:211
↓ 2 callersFunctionContentParts
(content any)
relaykit/relayconvert/internal/oai_responses/req_helpers.go:95
↓ 2 callersMethodConvertAudioRequest
(c *gin.Context, info *relaycommon.RelayInfo, request dto.AudioRequest)
relay/channel/adapter.go:24
↓ 2 callersMethodConvertClaudeRequest
(c *gin.Context, info *relaycommon.RelayInfo, request *dto.ClaudeRequest)
relay/channel/adapter.go:31
↓ 2 callersMethodConvertGeminiRequest
(c *gin.Context, info *relaycommon.RelayInfo, request *dto.GeminiChatRequest)
relay/channel/adapter.go:32
↓ 2 callersMethodConvertOpenAIRequest
(c *gin.Context, info *relaycommon.RelayInfo, request *dto.GeneralOpenAIRequest)
relay/channel/openai/adaptor.go:244
↓ 2 callersFunctionConvertSimpleChangeParams
(content string)
service/midjourney.go:136
↓ 2 callersFunctionCountActiveUserSessions
(userID int, now int64)
model/user_session.go:169
↓ 2 callersFunctionCountChannelTags
(query *gorm.DB)
model/channel.go:1102
↓ 2 callersFunctionCountOldLog
(ctx context.Context, targetTimestamp int64)
model/log.go:695
↓ 2 callersFunctionCoverPlusActionToNormalAction
(midjRequest *dto.MidjourneyRequest)
service/midjourney.go:77
↓ 2 callersFunctionCoverTaskActionToModelName
(platform constant.TaskPlatform, action string)
service/task.go:9
↓ 2 callersFunctionCreateLoginSessionAtAuthVersion
(userID int, expectedAuthVersion int64, loginMethod, ip, userAgent string)
service/auth_session.go:49
↓ 2 callersFunctionCreateWaffoPancakeCheckoutSession
CreateWaffoPancakeCheckoutSession creates an Authenticated-mode checkout session: the order is bound to BuyerIdentity (stable per user) so it stays at
service/waffo_pancake.go:99
↓ 2 callersFunctionCriticalRateLimit
()
middleware/rate-limit.go:174
↓ 2 callersFunctionDecodeBase64ImageData
return image.Config, format, clean base64 string, error
service/image.go:20
↓ 2 callersFunctionDefaultInt
DefaultInt returns val if non-zero, otherwise fallback.
relay/channel/task/taskcommon/helpers.go:41
↓ 2 callersMethodDefaultMaxTokensFor
(modelName string)
relaykit/relayconvert/convmeta/options.go:59
↓ 2 callersFunctionDefaultString
DefaultString returns val if non-empty, otherwise fallback.
relay/channel/task/taskcommon/helpers.go:33
↓ 2 callersMethodDelete
()
model/redemption.go:206
↓ 2 callersMethodDelete
()
model/token.go:347
↓ 2 callersFunctionDeleteExpiredUserSessions
(now int64)
model/user_session.go:776
↓ 2 callersFunctionDeleteOldRevokedUserSessions
(now int64)
model/user_session.go:788
↓ 2 callersMethodDeletePendingTwoFASetup
DeletePendingTwoFASetup removes only an unverified setup. Enabled factors must use DisableTwoFAWithAuthVersion.
model/twofa.go:105
↓ 2 callersFunctionDeleteUserOAuthBinding
DeleteUserOAuthBinding deletes an OAuth binding
model/user_oauth_binding.go:133
↓ 2 callersFunctionDisableCache
()
middleware/disable-cache.go:5
↓ 2 callersFunctionDisableChannel
disable & notify
service/channel.go:19
↓ 2 callersFunctionDoFormRequest
(a Adaptor, c *gin.Context, info *common.RelayInfo, requestBody io.Reader)
relay/channel/api_request.go:337
↓ 2 callersFunctionDoWssRequest
(a Adaptor, c *gin.Context, info *common.RelayInfo, requestBody io.Reader)
relay/channel/api_request.go:369
↓ 2 callersMethodEditWithTx
(tx *gorm.DB, updatePassword bool)
model/user.go:777
↓ 2 callersMethodEnableWithAuthVersion
EnableWithAuthVersion atomically enables this factor and advances the user authentication version so pre-enrollment sessions cannot remain valid.
model/twofa.go:303
↓ 2 callersFunctionErrOptionWithStatusCode
(statusCode int)
relaykit/types/error.go:393
↓ 2 callersMethodError
()
oauth/linuxdo.go:193
↓ 2 callersFunctionEstimateTokenByModel
(model, text string)
service/token_estimator.go:216
↓ 2 callersMethodExchangeToken
ExchangeToken exchanges the authorization code for an access token The gin.Context is passed for providers that need request info (e.g., for redirect_
oauth/provider.go:20
↓ 2 callersFunctionExpireStaleSystemTaskLocks
(now int64)
model/system_task.go:360
↓ 2 callersFunctionExplicitUserOverrides
ExplicitUserOverrides returns only the per-user override entries.
service/authz/override.go:108
↓ 2 callersFunctionExtendWriteDeadline
ExtendWriteDeadline pushes the connection write deadline forward before each stream write. Best-effort: writers that don't support deadlines (e.g. htt
relay/helper/stream_scanner.go:70
↓ 2 callersMethodFetchTask
(baseURL string, key string, body map[string]any, proxy string)
service/task_polling.go:30
↓ 2 callersFunctionFindEarliestPendingSystemTasks
(taskTypes []string)
model/system_task.go:158
↓ 2 callersFunctionFixAbility
()
model/ability.go:337
↓ 2 callersFunctionGeminiChatStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/gemini/relay-gemini.go:209
↓ 2 callersFunctionGeminiImageHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/gemini/relay-gemini.go:437
↓ 2 callersFunctionGeminiResponsesStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/gemini/relay_responses.go:82
↓ 2 callersFunctionGeminiTextGenerationStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/gemini/relay-gemini-native.go:81
↓ 2 callersFunctionGenerateBackupCodes
GenerateBackupCodes 生成备用恢复码
common/totp.go:49
↓ 2 callersFunctionGenerateKey
()
common/utils.go:254
↓ 2 callersFunctionGenerateMjOtherInfo
(relayInfo *relaycommon.RelayInfo, priceData hosttypes.PriceData)
service/log_info_generate.go:293
↓ 2 callersFunctionGenerateOAuthCode
GenerateOAuthCode generates a state code for OAuth CSRF protection
controller/oauth.go:38
↓ 2 callersFunctionGenerateStartEmptyResponse
(id string, createAt int64, model string, systemFingerprint *string)
relay/helper/common.go:184
← previousnext →1,301–1,400 of 9,514, ranked by callers