MCPcopy Create free account

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

Functions10,602 in github.com/QuantumNous/new-api

↓ 3 callersFunctionresponsesJSONString
(raw json.RawMessage)
service/relayconvert/internal/oai_responses/to_oai_chat_req.go:529
↓ 3 callersFunctionrunSystemTaskClaimPass
runSystemTaskClaimPass tries to claim one pending task per registered type and dispatches each claimed task in its own goroutine so a long-running han
service/system_task.go:225
↓ 3 callersFunctionrunSystemTaskScheduler
runSystemTaskScheduler creates a new task row for each enabled scheduled handler whose interval has elapsed since its last run and that has no active
service/system_task.go:263
↓ 3 callersFunctionrunTokenMigrationCompatibilityTest
(t *testing.T, db *gorm.DB, dialect string, managedTokensTable *bool)
controller/token_test.go:276
↓ 3 callersFunctionsafeNavigate
(target: string)
web/default/src/routes/oauth/$provider.tsx:62
↓ 3 callersFunctionsanitizeHeaderOverrideMap
(source map[string]interface{})
relay/common/override.go:398
↓ 3 callersFunctionsaturateQuota
saturateQuota converts an already-rounded quota value to int, clamping to the int32 range. Whenever clamping (what would otherwise be an integer wrapa
common/quota_math.go:72
↓ 3 callersMethodscanKeys
(match string)
pkg/cachex/hybrid_cache.go:139
↓ 3 callersFunctionsearchUsers
( startIdx, pageSize, searchKeyword = null, searchGroup = null, )
web/classic/src/hooks/users/useUsersData.jsx:89
↓ 3 callersFunctionselectChannelsForAutomaticTest
(channels []*model.Channel, mode string)
controller/channel-test.go:1018
↓ 3 callersFunctionsetChannelAffinityContext
(c *gin.Context, meta channelAffinityMeta)
service/channel_affinity.go:352
↓ 3 callersFunctionsetCodexWhamRequestHeaders
(req *http.Request, accessToken string, accountID string)
service/codex_wham_usage.go:154
↓ 3 callersFunctionsetFormValue
(field: keyof ModelPricingFormValues, value: string)
web/default/src/features/system-settings/models/model-pricing-sheet.tsx:223
↓ 3 callersFunctionsetHeaderOverrideInContext
(context map[string]interface{}, headerName string, value interface{}, keepOrigin bool)
relay/common/override.go:1073
↓ 3 callersFunctionshouldAuditParamPath
(path string)
relay/common/override.go:257
↓ 3 callersFunctionshouldUseRatioBillingProcess
(modelPrice = -1)
web/classic/src/helpers/render.jsx:1212
↓ 3 callersFunctionshowNotice
(message, isHTML = false)
web/classic/src/helpers/utils.jsx:165
↓ 3 callersFunctionsplitBillingExprAndRequestRules
(expr)
web/classic/src/pages/Setting/Ratio/components/requestRuleExpr.js:417
↓ 3 callersFunctionstableColorMap
( keys: string[], palette?: readonly string[] )
web/default/src/features/dashboard/lib/flow.ts:315
↓ 3 callersFunctionstartReasoningTiming
( message: Message, startedAt: number = Date.now() )
web/default/src/features/playground/lib/message/message-timing-utils.ts:40
↓ 3 callersFunctionsubtractModelNames
(base []string, removed []string)
controller/channel_upstream_update.go:116
↓ 3 callersFunctionsuccessRate
(value counters)
pkg/perf_metrics/metrics.go:366
↓ 3 callersFunctionsupportsAliAnthropicMessages
* var syncModels = []string{ "z-image", "qwen-image", "wan2.6", } */
relay/channel/ali/adaptor.go:39
↓ 3 callersFunctionsyncConfigsToJson
(configs)
web/classic/src/pages/Setting/Chat/SettingsChats.jsx:130
↓ 3 callersFunctionsyncRows
(updatedRows: MappingRow[])
web/default/src/features/channels/components/model-mapping-editor.tsx:150
↓ 3 callersFunctiontaskBillingContextPriceData
(bc *model.TaskBillingContext)
service/task_billing.go:144
↓ 3 callersFunctiontaskBillingOther
taskBillingOther 从 task 的 BillingContext 构建日志 Other 字段。
service/task_billing.go:122
↓ 3 callersFunctiontaskModelName
taskModelName 从 BillingContext 或 Properties 中获取模型名称。
service/task_billing.go:156
↓ 3 callersFunctiontestChannel
( record, model, endpointType = '', stream = false, )
web/classic/src/hooks/channels/useChannelsData.jsx:862
↓ 3 callersFunctiontoBoolean
(value: unknown, fallback: boolean)
web/default/src/features/system-settings/maintenance/config.ts:86
↓ 3 callersFunctiontoInputValue
(date?: Date)
web/default/src/features/usage-logs/components/compact-date-time-range-picker.tsx:40
↓ 3 callersFunctiontoValueText
(value: unknown)
web/default/src/features/channels/components/dialogs/param-override-editor-dialog.tsx:453
↓ 3 callersFunctiontoValueText
(value)
web/classic/src/components/table/channels/modals/ParamOverrideEditorModal.jsx:497
↓ 3 callersFunctiontriggerRefresh
()
web/default/src/features/subscriptions/components/subscriptions-provider.tsx:62
↓ 3 callersFunctiontryParseRequestRuleExpr
(expr)
web/classic/src/pages/Setting/Ratio/components/requestRuleExpr.js:372
↓ 3 callersFunctionunwrapStoredValue
(value: unknown)
web/default/src/features/playground/lib/storage/storage.ts:68
↓ 3 callersFunctionupdateOpenAIImageCount
(info *relaycommon.RelayInfo, count int64)
relay/channel/openai/relay_image.go:25
↓ 3 callersFunctionupdateOptionMap
(key string, value string)
model/option.go:256
↓ 3 callersFunctionupdateRulesState
(nextRules)
web/classic/src/pages/Setting/Operation/SettingsChannelAffinity.jsx:473
↓ 3 callersFunctionupdateUserGroupCache
(userId int, group string)
model/user_cache.go:227
↓ 3 callersFunctionupdateUserSettingCache
(userId int, setting string)
model/user_cache.go:252
↓ 3 callersFunctionusageFromClaudeResponse
(resp *dto.ClaudeResponse)
service/relayconvert/response_registry.go:776
↓ 3 callersFunctionuseAuthRedirect
()
web/default/src/features/auth/hooks/use-auth-redirect.ts:49
↓ 3 callersFunctionuseCarouselApi
()
web/default/src/components/ai-elements/inline-citation.tsx:115
↓ 3 callersFunctionuseDialogs
()
web/default/src/hooks/use-dialog.ts:131
↓ 3 callersFunctionuseInvalidateOnSuccess
()
web/default/src/features/system-settings/auth/custom-oauth/hooks/use-custom-oauth-mutations.ts:31
↓ 3 callersFunctionuseSecureVerification
({ onSuccess, onError, successMessage, autoReset = true, } = {})
web/classic/src/hooks/common/useSecureVerification.jsx:34
↓ 3 callersFunctionuseSettingsForm
({ onSubmit, compareValues, defaultValues, ...formOptions }: SettingsFormOptions<T>)
web/default/src/features/system-settings/hooks/use-settings-form.ts:185
↓ 3 callersFunctionuseSidebar
()
web/classic/src/hooks/common/useSidebar.js:79
↓ 3 callersFunctionuseSidebarCollapsed
()
web/classic/src/hooks/common/useSidebarCollapsed.js:24
↓ 3 callersFunctionuseStatusData
( enabledKey: string, dataKey: string )
web/default/src/features/dashboard/hooks/use-status-data.ts:26
↓ 3 callersFunctionuseSystemOptions
()
web/default/src/features/system-settings/hooks/use-system-options.ts:23
↓ 3 callersFunctionuseTopNavLinks
()
web/default/src/hooks/use-top-nav-links.ts:46
↓ 3 callersFunctionuseTurnstile
()
web/default/src/features/auth/hooks/use-turnstile.ts:28
↓ 3 callersFunctionuseWebPreview
()
web/default/src/components/ai-elements/web-preview.tsx:57
↓ 3 callersFunctionvalidateJsonString
( value: string, options: JsonValidationOptions = {} )
web/default/src/features/system-settings/models/utils.ts:145
↓ 3 callersFunctionvalidateTurnstile
()
web/default/src/features/auth/hooks/use-turnstile.ts:40
↓ 3 callersFunctionwechatLoginByCode
(code: string)
web/default/src/features/auth/api.ts:98
↓ 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:264
↓ 3 callersFunctionwriteStoredValue
(key: string, data: T)
web/default/src/features/playground/lib/storage/storage.ts:80
↓ 2 callersFunctionAcSearch
(findText string, dict []string, stopImmediately bool)
service/str.go:132
↓ 2 callersFunctionAdminBindSubscription
Admin bind (no payment). Creates a UserSubscription from a plan.
model/subscription.go:697
↓ 2 callersFunctionAllOption
()
model/option.go:23
↓ 2 callersFunctionAppendChannelAffinityAdminInfo
(c *gin.Context, adminInfo map[string]interface{})
service/channel_affinity.go:702
↓ 2 callersMethodAppendRequestConversion
(format types.RelayFormat)
relay/common/relay_info.go:612
↓ 2 callersMethodApplyOtherRatiosToDecimal
(value decimal.Decimal)
types/price_data.go:88
↓ 2 callersFunctionBodyStorageCleanup
BodyStorageCleanup 请求体存储清理中间件 在请求处理完成后自动清理磁盘/内存缓存
middleware/body_cleanup.go:11
↓ 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:37
↓ 2 callersFunctionBuildParamOverrideContext
BuildParamOverrideContext 提供 ApplyParamOverride 可用的上下文信息。 目前内置以下字段: - upstream_model/model:始终为通道映射后的上游模型名。 - original_model:请求最初指定的模型名。 - request_path
relay/common/override.go:2048
↓ 2 callersFunctionBuildProxyURL
BuildProxyURL constructs the video proxy URL using the public task ID. e.g., "https://your-server.com/v1/videos/task_xxxx/content"
relay/channel/task/taskcommon/helpers.go:65
↓ 2 callersFunctionBuildPublisherModelURL
(baseURL, version, projectID, region, publisher, modelName, action string)
relay/channel/vertex/url_builder.go:63
↓ 2 callersFunctionCacheGetRandomSatisfiedChannel
CacheGetRandomSatisfiedChannel tries to get a random channel that satisfies the requirements. 尝试获取一个满足要求的随机渠道。 For "auto" tokenGroup with cross-group
service/channel_select.go:84
↓ 2 callersFunctionChatCompletionsRequestToResponsesRequest
(req *dto.GeneralOpenAIRequest)
service/relayconvert/internal/oai_chat/to_oai_responses_req.go:76
↓ 2 callersFunctionChatCompletionsResponseToResponsesResponse
(resp *dto.OpenAITextResponse, id string)
service/relayconvert/response_compat.go:83
↓ 2 callersFunctionChatCompletionsResponseToResponsesResponse
(resp *dto.OpenAITextResponse, id string)
service/relayconvert/internal/oai_chat/to_oai_responses_resp.go:34
↓ 2 callersMethodCheckClusterNameAvailability
CheckClusterNameAvailability checks if a cluster name is available
pkg/ionet/deployment.go:327
↓ 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:180
↓ 2 callersFunctionCleanupOldDiskCacheFiles
CleanupOldDiskCacheFiles 清理旧的缓存文件 maxAge: 文件最大存活时间 注意:此函数只删除文件,不更新统计(因为无法知道每个文件的原始大小)
common/disk_cache.go:109
↓ 2 callersFunctionClearCurrentChannelAffinityCache
(c *gin.Context)
service/channel_affinity.go:644
↓ 2 callersFunctionClearUserAuthorizationInTx
(tx *gorm.DB, userID int)
service/authz/override.go:97
↓ 2 callersMethodClose
()
relay/channel/gemini/relay_responses_test.go:192
↓ 2 callersFunctionContainsAudioCompletionRatio
(name string)
setting/ratio_setting/model_ratio.go:645
↓ 2 callersFunctionContainsAudioRatio
(name string)
setting/ratio_setting/model_ratio.go:639
↓ 2 callersFunctionContainsPayMethod
(method string)
setting/operation_setting/payment_setting_old.go:52
↓ 2 callersFunctionContentPartToFileSource
(part map[string]any)
service/relayconvert/internal/oai_responses/req_helpers.go:211
↓ 2 callersFunctionContentParts
(content any)
service/relayconvert/internal/oai_responses/req_helpers.go:95
↓ 2 callersMethodConvertAudioRequest
(c *gin.Context, info *relaycommon.RelayInfo, request dto.AudioRequest)
relay/channel/adapter.go:23
↓ 2 callersMethodConvertClaudeRequest
(c *gin.Context, info *relaycommon.RelayInfo, request *dto.ClaudeRequest)
relay/channel/adapter.go:30
↓ 2 callersMethodConvertGeminiRequest
(c *gin.Context, info *relaycommon.RelayInfo, request *dto.GeminiChatRequest)
relay/channel/adapter.go:31
↓ 2 callersMethodConvertOpenAIRequest
(c *gin.Context, info *relaycommon.RelayInfo, request *dto.GeneralOpenAIRequest)
relay/channel/openai/adaptor.go:237
↓ 2 callersFunctionConvertSimpleChangeParams
(content string)
service/midjourney.go:136
↓ 2 callersFunctionCountChannelTags
(query *gorm.DB)
model/channel.go:1085
↓ 2 callersFunctionCountOldLog
(ctx context.Context, targetTimestamp int64)
model/log.go:695
↓ 2 callersFunctionCoverPlusActionToNormalAction
(midjRequest *dto.MidjourneyRequest)
service/midjourney.go:77
↓ 2 callersFunctionCoverTaskActionToModelName
(platform constant.TaskPlatform, action string)
service/task.go:9
↓ 2 callersFunctionCreateBackupCodes
CreateBackupCodes 创建备用码
model/twofa.go:143
↓ 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:104
↓ 2 callersFunctionDecodeBase64ImageData
return image.Config, format, clean base64 string, error
service/image.go:20
← previousnext →1,201–1,300 of 10,602, ranked by callers