MCPcopy Create free account

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

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

↓ 2 callersFunctionBatchSetChannelTag
(ids []int, tag *string)
model/channel.go:1283
↓ 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:77
↓ 2 callersFunctionBuildGoogleModelURL
(baseURL, version, projectID, region, modelName, action string)
relay/channel/vertex/url_builder.go:74
↓ 2 callersFunctionBuildModelSquareOrder
BuildModelSquareOrder orders the listed models for the model square sorts. Names that are not listed are left out.
service/model_square_order.go:60
↓ 2 callersMethodBuildOutput
()
relaykit/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:765
↓ 2 callersFunctionBuildPublisherModelURL
(baseURL, version, projectID, region, publisher, modelName, action string)
relay/channel/vertex/url_builder.go:64
↓ 2 callersFunctionBuildWebAuthnForRPID
BuildWebAuthnForRPID uses a single configured RP ID, never a list of IDs to try against the same signed response. An empty ID is for new registrations
service/passkey/service.go:29
↓ 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:216
↓ 2 callersFunctionCacheRatio2JSONString
CacheRatio2JSONString converts the cache ratio map to a JSON string
setting/ratio_setting/cache_ratio.go:144
↓ 2 callersFunctionCacheUpdateChannel
(channel *Channel)
model/channel_cache.go:282
↓ 2 callersFunctionCacheUpdateChannelStatus
(id int, status int)
model/channel_cache.go:257
↓ 2 callersFunctionCalcOpenRouterCacheCreateTokens
(usage dto.Usage, priceData types.PriceData)
service/quota.go:268
↓ 2 callersMethodCallPathWithMembersJSON
CallPathWithMembersJSON is CallPathWithMemberJSON for a result that may carry its JSON value at one of several places: it returns the text of the firs
pluginkit/engine.go:414
↓ 2 callersMethodCallProtocolDecode
CallProtocolDecode runs protocols[protocol].decodeRequest on the request of a host protocol.
pluginkit/task.go:579
↓ 2 callersMethodCallReport
CallReport runs the report hook with tctx.Stage "report" on record, the JSON of a finished request. The return value is ignored. utils.fetch uses the
pluginkit/transform.go:348
↓ 2 callersMethodCallRevoke
CallRevoke runs revoke(ctx). Its result is ignored.
pluginkit/provider.go:436
↓ 2 callersMethodCallRouteDecode
CallRouteDecode runs native[decode] on the request of a native route. admissionTimeout is as for Engine.CallPathWithAdmissionTimeout; 0 is the default
pluginkit/task.go:573
↓ 2 callersFunctionCanonicalBillingModelNames
CanonicalBillingModelNames returns specificity-descending canonical billing name candidates (without the raw request name or the bare base). Explicit
setting/reasoning/suffix.go:109
↓ 2 callersFunctionChangeUserPassword
ChangeUserPassword rechecks the authorized session, password state and current password under the same user lock as the credential update. Only self-p
model/account_security.go:21
↓ 2 callersMethodChannelServesResponsesWebSocket
ChannelServesResponsesWebSocket is ServesResponsesWebSocket on the routes that serve a channel whose plugin_routes are toggles.
pluginkit/meta.go:332
↓ 2 callersFunctionChannelType2APIType
(channelType int)
common/api_type.go:5
↓ 2 callersFunctionChatCompletionsResponseToResponsesResponseWithTools
ChatCompletionsResponseToResponsesResponseWithTools also restores function calls that tools marks as Responses custom tools into custom_tool_call item
relaykit/relayconvert/internal/oai_chat/to_oai_responses_resp.go:48
↓ 2 callersMethodCheckClusterNameAvailability
CheckClusterNameAvailability checks if a cluster name is available
pkg/ionet/deployment.go:327
↓ 2 callersFunctionCheckPluginKeys
CheckPluginKeys runs the plugin's checkKey on every static key line of key that storedKey does not hold: the lines an administrator typed in, not the
service/provider_plugin.go:742
↓ 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:287
↓ 2 callersFunctionClaimExternalAuthAssertion
ClaimExternalAuthAssertion records a signed provider assertion as consumed. The assertion is HMACed before storage and the unique token_hash index mak
model/auth_flow.go:180
↓ 2 callersFunctionClaimExternalAuthAssertionWithTx
ClaimExternalAuthAssertionWithTx records a provider assertion in the caller's transaction so replay protection can commit atomically with the authenti
model/auth_flow.go:189
↓ 2 callersFunctionClaudeEffort
ClaudeEffort returns the effort level the model accepts in place of the requested one. It returns empty when no effort is requested or the model takes
relaykit/relayconvert/reasoning/claude.go:429
↓ 2 callersFunctionClaudeHandler
(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo)
relay/channel/claude/relay-claude.go:442
↓ 2 callersFunctionClaudeMessagesRequestToOpenAIChat
(ctx context.Context, claudeRequest dto.ClaudeRequest, info convmeta.Meta)
relaykit/relayconvert/internal/claude_messages/to_oai_chat_req.go:29
↓ 2 callersFunctionClaudeResponsesStreamHandler
(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo)
relay/channel/claude/relay_responses.go:19
↓ 2 callersFunctionClaudeStreamHandler
(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo)
relay/channel/claude/relay-claude.go:334
↓ 2 callersFunctionCleanFunctionParameters
(params interface{})
relaykit/relayconvert/internal/shared/gemini/schema.go:44
↓ 2 callersFunctionCleanupOldDiskCacheFiles
CleanupOldDiskCacheFiles 清理旧的缓存文件 maxAge: 文件最大存活时间 注意:此函数只删除文件,不更新统计(因为无法知道每个文件的原始大小)
common/disk_cache.go:109
↓ 2 callersMethodClearBinding
(bindingType string)
model/user.go:907
↓ 2 callersFunctionClearUserAuthorizationInTx
(tx *gorm.DB, userID int)
service/authz/override.go:97
↓ 2 callersMethodClientEvent
ClientEvent runs the ingress stage on a client event that carries text: session.update, conversation.item.create and response.create. eventType is the
relay/requestplugin/socket.go:259
↓ 2 callersMethodClose
()
controller/video_proxy.go:442
↓ 2 callersMethodClose
()
relay/channel/gemini/relay_responses_test.go:192
↓ 2 callersMethodClose
()
relay/channel/minimax/adaptor_test.go:127
↓ 2 callersFunctionCloseChannelsAndBroadcast
(channelIDs []int, reason string)
pkg/wsmanager/wsmanager.go:105
↓ 2 callersMethodCompleteHostedTool
(result HostedToolStreamResult)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:230
↓ 2 callersFunctionCompleteLoginVerification
CompleteLoginVerification must only run after a concrete factor ceremony. Recheck the bound version and method while consuming the flow and creating t
service/login_verification.go:150
↓ 2 callersMethodConfigSchemaJSON
ConfigSchemaJSON returns meta.configSchema as normalized JSON text, nil when the plugin declares none.
pluginkit/config_schema.go:100
↓ 2 callersFunctionConfigToMap
ConfigToMap 将配置对象转换为map(导出函数)
setting/config/config.go:276
↓ 2 callersMethodConfigURLHosts
ConfigURLHosts returns the host, with its port when it has one, of every non-empty url format value of an instance config: the hosts utils.fetch may a
pluginkit/config_schema.go:110
↓ 2 callersFunctionConfigure
Configure sets the host for every plugin. A host calls it at startup, before it compiles plugins; the namespaces and keys apply to plugins compiled af
pluginkit/host.go:103
↓ 2 callersFunctionConfigureTrustedProxies
(engine *gin.Engine, trustedProxies []string)
common/trusted_proxies.go:49
↓ 2 callersFunctionConsumeResponsesQuota
ConsumeResponsesQuota applies the same settlement dispatch to HTTP and WebSocket Responses usage. Compact requests keep their separate repricing.
relay/responses_handler.go:105
↓ 2 callersFunctionContainsAudioCompletionRatio
(name string)
setting/ratio_setting/model_ratio.go:633
↓ 2 callersFunctionContainsAudioRatio
(name string)
setting/ratio_setting/model_ratio.go:627
↓ 2 callersFunctionContainsPayMethod
(method string)
setting/operation_setting/payment_setting_old.go:52
↓ 2 callersFunctionContentParts
(content any)
relaykit/relayconvert/internal/oai_responses/req_helpers.go:121
↓ 2 callersMethodConvertAudioRequest
(c *gin.Context, info *relaycommon.RelayInfo, request dto.AudioRequest)
relay/channel/adapter.go:26
↓ 2 callersMethodConvertClaudeRequest
(c *gin.Context, info *relaycommon.RelayInfo, request *dto.ClaudeRequest)
relay/channel/aws/adaptor.go:32
↓ 2 callersMethodConvertOpenAIRequest
(c *gin.Context, info *relaycommon.RelayInfo, request *dto.GeneralOpenAIRequest)
relay/channel/openai/adaptor.go:253
↓ 2 callersFunctionConvertSimpleChangeParams
(content string)
service/midjourney.go:245
↓ 2 callersFunctionConvertStreamResponse
(c *gin.Context, info *relaycommon.RelayInfo, target types.RelayFormat, response any)
service/response_converter.go:18
↓ 2 callersFunctionCopyChannel
CopyChannel handles cloning an existing channel with its key. POST /api/channel/copy/:id Optional query params: suffix - string appended to
controller/channel.go:1819
↓ 2 callersFunctionCountChannelTags
(query *gorm.DB)
model/channel.go:1333
↓ 2 callersFunctionCountClaudeTokens
CountClaudeTokens implements Anthropic's token-counting utility endpoint. It deliberately skips upstream generation and billing; callers use this endp
controller/relay.go:292
↓ 2 callersFunctionCountOldLog
(ctx context.Context, targetTimestamp int64)
model/log.go:776
↓ 2 callersFunctionCountRequestToken
CountRequestToken counts request tokens regardless of the billing estimation switch. Utility endpoints such as Claude's messages/count_tokens must rem
service/token_counter.go:59
↓ 2 callersFunctionCoverPlusActionToNormalAction
(midjRequest *dto.MidjourneyRequest)
service/midjourney.go:186
↓ 2 callersFunctionCoverTaskActionToModelName
(platform constant.TaskPlatform, action string)
service/task.go:9
↓ 2 callersFunctionCreateCacheRatio2JSONString
CreateCacheRatio2JSONString converts the create cache ratio map to a JSON string
setting/ratio_setting/cache_ratio.go:149
↓ 2 callersFunctionCreateCustomOAuthProvider
CreateCustomOAuthProvider creates a new custom OAuth provider. No periodic reload covers the providers, so the sync topic bumps in the same transactio
model/custom_oauth_provider.go:112
↓ 2 callersFunctionCreateLoginSessionAtAuthVersion
(userID int, expectedAuthVersion int64, loginMethod, ip, userAgent string)
service/auth_session.go:56
↓ 2 callersFunctionCreateUserOAuthBindingWithTx
CreateUserOAuthBindingWithTx creates a new OAuth binding within a transaction
model/user_oauth_binding.go:85
↓ 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:190
↓ 2 callersFunctionDeclareAccessTokenPermissionRoute
DeclareAccessTokenPermissionRoute records that the Casbin permission guarding a route is also the token scope it requires. It runs while routes are re
middleware/access_token_routes.go:326
↓ 2 callersFunctionDecodeBase64ImageData
return image.Config, format, clean base64 string, error
service/image.go:20
↓ 2 callersFunctionDecodeJson
(reader io.Reader, v any)
relaykit/relayconvert/kitutil/json.go:76
↓ 2 callersFunctionDecodeJsonBody
DecodeJsonBody reads one JSON value and requires EOF after trailing whitespace. Seekable readers let the decoder process large values through a bounde
common/json.go:67
↓ 2 callersFunctionDeepSeekToolsHelper
DeepSeekToolsHelper relays the DeepSeek Search and Fetch APIs like v1/alpha/search: the raw body is forwarded, the response is returned unchanged, and
relay/deepseek_tools_handler.go:27
↓ 2 callersMethodDelete
()
model/model_meta.go:272
↓ 2 callersMethodDelete
()
model/token.go:332
↓ 2 callersFunctionDeleteCustomOAuthProvider
DeleteCustomOAuthProvider deletes a custom OAuth provider by ID, with its sync topic bump in the same transaction.
model/custom_oauth_provider.go:140
↓ 2 callersFunctionDeleteExpiredUserSessions
(now int64)
model/user_session.go:798
↓ 2 callersFunctionDeleteFinishedSystemTasks
DeleteFinishedSystemTasks deletes, in batches, the succeeded and failed rows last updated before cutoff. The newest row of every type stays: the sched
model/system_task.go:332
↓ 2 callersFunctionDeleteOldRevokedUserSessions
(now int64)
model/user_session.go:810
↓ 2 callersFunctionDeletePasskeyByUserIDWithAuthVersion
(userID int)
model/passkey.go:265
↓ 2 callersFunctionDeleteSystemTaskHistory
DeleteSystemTaskHistory preserves the latest row of every type because the scheduler uses it to determine when the next run is due. Active rows and ro
model/system_task.go:236
↓ 2 callersFunctionDeleteUserAccessTokensWithTx
(tx *gorm.DB, userID int)
model/user_access_token.go:186
↓ 2 callersFunctionDeleteUserForSession
(identity AuthSessionIdentity)
model/user.go:950
↓ 2 callersFunctionDisableCache
()
middleware/disable-cache.go:5
↓ 2 callersFunctionDisableChannelByTag
(tag string)
model/channel.go:992
↓ 2 callersFunctionDisableTwoFAWithAuthVersion
DisableTwoFAWithAuthVersion atomically removes the factor and invalidates every access token issued against the previous security configuration.
model/twofa.go:239
↓ 2 callersFunctionDoFormRequest
(a Adaptor, c *gin.Context, info *common.RelayInfo, requestBody io.Reader)
relay/channel/api_request.go:408
↓ 2 callersMethodDoRequestWith
DoRequestWith is DoRequest with the request URL and headers built by transport, which may add to the route's own: a provider plugin channel passes its
relay/channel/advancedcustom/adaptor.go:301
↓ 2 callersFunctionDoTaskApiRequest
(a TaskAdaptor, c *gin.Context, info *common.RelayInfo, requestBody io.Reader)
relay/channel/api_request.go:606
↓ 2 callersFunctionDoWssRequest
DoWssRequest dials the adaptor's upstream over WebSocket for the realtime and Responses WebSocket relays. It honors the channel proxy, is bound to the
relay/channel/api_request.go:451
↓ 2 callersMethodDone
()
relaykit/relayconvert/internal/oai_responses/to_claude_messages_stream_resp.go:61
↓ 2 callersFunctionDropPluginCredentials
DropPluginCredentials removes the credential lines from the key of a channel copy, since a credential belongs to the channel its login stored it on. A
service/provider_plugin.go:660
↓ 2 callersMethodEditWithTx
(tx *gorm.DB, updatePassword bool)
model/user.go:870
↓ 2 callersMethodEffectiveToolLossPolicy
()
relaykit/relayconvert/convmeta/options.go:127
↓ 2 callersFunctionEnableChannel
(channelId int, usingKey string, channelName string)
service/channel.go:55
↓ 2 callersFunctionEnableTwoFAEnrollment
EnableTwoFAEnrollment validates and consumes one setup in the same transaction as factor activation and auth_version advancement. A bad code can be re
model/twofa_enrollment.go:70
← previousnext →3,101–3,200 of 15,592, ranked by callers