MCPcopy Create free account

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

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

↓ 3 callersFunctionuseChannelUpstreamUpdates
(refresh: () => Promise<void>)
web/src/features/channels/hooks/use-channel-upstream-updates.ts:52
↓ 3 callersFunctionuseInvalidateOnSuccess
()
web/src/features/system-settings/auth/custom-oauth/hooks/use-custom-oauth-mutations.ts:33
↓ 3 callersFunctionuseSettingsForm
({ onSubmit, compareValues, defaultValues, ...formOptions }: SettingsFormOptions<T>)
web/src/features/system-settings/hooks/use-settings-form.ts:185
↓ 3 callersFunctionuseSidebarConfig
(navGroups: NavGroup[])
web/src/hooks/use-sidebar-config.ts:279
↓ 3 callersFunctionuseSidebarView
()
web/src/hooks/use-sidebar-view.ts:52
↓ 3 callersFunctionuseStatusData
( enabledKey: string, dataKey: string )
web/src/features/dashboard/hooks/use-status-data.ts:26
↓ 3 callersFunctionuseTopNavLinks
()
web/src/hooks/use-top-nav-links.ts:46
↓ 3 callersFunctionuseTurnstile
()
web/src/features/auth/hooks/use-turnstile.ts:28
↓ 3 callersFunctionuseWebPreview
()
web/src/components/ai-elements/web-preview.tsx:57
↓ 3 callersFunctionuserAuthFenceTTLSeconds
A pending fence only covers the interval between publishing the next version and the surrounding database transaction reaching a decision. Its TTL mus
model/user_auth_cache.go:42
↓ 3 callersFunctionusesKling4
(ctx, req)
plugins/tasks/kling/plugin.js:295
↓ 3 callersFunctionvalidateCreditedQuota
(quota decimal.Decimal)
controller/topup.go:232
↓ 3 callersFunctionvalidateH3Content
(items)
plugins/tasks/hailuo/plugin.js:332
↓ 3 callersFunctionvalidateJsonString
( value: string, options: JsonValidationOptions = {} )
web/src/features/system-settings/models/utils.ts:145
↓ 3 callersFunctionvalidateKlingDuration
(value)
plugins/tasks/kling/plugin.js:224
↓ 3 callersFunctionvalidateTurnstile
()
web/src/features/auth/hooks/use-turnstile.ts:40
↓ 3 callersFunctionvalidateUsageNumberLimit
(number float64, limit int)
relay/channel/task/jsplugin/adaptor.go:2106
↓ 3 callersFunctionvalidateVendorMetadata
(tx *gorm.DB, vendor *Vendor)
model/vendor_management.go:52
↓ 3 callersFunctionverify
( input: VerificationInput, operation: VerificationOperation, passwordEncryptionEnabled: boolean, sign
web/src/features/auth/secure-verification/api.ts:202
↓ 3 callersFunctionverifySecurityProof
(raw string, identity AuthIdentity, binding VerificationBinding)
service/auth_token.go:162
↓ 3 callersFunctionviaGateway
(ctx)
plugins/tasks/google/plugin.js:60
↓ 3 callersFunctionviaGateway
(ctx)
plugins/tasks/hailuo/plugin.js:191
↓ 3 callersFunctionvideoModel
(identity)
plugins/tasks/xai/plugin.js:146
↓ 3 callersFunctionvideoProfile
(ctx)
plugins/tasks/doubao/plugin.js:404
↓ 3 callersFunctionvideoRequest
(action, source, identity)
plugins/tasks/xai/plugin.js:271
↓ 3 callersFunctionvideoSize
(value)
plugins/tasks/alibaba/plugin.js:825
↓ 3 callersFunctionvideoURL
(body)
plugins/tasks/alibaba/plugin.js:1295
↓ 3 callersFunctionvideoURL
(data)
plugins/tasks/xai/plugin.js:340
↓ 3 callersFunctionwarnLegacyProxyURLOnce
(config *proxyURLConfig)
service/http_client.go:181
↓ 3 callersFunctionwechatLoginByCode
(code: string)
web/src/features/auth/api.ts:227
↓ 3 callersFunctionwithClient
(children: React.ReactNode)
web/src/features/usage-logs/components/__tests__/request-plugin-record.test.tsx:147
↓ 3 callersFunctionwithNormalizedEmailLock
withNormalizedEmailLock serializes concurrent writers that target the same normalized email inside tx, so a "check then write" sequence cannot be race
model/user.go:371
↓ 3 callersFunctionwithTieredBillingConfig
(t *testing.T, modes map[string]string, exprs map[string]string)
controller/model_list_test.go:97
↓ 3 callersMethodwriteClient
(kind int, message []byte)
relay/responses_websocket.go:871
↓ 3 callersFunctionwriteDashboardAuthError
(c *gin.Context, err error)
middleware/auth.go:385
↓ 3 callersFunctionwriteStoredValue
(baseKey: string, data: T)
web/src/features/playground/lib/storage/storage.ts:95
↓ 3 callersFunctionwriteTaskPluginProtocolEvent
(c *gin.Context, event dto.PluginResponsesStreamEvent)
controller/plugin_protocol.go:1219
↓ 3 callersFunctionwriteTestCgroupFile
(t *testing.T, path string, content string)
common/system_monitor_test.go:23
↓ 3 callersFunctionwriteVideoDataURL
(c *gin.Context, dataURL string)
controller/video_proxy.go:659
↓ 3 callersMethodxref
xref writes a cross-reference stream of rows as object number and returns its offset. encode, when set, encodes the rows.
relay/requestplugin/pdf_test.go:47
↓ 3 callersFunctionzeroPluginResponsesUsage
()
relay/plugin_protocol.go:1030
↓ 2 callersFunctionASCIIFold
ASCIIFold is the exported form of asciiFold for consumers outside this package.
pkg/jsplugin/model_fold.go:24
↓ 2 callersFunctionAccessTokenRouteRule
AccessTokenRouteRule returns the rule for "METHOD /full/path".
middleware/access_token_routes.go:339
↓ 2 callersFunctionAccessTokenScopeGranted
(scopes []string, scope string)
service/access_token_scope.go:212
↓ 2 callersFunctionAccessTokenVerificationScope
AccessTokenVerificationScope returns the token scope a PAT needs for a verification scope and whether the scope is listed at all.
service/access_token_scope.go:246
↓ 2 callersFunctionActivateTaskPlugin
(c *gin.Context)
controller/task_plugin.go:664
↓ 2 callersFunctionAdjustUserQuota
(userID, operatorRole int, mode string, value int)
model/user_quota_adjustment.go:25
↓ 2 callersMethodAllow
(ctx context.Context, key string, opts ...Option)
common/limiter/limiter.go:43
↓ 2 callersFunctionApiErrorI18n
ApiErrorI18n returns a translated error message based on the user's language preference key is the i18n message key, args is optional template data
common/gin.go:335
↓ 2 callersFunctionAppendResponseModelLogInfo
(relayInfo *relaycommon.RelayInfo, other *model.LogOther)
service/log_info_generate.go:140
↓ 2 callersFunctionAppendTaskPluginAuditInfo
AppendTaskPluginAuditInfo writes role-separated, credential-free plugin provenance into a usage log.
service/task_plugin_audit.go:54
↓ 2 callersFunctionApplyGeminiThinkingConfigChecked
(geminiRequest *dto.GeminiChatRequest, info convmeta.Meta, oaiRequest ...dto.GeneralOpenAIRequest)
relaykit/relayconvert/request_compat.go:32
↓ 2 callersFunctionApplyMetadataSync
(updates []MetadataSyncUpdate, upstreamVendors map[string]Vendor)
model/model_metadata_sync.go:158
↓ 2 callersMethodApplyOtherRatiosToDecimal
(value decimal.Decimal)
types/price_data.go:97
↓ 2 callersFunctionApplyVendorOperation
(operation VendorOperation)
model/vendor_management.go:201
↓ 2 callersFunctionAsParamOverrideReturnError
(err error)
relay/common/override.go:110
↓ 2 callersFunctionAttachHostedResponse
(format types.RelayFormat, response any, set HostedResponseSet, options *convmeta.Options)
relaykit/relayconvert/internal/toolconv/response_artifacts.go:76
↓ 2 callersFunctionAudioCompletionRatio2JSONString
()
setting/ratio_setting/model_ratio.go:676
↓ 2 callersFunctionAudioRatio2JSONString
()
setting/ratio_setting/model_ratio.go:668
↓ 2 callersFunctionAutomaticDisableKeywordsToString
()
setting/operation_setting/operation_setting.go:18
↓ 2 callersFunctionAutomaticDisableStatusCodesToString
()
setting/operation_setting/status_code_ranges.go:40
↓ 2 callersMethodBalanceRoute
BalanceRoute returns the explicitly configured channel-management balance route.
relaykit/dto/channel_settings.go:309
↓ 2 callersFunctionBatchDeleteChannels
(ids []int)
model/channel.go:540
↓ 2 callersFunctionBatchDeleteRedemptions
BatchDeleteRedemptions soft-deletes the selected codes in one statement.
model/redemption.go:243
↓ 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 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
pkg/jsplugin/engine.go:416
↓ 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
pkg/jsplugin/transform.go:272
↓ 2 callersMethodCallRevoke
CallRevoke runs revoke(ctx). Its result is ignored.
pkg/jsplugin/provider.go:438
↓ 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 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:441
↓ 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 callersFunctionCloneUsageExamples
CloneUsageExamples copies example facts for independent readers.
pkg/jsplugin/registry.go:1287
↓ 2 callersFunctionCloneUsageSchema
CloneUsageSchema copies schema fields and localized metadata for independent readers.
pkg/jsplugin/registry.go:1261
↓ 2 callersMethodClose
()
controller/video_proxy.go:427
← previousnext →3,001–3,100 of 15,409, ranked by callers