MCPcopy Create free account

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

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

↓ 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.
pkg/jsplugin/config_schema.go:101
↓ 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
pkg/jsplugin/config_schema.go:111
↓ 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 callersFunctionContainsGroupRatio
(name string)
setting/ratio_setting/group_ratio.go:66
↓ 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:1815
↓ 2 callersFunctionCountChannelTags
(query *gorm.DB)
model/channel.go:1332
↓ 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:324
↓ 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:291
↓ 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
↓ 2 callersMethodError
()
controller/video_proxy.go:43
↓ 2 callersMethodError
()
oauth/linuxdo.go:195
↓ 2 callersMethodEstimateBilling
── Billing ────────────────────────────────────────────────────── EstimateBilling returns OtherRatios for pre-charge based on user request. Called aft
relay/channel/adapter.go:55
↓ 2 callersFunctionEstimateFamily
EstimateFamily returns the estimated token count of text for a tokenizer family. Unrecognized families use the FamilyUnknown weights.
tokenkit/tokenkit.go:149
↓ 2 callersFunctionExpireStaleSystemTaskLocks
(now int64)
model/system_task.go:516
↓ 2 callersMethodExpired
Expired reports whether the token has an absolute expiry at or before now.
model/user_access_token.go:81
↓ 2 callersFunctionExplicitUserOverrides
ExplicitUserOverrides returns only the per-user override entries.
service/authz/override.go:108
↓ 2 callersFunctionExtractHostedResponse
ExtractHostedResponse removes server-executed tool artifacts before a message converter sees them. The artifacts travel beside multi-step routes, just
relaykit/relayconvert/internal/toolconv/response_artifacts.go:63
↓ 2 callersFunctionExtractOutputTextFromResponses
(resp *dto.OpenAIResponsesResponse)
service/openai_chat_responses_compat.go:28
↓ 2 callersFunctionExtractOutputTextFromResponses
(resp *dto.OpenAIResponsesResponse)
relaykit/relayconvert/response_compat.go:188
↓ 2 callersMethodFailureEvent
FailureEvent terminates an already-started stream after a host observation, hook, or validation failure. It never accepts a detail string, preventing
relay/plugin_protocol.go:536
↓ 2 callersMethodFetchMode
()
service/task_polling.go:40
↓ 2 callersMethodFetchTask
(baseURL string, key string, task *model.Task, proxy string)
service/task_polling.go:31
↓ 2 callersMethodFillUserByGitHubId
()
model/user.go:1101
↓ 2 callersMethodFillUserById
()
model/user.go:1085
↓ 2 callersMethodFinalFromEvents
FinalFromEvents synthesizes the retrieval Response for stream-only plugins from one renderEvents call at terminal task status. Synthesis runs on a scr
relay/plugin_protocol.go:607
↓ 2 callersMethodFinalizeResponsesRequest
(info *relaycommon.RelayInfo, body []byte)
relay/channel/adapter.go:40
↓ 2 callersFunctionFindEarliestPendingSystemTasks
(taskTypes []string)
model/system_task.go:168
↓ 2 callersFunctionFindMetadataVendor
(vendors map[string]*Vendor, name string)
model/vendor_management.go:26
↓ 2 callersFunctionFixAbility
()
model/ability.go:366
↓ 2 callersMethodFlush
()
relay/channel/aws/relay_aws_test.go:64
↓ 2 callersFunctionFormatClaudeResponseInfo
(claudeResponse *dto.ClaudeResponse, oaiResponse *dto.ChatCompletionsStreamResponse, claudeInfo *ClaudeRespons
relaykit/relayconvert/internal/claude_messages/to_oai_chat_resp.go:496
↓ 2 callersFunctionGeminiImageHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/gemini/relay-gemini.go:547
↓ 2 callersFunctionGeminiResponsesStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/gemini/relay_responses.go:83
↓ 2 callersFunctionGeminiTextGenerationStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/gemini/relay-gemini-native.go:97
↓ 2 callersMethodGeminiUsageMetadata
()
relaykit/dto/gemini.go:723
↓ 2 callersFunctionGenerateBackupCodes
GenerateBackupCodes 生成备用恢复码
common/totp.go:50
↓ 2 callersFunctionGenerateKey
()
common/utils.go:229
↓ 2 callersFunctionGenerateMjOtherInfo
(relayInfo *relaycommon.RelayInfo, priceData hosttypes.PriceData)
service/log_info_generate.go:335
↓ 2 callersFunctionGenerateStartEmptyResponse
(id string, createAt int64, model string, systemFingerprint *string)
relay/helper/common.go:343
↓ 2 callersMethodGet
(key string)
pkg/jsplugin/routing.go:499
↓ 2 callersFunctionGet2FAIssuer
Get2FAIssuer 获取2FA发行者名称
common/totp.go:116
↓ 2 callersFunctionGetAllCustomOAuthProviders
GetAllCustomOAuthProviders returns all custom OAuth providers
model/custom_oauth_provider.go:76
↓ 2 callersFunctionGetAllFlowQuotaDates
(c *gin.Context)
controller/usedata.go:85
↓ 2 callersFunctionGetAllLogs
(filter LogFilter, startIdx int, num int)
model/log.go:530
↓ 2 callersFunctionGetAllProviders
GetAllProviders returns all registered OAuth providers
oauth/registry.go:70
↓ 2 callersFunctionGetAllUserSubscriptions
GetAllUserSubscriptions returns all subscriptions (active and expired) for a user.
model/subscription.go:916
↓ 2 callersFunctionGetAllUsers
(pageInfo *common.PageInfo, sortOptions ...UserSortOptions)
model/user.go:403
↓ 2 callersFunctionGetAndValidateGeminiRequest
(c *gin.Context)
relay/helper/valid_request.go:399
← previousnext →3,101–3,200 of 15,409, ranked by callers