MCPcopy Create free account

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

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

↓ 1 callersMethodDefaultValue
()
model/migration_dialector.go:51
↓ 1 callersMethodDelete
Delete rejects referenced vendors rather than leaving orphaned model records.
model/vendor_meta.go:80
↓ 1 callersMethodDeleteAbilities
()
model/ability.go:266
↓ 1 callersMethodDeleteByPrefix
(prefix string)
pkg/cachex/hybrid_cache.go:176
↓ 1 callersFunctionDeleteChannel
(c *gin.Context)
controller/channel.go:972
↓ 1 callersFunctionDeleteChannelBatch
(c *gin.Context)
controller/channel.go:1165
↓ 1 callersMethodDeleteDeployment
DeleteDeployment deletes an active deployment
pkg/ionet/deployment.go:164
↓ 1 callersFunctionDeleteDisabledChannel
()
model/channel.go:1092
↓ 1 callersFunctionDeleteExpiredAuthFlows
(now time.Time)
model/auth_flow.go:306
↓ 1 callersFunctionDeleteExpiredUserAccessTokens
DeleteExpiredUserAccessTokens removes tokens that expired before the cutoff. Tokens that never expire are kept.
model/user_access_token.go:203
↓ 1 callersFunctionDeleteInvalidRedemptions
()
model/redemption.go:236
↓ 1 callersFunctionDeleteKey
(key string, purpose string)
common/verification.go:58
↓ 1 callersFunctionDeleteModelMeta
DeleteModelMeta 删除模型
controller/model_meta.go:193
↓ 1 callersFunctionDeleteOllamaModel
删除 Ollama 模型
relay/channel/ollama/relay-ollama.go:499
↓ 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 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:284
↓ 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:546
↓ 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:149
↓ 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 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:264
↓ 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:279
↓ 1 callersMethodFactoryKey
FactoryKey reports whether key belongs to a built-in plugin, whether or not an override or the disabled list replaces it in this generation.
pkg/jsplugin/routing.go:685
↓ 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
pkg/jsplugin/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:606
↓ 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
pkg/jsplugin/routing.go:297
↓ 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:1109
↓ 1 callersMethodFillUserByLinuxDOId
()
model/user.go:1523
↓ 1 callersMethodFillUserByOidcId
()
model/user.go:1117
↓ 1 callersMethodFillUserByProviderID
FillUserByProviderID fills the user model by provider user ID
oauth/provider.go:29
↓ 1 callersMethodFillUserByWeChatId
()
model/user.go:1125
↓ 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:446
↓ 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 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:496
↓ 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
← previousnext →5,101–5,200 of 15,409, ranked by callers