MCPcopy Create free account

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

Functions15,592 in github.com/QuantumNous/new-api

↓ 1 callersFunctionDeletePasskeyForSession
(identity AuthSessionIdentity)
model/passkey.go:269
↓ 1 callersFunctionDeletePerfMetricsBefore
(cutoffTs int64)
model/perf_metric.go:137
↓ 1 callersFunctionDeletePrefillGroupByID
DeleteByID 根据 ID 删除组
model/prefill_group.go:114
↓ 1 callersFunctionDeleteRedemptionById
(id int)
model/redemption.go:224
↓ 1 callersFunctionDeleteStaleSystemInstance
(nodeName string, now int64)
model/system_instance.go:83
↓ 1 callersFunctionDeleteStaleSystemInstances
(now int64)
model/system_instance.go:78
↓ 1 callersFunctionDeleteUserById
DeleteUserById soft-deletes a user and returns how many scoped access tokens were deleted with it.
model/user.go:554
↓ 1 callersFunctionDeleteUserOAuthBinding
DeleteUserOAuthBinding deletes an OAuth binding
model/user_oauth_binding.go:133
↓ 1 callersMethodDeployContainer
DeployContainer deploys a new container with the specified configuration
pkg/ionet/deployment.go:12
↓ 1 callersFunctionDetectAllChannelUpstreamModelUpdates
DetectAllChannelUpstreamModelUpdates enqueues a model_update system task (manual variant) instead of scanning inline. Routing the manual trigger throu
controller/channel_upstream_update.go:1216
↓ 1 callersFunctionDetectFileType
DetectFileType 检测文件类型
service/file_service.go:451
↓ 1 callersFunctionDisableTwoFAForSession
(identity AuthSessionIdentity)
model/twofa.go:243
↓ 1 callersMethodDoRequest
(c *gin.Context, info *relaycommon.RelayInfo, requestBody io.Reader)
relay/channel/advancedcustom/adaptor.go:294
↓ 1 callersMethodDoResponse
(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo)
relay/channel/aws/adaptor.go:159
↓ 1 callersMethodDoResponse
(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo)
relay/channel/minimax/adaptor.go:123
↓ 1 callersFunctionDryRunTaskPlugin
(c *gin.Context)
controller/task_plugin.go:547
↓ 1 callersFunctionETagFor
ETagFor returns a weak ETag derived from the namespace and content.
common/etag.go:21
↓ 1 callersFunctionETagMatches
ETagMatches reports whether an If-None-Match header matches etag under weak comparison (RFC 9110 §13.1.2): the W/ prefix is ignored on both sides, and
common/etag.go:35
↓ 1 callersFunctionEditChannelByTag
(tag string, newTag *string, modelMapping *string, models *string, group *string, priority *int64, weight *uin
model/channel.go:1015
↓ 1 callersFunctionEffectiveSessionMode
Rules explicitly inherit the global default or override it. Rules without a mode retain their legacy retry behavior until an administrator changes the
service/request_policy.go:170
↓ 1 callersFunctionEmbedFolder
(fsEmbed embed.FS, targetPath string)
common/embed-file-system.go:35
↓ 1 callersFunctionEmbeddingHelper
(c *gin.Context, info *relaycommon.RelayInfo)
relay/embedding_handler.go:20
↓ 1 callersMethodEmpty
()
relaykit/relayconvert/internal/toolconv/response_artifacts.go:55
↓ 1 callersFunctionEnableChannelByTag
(tag string)
model/channel.go:982
↓ 1 callersMethodEnabled
()
service/system_task.go:44
↓ 1 callersFunctionEncodeFilePlaceholders
EncodeFilePlaceholders replaces, in body itself, each file placeholder of a JSON request descriptor body with the encoded bytes of the uploaded file i
pluginkit/task.go:428
↓ 1 callersFunctionEnsureDiskCacheDir
EnsureDiskCacheDir 确保缓存目录存在
common/disk_cache.go:34
↓ 1 callersFunctionEquivalentGeminiStrength
EquivalentGeminiStrength compares two controls after applying the target model's budget/level mapping. This accepts distinct canonical labels that are
relaykit/relayconvert/reasoning/gemini.go:461
↓ 1 callersFunctionErrOptionWithHideErrMsg
(replaceStr string)
relaykit/types/error.go:407
↓ 1 callersMethodError
Error lets the same typed value serve both as the settlement audit marker and as the fail-fast error returned by strict pre-consume conversions.
common/quota_math.go:52
↓ 1 callersMethodEstimateBillingValidated
(c *gin.Context, info *relaycommon.RelayInfo)
relay/channel/task/jsplugin/adaptor.go:191
↓ 1 callersFunctionEstimateRequestToken
(c *gin.Context, meta *types.TokenCountMeta, info *relaycommon.RelayInfo)
service/token_counter.go:48
↓ 1 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
↓ 1 callersFunctionExpireDueSubscriptions
ExpireDueSubscriptions marks expired subscriptions and handles group downgrade.
model/subscription.go:1158
↓ 1 callersFunctionExplicitUserPermissions
ExplicitUserPermissions returns the effective permission matrix for the managed role plus any per-user overrides.
service/authz/override.go:103
↓ 1 callersMethodExtendDeployment
ExtendDeployment extends the duration of an existing deployment
pkg/ionet/deployment.go:137
↓ 1 callersFunctionExtractCodexAccountIDFromJWT
(token string)
service/codex_oauth.go:108
↓ 1 callersFunctionExtractEmailFromJWT
(token string)
service/codex_oauth.go:136
↓ 1 callersFunctionExtractOutputTextFromResponses
(resp *dto.OpenAIResponsesResponse)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_resp.go:237
↓ 1 callersFunctionExtractReasoningTextFromResponses
(resp *dto.OpenAIResponsesResponse)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_resp.go:275
↓ 1 callersMethodExtractUsageFacts
(c *gin.Context, info *relaycommon.RelayInfo)
relay/channel/adapter.go:133
↓ 1 callersMethodExtractUsageFactsValidated
(c *gin.Context, info *relaycommon.RelayInfo)
relay/channel/task/jsplugin/adaptor.go:206
↓ 1 callersMethodFail
Fail emits a terminal Responses error using the same event allocator as the rest of the stream, so callers never have to append a JSON HTTP error to a
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:297
↓ 1 callersMethodFetchBody
FetchBody returns body with each JSON string that equals a ref of the call replaced by that media's data URL, and its length; a nil reader when body n
pluginkit/media.go:33
↓ 1 callersFunctionFetchCodexChannelModels
(channel *model.Channel)
service/codex_channel_models.go:14
↓ 1 callersFunctionFetchCodexModels
( ctx context.Context, client *http.Client, baseURL string, oauthKey *CodexOAuthKey, clientVersion string
service/codex_models.go:95
↓ 1 callersFunctionFetchGeminiModels
(baseURL, apiKey string, setting dto.ChannelSettings)
relay/channel/gemini/relay-gemini.go:712
↓ 1 callersFunctionFetchOllamaModels
(baseURL, apiKey string)
relay/channel/ollama/relay-ollama.go:341
↓ 1 callersFunctionFetchOllamaVersion
(baseURL, apiKey string)
relay/channel/ollama/relay-ollama.go:536
↓ 1 callersFunctionFileReference
FileReference returns the opaque ref of the index-th uploaded file in a multipart field. The first file keeps the historical `request_file:<field>` sp
pluginkit/routing.go:216
↓ 1 callersFunctionFillModelSquareStates
FillModelSquareStates applies the same metadata policy as the public catalog to live routes, then aggregates concrete models for metadata rule rows.
model/model_meta.go:104
↓ 1 callersMethodFillUserByDiscordId
()
model/user.go:1117
↓ 1 callersMethodFillUserByLinuxDOId
()
model/user.go:1539
↓ 1 callersMethodFillUserByOidcId
()
model/user.go:1125
↓ 1 callersMethodFillUserByProviderID
FillUserByProviderID fills the user model by provider user ID
oauth/provider.go:29
↓ 1 callersMethodFillUserByWeChatId
()
model/user.go:1133
↓ 1 callersFunctionFilterUserTokenAutoGroups
FilterUserTokenAutoGroups applies current permissions before the current per-token limit. It intentionally does not fall back to the global Auto list.
service/group.go:75
↓ 1 callersMethodFinalize
(estimatedInputTokens int)
relaykit/relayconvert/internal/oai_responses/to_claude_messages_stream_resp.go:175
↓ 1 callersFunctionFinalizeChatCompletionsStreamToResponses
(state *ChatToResponsesStreamState)
relaykit/relayconvert/response_compat.go:168
↓ 1 callersFunctionFinalizeClaudeStreamBillingUsage
(claudeInfo *ClaudeResponseInfo)
relaykit/relayconvert/response_compat.go:124
↓ 1 callersFunctionFinalizeClaudeStreamBillingUsage
FinalizeClaudeStreamBillingUsage refreshes only a locally synthesized snapshot after the host has applied its missing-usage fallback. A snapshot recei
relaykit/relayconvert/internal/claude_messages/to_oai_chat_resp.go:447
↓ 1 callersMethodFinalizeOAuthUserCreation
FinalizeOAuthUserCreation performs post-transaction tasks for OAuth user creation. This should be called after the transaction commits successfully.
model/user.go:760
↓ 1 callersFunctionFinalizeResponsesToChatStream
(state *ResponsesToChatStreamState)
relaykit/relayconvert/response_compat.go:204
↓ 1 callersFunctionFinalizeResponsesToChatStream
(state *ResponsesToChatStreamState)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:133
↓ 1 callersMethodFinish
Finish ends the check of a response that ended without its terminal event: the rest of the text is checked and the events waiting go out.
relay/requestplugin/socket.go:143
↓ 1 callersMethodFinishInsert
(inviterId int)
model/user.go:733
↓ 1 callersFunctionFinishOAuthVerification
FinishOAuthVerification only verifies an existing binding. It deliberately never calls OAuth's login or find-or-create-user paths.
service/oauth_verification.go:32
↓ 1 callersFunctionFinishSyncTasks
FinishSyncTasks marks the pending sync tasks of taskType up to throughID as applied by every node, with their final state.
model/system_sync_task.go:115
↓ 1 callersMethodFlush
()
relay/helper/common.go:58
↓ 1 callersMethodFlushError
()
relay/channel/openai/relay_responses_billing_test.go:101
↓ 1 callersFunctionFormatClaudeResponseInfo
(claudeResponse *dto.ClaudeResponse, oaiResponse *dto.ChatCompletionsStreamResponse, claudeInfo *ClaudeRespons
relaykit/relayconvert/response_compat.go:120
↓ 1 callersFunctionFullClientRequest
(conn *websocket.Conn, payload []byte)
relay/channel/volcengine/protocols.go:522
↓ 1 callersFunctionFunctionParametersToInputSchema
FunctionParametersToInputSchema returns function parameters as a Claude input_schema, adding type and properties when they are missing or null. A top-
relaykit/relayconvert/internal/shared/claude/schema.go:24
↓ 1 callersFunctionGeminiEmbeddingHandler
(c *gin.Context, info *relaycommon.RelayInfo)
relay/gemini_handler.go:169
↓ 1 callersFunctionGeminiEmbeddingHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/gemini/relay-gemini.go:602
↓ 1 callersFunctionGeminiHelper
(c *gin.Context, info *relaycommon.RelayInfo)
relay/gemini_handler.go:23
↓ 1 callersFunctionGeminiResponseMap
(value any)
relaykit/relayconvert/internal/oai_responses/req_helpers.go:222
↓ 1 callersFunctionGenRelayInfoAlphaSearch
(c *gin.Context, request *dto.AlphaSearchRequest)
relay/common/relay_info.go:829
↓ 1 callersFunctionGenRelayInfoClaude
(c *gin.Context, request dto.Request)
relay/common/relay_info.go:494
↓ 1 callersFunctionGenRelayInfoEmbedding
(c *gin.Context, request dto.Request)
relay/common/relay_info.go:522
↓ 1 callersFunctionGenRelayInfoGemini
(c *gin.Context, request dto.Request)
relay/common/relay_info.go:548
↓ 1 callersFunctionGenRelayInfoImage
(c *gin.Context, request dto.Request)
relay/common/relay_info.go:556
↓ 1 callersFunctionGenRelayInfoOpenAI
(c *gin.Context, request dto.Request)
relay/common/relay_info.go:562
↓ 1 callersFunctionGenRelayInfoOpenAIAudio
(c *gin.Context, request dto.Request)
relay/common/relay_info.go:516
↓ 1 callersFunctionGenRelayInfoRerank
(c *gin.Context, request *dto.RerankRequest)
relay/common/relay_info.go:505
↓ 1 callersFunctionGenRelayInfoResponses
(c *gin.Context, request *dto.OpenAIResponsesRequest)
relay/common/relay_info.go:528
↓ 1 callersFunctionGenRelayInfoResponsesCompaction
(c *gin.Context, request *dto.OpenAIResponsesCompactionRequest)
relay/common/relay_info.go:820
↓ 1 callersFunctionGenRelayInfoWs
(c *gin.Context, ws *websocket.Conn)
relay/common/relay_info.go:484
↓ 1 callersFunctionGenerateAudioOtherInfo
(ctx *gin.Context, relayInfo *relaycommon.RelayInfo, usage *dto.Usage, modelRatio, groupRatio, completionRatio
service/log_info_generate.go:302
↓ 1 callersFunctionGenerateClaudeOtherInfo
(ctx *gin.Context, relayInfo *relaycommon.RelayInfo, modelRatio, groupRatio, completionRatio float64, cacheTo
service/log_info_generate.go:314
↓ 1 callersFunctionGenerateOAuthCode
GenerateOAuthCode generates a state code for OAuth CSRF protection
controller/oauth.go:46
↓ 1 callersFunctionGenerateQRCodeData
GenerateQRCodeData 生成二维码数据
common/totp.go:146
↓ 1 callersFunctionGenerateTOTPSecret
GenerateTOTPSecret 生成TOTP密钥和配置
common/totp.go:26
↓ 1 callersFunctionGenerateWssOtherInfo
(ctx *gin.Context, relayInfo *relaycommon.RelayInfo, usage *dto.RealtimeUsage, modelRatio, groupRatio, complet
service/log_info_generate.go:290
↓ 1 callersFunctionGetAPIVersion
(c *gin.Context)
relay/common/relay_utils.go:101
↓ 1 callersFunctionGetAllActiveUserSubscriptions
GetAllActiveUserSubscriptions returns all active subscriptions for a user.
model/subscription.go:866
↓ 1 callersFunctionGetAllEnableAbilityWithChannels
()
model/ability.go:33
↓ 1 callersFunctionGetAllPrefillGroups
GetAllPrefillGroups 获取全部组,可按类型过滤(为空则返回全部)
model/prefill_group.go:119
↓ 1 callersFunctionGetAllQuotaDates
(startTime int64, endTime int64, username string)
model/usedata.go:183
↓ 1 callersFunctionGetAllRedemptions
(startIdx int, num int)
model/redemption.go:28
← previousnext →5,201–5,300 of 15,592, ranked by callers