MCPcopy Create free account

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

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

↓ 3 callersFunctionConvertRequestVia
(c context.Context, info convmeta.Meta, request any, path ...types.RelayFormat)
relaykit/relayconvert/request_registry.go:174
↓ 3 callersMethodConvertRerankRequest
(c *gin.Context, relayMode int, request dto.RerankRequest)
relay/channel/adapter.go:22
↓ 3 callersFunctionCountUserSessionsCreatedSince
CountUserSessionsCreatedSince counts every issued row, regardless of its current status or expiry. userID zero selects the global count.
model/user_session.go:185
↓ 3 callersFunctionCountUserTokens
CountUserTokens returns total number of tokens for the given user, used for pagination
model/token.go:466
↓ 3 callersFunctionCreateBodyStorage
CreateBodyStorage 根据数据大小创建合适的存储
common/body_storage.go:241
↓ 3 callersFunctionCreateDiskCacheFile
CreateDiskCacheFile 创建磁盘缓存文件 cacheType: 缓存类型(body/file) 返回文件路径和文件句柄
common/disk_cache.go:42
↓ 3 callersFunctionCreatePendingTwoFASetupBackupCodes
CreatePendingTwoFASetupBackupCodes stores recovery codes for an unverified setup. Regeneration for an enabled factor must advance auth_version.
model/twofa.go:189
↓ 3 callersFunctionDeletePasskeyByUserIDWithAuthVersion
(userID int)
model/passkey.go:218
↓ 3 callersFunctionDisableTwoFAWithAuthVersion
DisableTwoFAWithAuthVersion atomically removes the factor and invalidates every access token issued against the previous security configuration.
model/twofa.go:279
↓ 3 callersFunctionDistribute
()
middleware/distributor.go:33
↓ 3 callersFunctionDoMidjourneyHttpRequest
(c *gin.Context, timeout time.Duration, fullRequestURL string)
service/midjourney.go:165
↓ 3 callersFunctionEmailVerificationRateLimit
()
middleware/email-verification-rate-limit.go:61
↓ 3 callersFunctionEncodeLocalTaskID
EncodeLocalTaskID encodes an upstream operation name to a URL-safe base64 string. Used by Gemini/Vertex to store upstream names as task IDs.
relay/channel/task/taskcommon/helpers.go:50
↓ 3 callersFunctionEnqueueSystemTask
EnqueueSystemTask creates an on-demand task of the given type. The returned bool is true only when a new pending row was created; false means an activ
service/system_task.go:201
↓ 3 callersFunctionEnsureEmailAvailable
(email string, excludeUserID int)
model/user.go:301
↓ 3 callersFunctionExpireSubscriptionOrder
(tradeNo string, expectedPaymentProvider string)
model/subscription.go:679
↓ 3 callersFunctionExtractOutputTextFromResponses
(resp *dto.OpenAIResponsesResponse)
service/openai_chat_responses_compat.go:28
↓ 3 callersFunctionFetchModels
(c *gin.Context)
controller/channel.go:1274
↓ 3 callersMethodFetchTask
── Polling ──────────────────────────────────────────────────────
relay/channel/adapter.go:78
↓ 3 callersFunctionGeminiResponsesHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/gemini/relay_responses.go:21
↓ 3 callersFunctionGenerateSystemTaskID
()
model/system_task.go:84
↓ 3 callersFunctionGenerateVerificationCode
(length int)
common/verification.go:26
↓ 3 callersFunctionGetAllChannels
(startIdx int, num int, selectAll bool, idSort bool, sortOptions ...ChannelSortOptions)
model/channel.go:356
↓ 3 callersFunctionGetAndValidOpenAIImageRequest
(c *gin.Context, relayMode int)
relay/helper/valid_request.go:182
↓ 3 callersMethodGetAutoGroups
()
model/token.go:35
↓ 3 callersFunctionGetBase64Data
GetBase64Data 获取 base64 编码的数据
service/file_service.go:418
↓ 3 callersMethodGetBase64Data
()
relaykit/types/file_source.go:180
↓ 3 callersFunctionGetBillingExpr
(model string)
setting/billing_setting/tiered_billing.go:45
↓ 3 callersFunctionGetBillingMode
--------------------------------------------------------------------------- Read accessors (hot path, must be fast) ----------------------------------
setting/billing_setting/tiered_billing.go:38
↓ 3 callersFunctionGetByMJId
(userId int, mjId string)
model/midjourney.go:127
↓ 3 callersMethodGetCache
()
relaykit/types/file_source.go:20
↓ 3 callersFunctionGetCallbackAddress
()
service/epay.go:8
↓ 3 callersFunctionGetChannelPollingLock
GetChannelPollingLock returns or creates a mutex for the given channel ID
model/channel.go:617
↓ 3 callersMethodGetChannelType
()
relaykit/relayconvert/convmeta/meta.go:25
↓ 3 callersFunctionGetClaudeSettings
GetClaudeSettings 获取Claude配置
setting/model_setting/claude.go:45
↓ 3 callersFunctionGetEffectiveHeaderOverride
(info *RelayInfo)
relay/common/override.go:431
↓ 3 callersFunctionGetEnvOrDefaultBool
(env string, defaultValue bool)
common/env.go:28
↓ 3 callersFunctionGetFlowQuotaData
(startTime int64, endTime int64, username string, userID int, role int)
model/usedata_flow.go:25
↓ 3 callersMethodGetFullKey
()
model/token.go:76
↓ 3 callersFunctionGetGeminiVersionSetting
GetGeminiVersionSetting 获取版本设置
setting/model_setting/gemini.go:103
↓ 3 callersMethodGetIsStream
()
relaykit/relayconvert/convmeta/meta.go:26
↓ 3 callersFunctionGetLatestSystemTask
GetLatestSystemTask returns the most recent task row of the given type (any status) so the scheduler can decide whether enough time has elapsed since
model/system_task.go:193
↓ 3 callersFunctionGetLegalSettings
()
setting/system_setting/legal.go:19
↓ 3 callersFunctionGetMimeTypeByExtension
(ext string)
service/file_decoder.go:159
↓ 3 callersFunctionGetMissingModels
GetMissingModels returns model names that are referenced in the system
model/missing_models.go:4
↓ 3 callersMethodGetName
GetName returns the display name of the provider (e.g., "GitHub", "Discord")
oauth/provider.go:13
↓ 3 callersMethodGetOpenAIError
GetOpenAIError 从动态错误类型中提取OpenAIError结构
relaykit/dto/openai_response.go:51
↓ 3 callersMethodGetOriginModelName
()
relaykit/relayconvert/convmeta/meta.go:19
↓ 3 callersFunctionGetPerformanceMonitorConfig
GetPerformanceMonitorConfig 获取性能监控配置
common/performance_config.go:26
↓ 3 callersFunctionGetPreferredChannelByAffinity
(c *gin.Context, modelName string, usingGroup string)
service/channel_affinity.go:550
↓ 3 callersFunctionGetQuotaSetting
()
setting/operation_setting/quota_setting.go:19
↓ 3 callersMethodGetRawData
()
relaykit/types/file_source.go:16
↓ 3 callersMethodGetRequestURL
(info *relaycommon.RelayInfo)
relay/channel/adapter.go:19
↓ 3 callersMethodGetRetry
()
service/channel_select.go:22
↓ 3 callersMethodGetSendResponseCount
GetSendResponseCount / IncrSendResponseCount expose the shared downstream-chunk counter (the host may also increment it).
relaykit/relayconvert/convmeta/meta.go:41
↓ 3 callersMethodGetStringSystem
()
relaykit/dto/claude.go:469
↓ 3 callersFunctionGetSubscriptionOrderByTradeNo
(tradeNo string)
model/subscription.go:241
↓ 3 callersMethodGetSystemRoleName
()
relaykit/dto/openai_request.go:242
↓ 3 callersFunctionGetSystemStatus
GetSystemStatus 获取当前系统状态
common/system_monitor.go:79
↓ 3 callersMethodGetTag
()
model/channel.go:327
↓ 3 callersFunctionGetUniqueUserByEmail
(email string)
model/user.go:1033
↓ 3 callersMethodGetWeight
()
model/channel.go:490
↓ 3 callersFunctionHandleClaudeResponseData
(c *gin.Context, info *relaycommon.RelayInfo, claudeInfo *ClaudeResponseInfo, httpResp *http.Response, data []
relay/channel/claude/relay-claude.go:217
↓ 3 callersFunctionHandleGroupRatio
HandleGroupRatio checks for "auto_group" in the context and updates the group ratio and relayInfo.UsingGroup if present
relay/helper/price.go:45
↓ 3 callersFunctionHardDeleteUserById
(id int)
model/user.go:484
↓ 3 callersMethodHasImage
()
relay/common/relay_utils.go:23
↓ 3 callersMethodIncrSendResponseCount
()
relaykit/relayconvert/convmeta/meta.go:42
↓ 3 callersMethodIncreaseRetry
()
service/channel_select.go:33
↓ 3 callersMethodIncrementFailedAttempts
IncrementFailedAttempts 增加失败尝试次数
model/twofa.go:132
↓ 3 callersMethodInsert
Insert 创建新的供应商记录
model/vendor_meta.go:27
↓ 3 callersMethodInsert
()
model/token.go:311
↓ 3 callersFunctionInterface2String
(inter interface{})
common/utils.go:191
↓ 3 callersFunctionInvalidateProxyClient
InvalidateProxyClient removes every cached policy variant for one proxy and closes their idle connections (including all HTTP/2 shards).
service/http_client.go:411
↓ 3 callersFunctionIsAlwaysSkipRetryStatusCode
(code int)
setting/operation_setting/status_code_ranges.go:70
↓ 3 callersFunctionIsDiskCacheAvailable
IsDiskCacheAvailable 检查是否可以创建新的磁盘缓存
common/disk_cache_config.go:170
↓ 3 callersMethodIsLocked
IsLocked 检查账户是否被锁定
model/twofa.go:180
↓ 3 callersFunctionIsOpenAIReasoningOModel
(modelName string)
relaykit/dto/openai_request.go:224
↓ 3 callersFunctionIsRequestBodyTooLargeError
(err error)
common/gin.go:25
↓ 3 callersFunctionIsSkipRetryError
(err *NewAPIError)
relaykit/types/error.go:373
↓ 3 callersMethodIsStream
(c *http.Request)
relaykit/dto/request_common.go:10
↓ 3 callersFunctionIsUserSelectableGroup
(userGroup, groupName string)
service/group.go:48
↓ 3 callersMethodItems
()
types/set.go:30
↓ 3 callersFunctionListActiveUserSessions
(userID int, currentSID string, now int64)
model/user_session.go:395
↓ 3 callersFunctionLoadFromJsonString
(m *RWMap[K, V], jsonStr string)
types/rw_map.go:76
↓ 3 callersFunctionLocalLogPreview
LocalLogPreview limits log-only content unless debug logging is enabled.
common/str.go:18
↓ 3 callersFunctionLogError
(message string)
relaykit/relayconvert/kitutil/log.go:45
↓ 3 callersFunctionLogJson
LogJson 仅供测试使用 only for test
logger/logger.go:176
↓ 3 callersFunctionLogQuotaData
(params QuotaDataLogParams)
model/usedata.go:78
↓ 3 callersFunctionLookupRequestConverter
(converter string)
relaykit/relayconvert/request_registry.go:140
↓ 3 callersMethodModelListRoute
ModelListRoute returns the explicitly configured OpenAI Models discovery route. Template routes that merely happen to match /v1/models are not discove
relaykit/dto/channel_settings.go:184
↓ 3 callersFunctionModelPriceHelperPerCall
ModelPriceHelperPerCall 按次/按量计费的 PriceHelper (MJ、Task)
relay/helper/price.go:187
↓ 3 callersFunctionNewChannelError
(channelId int, channelType int, channelName string, isMultiKey bool, usingKey string, autoBan bool)
relaykit/types/channel_error.go:12
↓ 3 callersFunctionNewChannelSortOptions
(sortBy string, sortOrder string, idSort bool)
model/channel.go:87
↓ 3 callersFunctionNewRequestId
()
common/utils.go:281
↓ 3 callersFunctionNewSSRFProtectionFromFetchSetting
NewSSRFProtectionFromFetchSetting builds an SSRFProtection from persisted fetch_setting values.
common/ssrf_protection.go:33
↓ 3 callersFunctionNewURLFileSource
--------------------------------------------------------------------------- Constructors -------------------------------------------------------------
relaykit/types/file_source.go:123
↓ 3 callersMethodNormalizeDefaults
()
model/subscription.go:204
↓ 3 callersFunctionNormalizeHTTPTransportPolicy
NormalizeHTTPTransportPolicy converts channel settings into a safe runtime policy. Invalid stored values never panic; they clamp to defaults and warn
service/http_transport_policy.go:31
↓ 3 callersFunctionNormalizeOrigin
NormalizeOrigin validates and canonicalizes a browser origin. Only an exact scheme/host/effective-port match is meaningful; paths and wildcards are no
common/session_cookie.go:14
↓ 3 callersFunctionNotifyRootUser
(t string, subject string, content string)
service/user_notify.go:16
← previousnext →901–1,000 of 9,514, ranked by callers