MCPcopy Create free account

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

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

↓ 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:29
↓ 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 types.PriceData)
service/log_info_generate.go:292
↓ 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
↓ 2 callersFunctionGenerateTaskID
GenerateTaskID 生成对外暴露的 task_xxxx 格式 ID
model/task.go:144
↓ 2 callersFunctionGet2FAIssuer
Get2FAIssuer 获取2FA发行者名称
common/totp.go:115
↓ 2 callersFunctionGetAllCustomOAuthProviders
GetAllCustomOAuthProviders returns all custom OAuth providers
model/custom_oauth_provider.go:74
↓ 2 callersFunctionGetAllFlowQuotaDates
(c *gin.Context)
controller/usedata.go:88
↓ 2 callersFunctionGetAllUserSubscriptions
GetAllUserSubscriptions returns all subscriptions (active and expired) for a user.
model/subscription.go:888
↓ 2 callersFunctionGetAllUsers
(pageInfo *common.PageInfo, sortOptions ...UserSortOptions)
model/user.go:349
↓ 2 callersFunctionGetAndValidateClaudeRequest
(c *gin.Context)
relay/helper/valid_request.go:289
↓ 2 callersFunctionGetAndValidateGeminiRequest
(c *gin.Context)
relay/helper/valid_request.go:370
↓ 2 callersFunctionGetAndValidateResponsesRequest
(c *gin.Context)
relay/helper/valid_request.go:133
↓ 2 callersFunctionGetAndValidateTextRequest
(c *gin.Context, relayMode int)
relay/helper/valid_request.go:312
↓ 2 callersFunctionGetAutoGroups
()
setting/auto_group.go:35
↓ 2 callersFunctionGetBase64Data
GetBase64Data 获取 base64 编码的数据
service/file_service.go:418
↓ 2 callersMethodGetBudgetTokens
()
dto/claude.go:458
↓ 2 callersFunctionGetByOnlyMJId
(mjId string)
model/midjourney.go:117
↓ 2 callersFunctionGetCacheRatio
GetCacheRatio returns the cache ratio for a model
setting/ratio_setting/cache_ratio.go:159
↓ 2 callersMethodGetChannelName
()
relay/channel/adapter.go:29
↓ 2 callersFunctionGetChannelsByIds
(ids []int)
model/channel.go:1048
↓ 2 callersFunctionGetChannelsByTag
(tag string, idSort bool, selectAll bool, sortOptions ...ChannelSortOptions)
model/channel.go:368
↓ 2 callersMethodGetClaudeError
GetClaudeError 从动态错误类型中提取ClaudeError结构
dto/claude.go:522
↓ 2 callersMethodGetContainerLogsRaw
GetContainerLogsRaw retrieves the raw text logs for a specific container
pkg/ionet/container.go:152
↓ 2 callersFunctionGetContextKey
(c *gin.Context, key constant.ContextKey)
common/gin.go:161
↓ 2 callersFunctionGetContextKeyInt
(c *gin.Context, key constant.ContextKey)
common/gin.go:169
↓ 2 callersFunctionGetCreateCacheRatio
(name string)
setting/ratio_setting/cache_ratio.go:167
↓ 2 callersFunctionGetDiskCacheMaxSizeBytes
GetDiskCacheMaxSizeBytes 获取磁盘缓存最大大小(字节)
common/disk_cache_config.go:58
↓ 2 callersFunctionGetDiskCacheStats
GetDiskCacheStats 获取缓存统计信息
common/disk_cache_config.go:94
↓ 2 callersFunctionGetDiskSpaceInfo
GetDiskSpaceInfo 获取缓存目录所在磁盘的空间信息 (Windows)
common/system_monitor_windows.go:12
↓ 2 callersFunctionGetEnabledModels
()
model/ability.go:50
↓ 2 callersMethodGetErrorType
()
types/error.go:116
↓ 2 callersFunctionGetExposedData
()
setting/ratio_setting/exposed_cache.go:35
↓ 2 callersMethodGetFile
()
dto/openai_request.go:344
↓ 2 callersFunctionGetGeminiSafetySetting
GetGeminiSafetySetting 获取安全设置
setting/model_setting/gemini.go:56
↓ 2 callersFunctionGetGroupRatioSetting
()
setting/ratio_setting/group_ratio.go:54
↓ 2 callersFunctionGetGroupsEnabledModels
GetGroupsEnabledModels 按 groups 顺序获取各分组启用的模型并去重
service/group.go:58
↓ 2 callersMethodGetHeaderOverride
()
model/channel.go:1037
↓ 2 callersFunctionGetImageRatio
(name string)
setting/ratio_setting/model_ratio.go:670
↓ 2 callersMethodGetInputAudio
()
dto/openai_request.go:328
↓ 2 callersFunctionGetLatestSystemTasks
(taskTypes []string)
model/system_task.go:205
↓ 2 callersMethodGetMaxGPUsPerContainer
GetMaxGPUsPerContainer retrieves the maximum number of GPUs available per hardware type
pkg/ionet/hardware.go:59
↓ 2 callersFunctionGetMaxUserId
()
model/user.go:343
↓ 2 callersFunctionGetMaxUserTokens
GetMaxUserTokens 获取每用户最大令牌数量
setting/operation_setting/token_setting.go:26
↓ 2 callersMethodGetModelLimitsMap
()
model/token.go:350
↓ 2 callersFunctionGetModelSupportEndpointTypes
(model string)
model/pricing.go:98
↓ 2 callersMethodGetOpenAIError
GetOpenAIError 从动态错误类型中提取OpenAIError结构
dto/openai_response.go:319
↓ 2 callersMethodGetOtherInfo
()
model/channel.go:307
↓ 2 callersFunctionGetPaginatedChannelTags
(query *gorm.DB, offset int, limit int)
model/channel.go:890
↓ 2 callersFunctionGetPreferredModelOwnerChannelTypes
(modelNames []string, groups []string)
model/model_meta.go:155
↓ 2 callersMethodGetPriority
()
model/channel.go:483
↓ 2 callersFunctionGetProvider
GetProvider returns the OAuth provider for the given name
oauth/registry.go:42
↓ 2 callersMethodGetProviderId
GetProviderId returns the provider ID for binding purposes
oauth/generic.go:316
↓ 2 callersFunctionGetRandomInt
(max int)
common/utils.go:259
↓ 2 callersFunctionGetRedemptionById
(id int)
model/redemption.go:127
↓ 2 callersFunctionGetRequestURL
(info *relaycommon.RelayInfo)
relay/channel/minimax/relay-minimax.go:12
↓ 2 callersFunctionGetSetting
()
setting/perf_metrics_setting/config.go:23
↓ 2 callersMethodGetStringContent
()
dto/claude.go:135
↓ 2 callersMethodGetSystemFingerprint
()
dto/openai_response.go:200
↓ 2 callersFunctionGetUnusedBackupCodeCount
GetUnusedBackupCodeCount 获取未使用的备用码数量
model/twofa.go:271
↓ 2 callersFunctionGetUserFlowQuotaDates
(c *gin.Context)
controller/usedata.go:107
↓ 2 callersFunctionGetUserIdByAffCode
(affCode string)
model/user.go:467
↓ 2 callersMethodGetUserInfo
GetUserInfo retrieves user information using the access token
oauth/provider.go:23
↓ 2 callersFunctionGetUserModels
(c *gin.Context)
controller/user.go:638
↓ 2 callersFunctionGetUserUsedQuota
(id int)
model/user.go:1156
↓ 2 callersFunctionGetVendorModelCounts
()
model/model_meta.go:89
↓ 2 callersFunctionGetVendors
GetVendors 返回当前定价接口使用到的供应商信息
model/pricing.go:90
↓ 2 callersMethodGetVideoUrl
()
dto/openai_request.go:361
↓ 2 callersFunctionGetWaffoPayMethods
GetWaffoPayMethods 从 options 读取 Waffo 支付方式配置
setting/payment_waffo.go:27
↓ 2 callersFunctionGlobalAPIRateLimit
()
middleware/rate-limit.go:167
↓ 2 callersFunctionHandleFinalResponse
(c *gin.Context, info *relaycommon.RelayInfo, lastStreamData string, responseId string, createAt int64, model
relay/channel/openai/helper.go:162
↓ 2 callersFunctionHandleStreamFinalResponse
(c *gin.Context, info *relaycommon.RelayInfo, claudeInfo *ClaudeResponseInfo)
relay/channel/claude/relay-claude.go:153
↓ 2 callersFunctionHandleStreamFormat
辅助函数
relay/channel/openai/helper.go:23
↓ 2 callersFunctionHandleStreamResponseData
(c *gin.Context, info *relaycommon.RelayInfo, claudeInfo *ClaudeResponseInfo, data string)
relay/channel/claude/relay-claude.go:86
↓ 2 callersFunctionHasCSAMViolationMarker
(err *types.NewAPIError)
service/violation_fee.go:30
↓ 2 callersMethodHasCache
()
types/file_source.go:21
↓ 2 callersFunctionHasCheckedInToday
HasCheckedInToday 检查用户今天是否已签到
model/checkin.go:43
↓ 2 callersFunctionHasModelBillingConfig
(modelName string)
relay/helper/price.go:254
↓ 2 callersMethodIncreaseRetry
()
service/channel_select.go:34
↓ 2 callersFunctionInitDB
()
model/main.go:181
↓ 2 callersFunctionInitializeUserAuthVersions
InitializeUserAuthVersions must run after AutoMigrate when upgrading an existing database. It is idempotent and portable across all supported DBs.
model/user_auth_cache.go:239
↓ 2 callersFunctionInputItems
(raw []byte)
service/relayconvert/internal/oai_responses/req_helpers.go:57
↓ 2 callersMethodInsert
()
model/midjourney.go:161
↓ 2 callersMethodInsert
()
model/model_meta.go:47
↓ 2 callersMethodInsert
()
model/task.go:366
↓ 2 callersMethodInsert
()
model/token.go:286
↓ 2 callersMethodInsertWithTx
InsertWithTx inserts a new user within an existing transaction. This is used for OAuth registration where user creation and binding need to be atomic.
model/user.go:656
↓ 2 callersFunctionInvalidateCache
InvalidateCache clears the compiled-expression cache. Called when billing rules are updated.
pkg/billingexpr/compile.go:171
↓ 2 callersFunctionInvalidateProxyClient
InvalidateProxyClient removes one proxy client and closes its idle connections.
service/http_client.go:285
↓ 2 callersFunctionIsAdmin
(userId int)
model/user.go:1099
↓ 2 callersFunctionIsAdvancedCustomConverterAllowed
(converter string)
dto/channel_settings.go:305
← previousnext →1,301–1,400 of 9,195, ranked by callers