MCPcopy Create free account

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

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

↓ 4 callersFunctionrandomUsage
(rng *rand.Rand)
service/tiered_settle_test.go:1070
↓ 4 callersFunctionratioQuota
(usage *dto.Usage, isClaudeSemantic bool, modelRatio, completionRatio, cacheRatio, imageRatio, groupRatio floa
service/tiered_settle_test.go:679
↓ 4 callersFunctionreadCachedStatus
()
web/src/lib/status-query.ts:107
↓ 4 callersMethodreadSubmitEvents
readSubmitEvents owns only SSE framing and bounded JSON state. The plugin interprets data, accumulates provider output and decides when it is complete
relay/channel/task/jsplugin/submit_stream.go:39
↓ 4 callersFunctionrealtimeDelta
realtimeDelta is a Realtime delta event of response resp_1.
relay/requestplugin/socket_test.go:83
↓ 4 callersFunctionrecordSubscriptionResetUserLogs
(c *gin.Context, result *model.SubscriptionResetResult, adminInfo *model.AuditAdminInfo)
controller/subscription.go:417
↓ 4 callersFunctionredactTaskArtifactAccessQuery
()
middleware/task_artifact_access.go:111
↓ 4 callersFunctionrefreshChannelRuntimeCache
()
controller/channel_upstream_update.go:645
↓ 4 callersFunctionrenderAuditContent
( other: LogOtherData | null | undefined, t: (key: string, opts?: Record<string, unknown>) => string )
web/src/features/usage-logs/lib/format.ts:603
↓ 4 callersFunctionrenderLogContent
( other: LogOtherData | null | undefined, t: (key: string, opts?: Record<string, unknown>) => string )
web/src/features/usage-logs/lib/format.ts:576
↓ 4 callersFunctionreplaceRoutes
( nextRoutes: AdvancedCustomRoute[], nextRouteKeys = allRouteRows.map((routeRow) => routeRow.routeKey)
web/src/features/channels/components/dialogs/advanced-custom-editor-dialog.tsx:393
↓ 4 callersMethodrequestDescriptor
requestDescriptor runs a request-building hook. A plugin that preserves JSON order has its descriptor decoded from the JSON.stringify text of the resu
relay/channel/task/jsplugin/adaptor.go:1693
↓ 4 callersFunctionrequestGroup
requestGroup is the group that scopes a request's instances: for a token in the auto group, the group the channel selection settled once it did, other
relay/requestplugin/relay.go:446
↓ 4 callersFunctionrequestHeadersMember
(object map[string]any, name, subject string)
pkg/jsplugin/provider.go:1796
↓ 4 callersFunctionrequestPluginFieldVisible
( field: RequestPluginConfigField, siblings: Record<string, RequestPluginConfigField>, draft: RequestPlu
web/src/features/task-plugins/lib/request-plugins.ts:291
↓ 4 callersFunctionrequester
requester is the user and the token of a request, as the report record has them; the token is nil when the request has none.
relay/requestplugin/relay.go:455
↓ 4 callersFunctionrequestsTo
(requests []capturedRequest, url string)
router/provider_plugin_relay_test.go:444
↓ 4 callersFunctionrequireOrderedSubstrings
(t *testing.T, s string, parts ...string)
relay/channel/openai/chat_via_responses_test.go:326
↓ 4 callersMethodreset
()
model/user_session_migration_test.go:48
↓ 4 callersFunctionresolveChatUrl
({ template, apiKey, serverAddress, }: ResolveChatUrlParams)
web/src/features/chat/lib/chat-links.ts:153
↓ 4 callersFunctionresolveWaffoPancakeAdminCreds
resolveWaffoPancakeAdminCreds prefers body creds (typed-but-not-yet-saved values, for verification) and falls back to persisted creds when the body is
controller/topup_waffo_pancake.go:159
↓ 4 callersFunctionresolvedOriginPin
(c *gin.Context)
middleware/task_plugin_origin_task_test.go:81
↓ 4 callersFunctionrespondTaskSubmissionError
(c *gin.Context, taskErr *taskdto.TaskError)
controller/relay.go:961
↓ 4 callersFunctionresponsesArgumentsString
(value any)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_req.go:604
↓ 4 callersFunctionresponsesCustomTools
responsesCustomTools selects, by definition index, the Responses custom tools that the upstream receives as functions. A nil entry marks a custom tool
relaykit/relayconvert/internal/toolconv/encode.go:334
↓ 4 callersFunctionresponsesMCPStringFromClaudeContent
responsesMCPStringFromClaudeContent maps the Claude result shapes that can be represented without changing their meaning. A single text block is the s
relaykit/relayconvert/internal/toolconv/hosted_values.go:93
↓ 4 callersMethodrun
run passes the unread text of batch through the instances in order and adds what the last one released to each output's out. An ended output's call is
relay/requestplugin/reply.go:256
↓ 4 callersFunctionsanitizeDBError
只收敛数据库服务端生成的驱动错误(消息可能内联数据值);网络/上下文等 其它错误不含查询数据,原样保留以便排障。
model/gorm_logger.go:68
↓ 4 callersFunctionsanitizeHeaderOverrideMap
(source map[string]any)
relay/common/override.go:537
↓ 4 callersFunctionsanitizeLikePattern
sanitizeLikePattern 校验并清洗用户输入的 LIKE 搜索模式。 规则: 1. 转义 ! 和 _(使用 ! 作为 ESCAPE 字符,兼容 MySQL/PostgreSQL/SQLite) 2. 连续的 % 合并为单个 % 3. 最多允许 2 个 % 4. 含 % 时(模糊搜索),
model/token.go:124
↓ 4 callersFunctionscanMedia
scanMedia finds the inline media of a JSON body and returns the body with each media string replaced by "[media:N]", the view a stage hook reads.
relay/requestplugin/media.go:73
↓ 4 callersMethodschemaMutations
()
model/user_session_migration_test.go:54
↓ 4 callersFunctionseedSubscriptionResetSub
(t *testing.T, sub *UserSubscription)
model/subscription_reset_test.go:17
↓ 4 callersFunctionselectChannelsForAutomaticTest
(channels []*model.Channel, mode string)
controller/channel-test.go:1163
↓ 4 callersMethodsend
(t *testing.T, path, contentType, body string)
router/provider_plugin_relay_test.go:197
↓ 4 callersFunctionserializeVisualBillingDocument
( document: VisualBillingDocument )
web/src/features/pricing/lib/billing-expression/visual.ts:480
↓ 4 callersMethodsetContent
setContent stores structured content under content_parts, which the web console renders in the viewer's language, and returns the English text kept in
model/log_other.go:82
↓ 4 callersFunctionsetCookie
( name: string, value: string, maxAge: number = DEFAULT_MAX_AGE )
web/src/lib/cookies.ts:44
↓ 4 callersFunctionsetupChannelCreateTest
(t *testing.T)
controller/channel_create_test.go:19
↓ 4 callersFunctionsetupChannelStatusTest
(t *testing.T)
model/channel_status_test.go:26
↓ 4 callersFunctionsetupFlowControllerTestDB
(t *testing.T)
controller/usedata_flow_test.go:20
↓ 4 callersFunctionsetupRedeemFixture
(t *testing.T, quota int)
model/redemption_test.go:103
↓ 4 callersFunctionsideDrawerSwitchItemClassName
(className?: string)
web/src/components/drawer-layout.ts:54
↓ 4 callersMethodsign
(ctx context.Context, info *relaycommon.RelayInfo, method string, target *url.URL, header http.Header)
relay/channel/providerplugin/adaptor.go:135
↓ 4 callersFunctionsignUpstreamRequest
(adaptor any, c *gin.Context, info *common.RelayInfo, method string, target *url.URL, header http.Header)
relay/channel/api_request.go:366
↓ 4 callersFunctionsignature
(who, method, target, body string)
relay/channel/task/jsplugin/credential_test.go:189
↓ 4 callersFunctionsimulatePollBilling
=========================================================================== CAS + Billing integration tests Simulates the flow in updateVideoSingleTas
service/task_billing_test.go:1215
↓ 4 callersMethodsize
size is the decoded byte length of the payload.
relay/requestplugin/media.go:54
↓ 4 callersFunctionsplitPluginBillingExprKey
( key: string )
web/src/features/pricing/lib/plugin-pricing.ts:27
↓ 4 callersFunctionsplitRefreshToken
(raw string)
service/auth_session.go:436
↓ 4 callersFunctionsqliteChannelKeyLock
(channelID int)
model/channel_plugin_credential.go:38
↓ 4 callersMethodstopError
stopError is the error the client gets for the stop, and logs a failure.
relay/requestplugin/reply.go:958
↓ 4 callersFunctionstoreBodyError
storeBodyError is the error of a patched body that could not be stored: 413 when the patch made it larger than the request body limit, as for a client
relay/requestplugin/relay.go:273
↓ 4 callersFunctionstoredBody
(t *testing.T, c *gin.Context)
relay/requestplugin/requestplugin_test.go:1695
↓ 4 callersFunctionstoredGapsChannel
(t *testing.T, id int)
controller/channel_plugin_gaps_test.go:80
↓ 4 callersFunctionstoredSyncTopics
storedSyncTopics is the id of the newest sync task of each topic.
service/node_sync_test.go:35
↓ 4 callersFunctionstrictQuota
(quota int, clamp *QuotaClamp)
common/quota_math.go:102
↓ 4 callersFunctionstubAccessTokenFetch
stubAccessTokenFetch replaces the Google token exchange for one test and clears the token cache before and after it.
relay/channel/vertex/service_account_test.go:18
↓ 4 callersFunctionsubmitCredentialTask
(t *testing.T, adaptor *TaskAdaptor, info *relaycommon.RelayInfo)
relay/channel/task/jsplugin/credential_test.go:173
↓ 4 callersFunctionsubscriptionChangeSuccess
subscriptionChangeSuccess replies to an admin subscription change. notice tells the admin how the user's group changes, when it does.
controller/subscription.go:375
↓ 4 callersFunctionsuccessRate
(value counters)
pkg/perf_metrics/metrics.go:556
↓ 4 callersFunctionsupportsAliAnthropicMessages
(modelName string)
relay/channel/ali/adaptor.go:30
↓ 4 callersFunctionsupportsResponsesWebSocket
(channelType: number)
web/src/features/channels/lib/responses-websocket.ts:36
↓ 4 callersFunctionsweepTimedOutTasks
sweepTimedOutTasks 在主轮询之前独立清理超时任务。 每次最多处理 100 条,剩余的下个周期继续处理。 使用 per-task CAS (UpdateWithStatus) 防止覆盖被正常轮询已推进的任务。
service/task_polling.go:99
↓ 4 callersFunctiontaskMatrixToTiers
( config: TaskMatrixConfig, schema: BillingUsageSchema )
web/src/features/pricing/lib/task-expr.ts:145
↓ 4 callersFunctiontaskPluginHasFactory
(key string)
controller/task_plugin.go:821
↓ 4 callersFunctiontaskPluginLegacyPlatforms
taskPluginLegacyPlatforms lists the Task.Platform values a plugin owns: its key (plugin-era tasks) plus every numeric legacy channel type its driver c
middleware/task_plugin.go:1314
↓ 4 callersFunctiontaskPluginPricingIssues
taskPluginPricingIssues lists, after the registry sync, the task model prices the plugin serving key cannot charge. The plugin change is already saved
controller/task_plugin.go:864
↓ 4 callersFunctiontaskPricingConditions
( conditions: TaskTierCondition[], schema: BillingUsageSchema | undefined, language: string, t: (key:
web/src/features/pricing/lib/task-price-display.ts:68
↓ 4 callersFunctiontaskReportError
taskReportError is the error a task submission's client received, as the request plugins' report record shows it; nil when it succeeded.
controller/relay.go:580
↓ 4 callersFunctiontestConn
(t *testing.T)
service/protected_fetch_client_test.go:32
↓ 4 callersFunctiontoCustomOAuthProviderResponse
(p *model.CustomOAuthProvider)
controller/custom_oauth.go:52
↓ 4 callersFunctiontokenLines
( tokens: readonly { raw?: string }[], raw: string, firstLine: number )
web/src/features/task-plugins/lib/plugin-document.ts:349
↓ 4 callersFunctiontoolChoiceWithoutToolsDiagnostics
toolChoiceWithoutToolsDiagnostics reports the tool_choice and parallel_tool_calls controls omitted because no tool reached the target; upstreams rejec
relaykit/relayconvert/internal/toolconv/encode.go:220
↓ 4 callersMethodtoolDelta
(tool *responsesStreamTool, explicitDelta string)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:474
↓ 4 callersFunctiontransformFormDataToUpdatePayload
( formData: ChannelFormValues, channelId: number )
web/src/features/channels/lib/channel-form.ts:964
↓ 4 callersFunctiontrimmed
(value)
plugins/tasks/sora/plugin.js:39
↓ 4 callersFunctionunsupportedHostedHistoryDiagnostics
(format types.RelayFormat, history []HostedHistoryItem)
relaykit/relayconvert/internal/toolconv/encode.go:1392
↓ 4 callersFunctionupdateChannelBalance
updateChannelBalance queries a built-in channel type's balance and stores its detail next to the USD balance the query writes.
controller/channel-billing.go:629
↓ 4 callersFunctionupdateModelStatus
( id: number, status: number )
web/src/features/models/api.ts:102
↓ 4 callersFunctionupdateUserSettings
( data: UpdateUserSettingsRequest )
web/src/features/profile/api.ts:79
↓ 4 callersFunctionusageFromClaudeResponse
(resp *dto.ClaudeResponse)
relaykit/relayconvert/response_registry.go:883
↓ 4 callersFunctionusageNumber
(value any)
relay/channel/task/jsplugin/adaptor.go:2116
↓ 4 callersFunctionuseCarousel
()
web/src/components/ui/carousel.tsx:54
↓ 4 callersFunctionuseChatPresets
()
web/src/features/chat/hooks/use-chat-presets.ts:67
↓ 4 callersFunctionuseConfirmation
()
web/src/components/ai-elements/confirmation.tsx:48
↓ 4 callersFunctionuseCountdown
(options: UseCountdownOptions = {})
web/src/hooks/use-countdown.ts:26
↓ 4 callersFunctionuseFormField
()
web/src/components/ui/form.tsx:153
↓ 4 callersFunctionuseLayout
()
web/src/context/layout-provider.tsx:98
↓ 4 callersFunctionuseModelPricing
(names: string[] = [], enabled = true)
web/src/features/model-pricing/api.ts:141
↓ 4 callersFunctionusePromptInputAttachments
()
web/src/components/ai-elements/prompt-input.tsx:263
↓ 4 callersMethoduseTarget
useTarget sends the next request to path or target, or to the route's address when both are empty.
relay/channel/providerplugin/chain.go:177
↓ 4 callersFunctionuseTaskPluginOption
(pluginKey?: string)
web/src/features/channels/hooks/use-task-plugin-option.ts:48
↓ 4 callersFunctionuseThemeRadiusPx
( cssVariable = '--radius-md', refreshKey?: string )
web/src/lib/theme-radius.ts:40
↓ 4 callersFunctionuserCacheTTLSeconds
()
model/user_cache.go:66
↓ 4 callersFunctionuserRateLimitFactory
userRateLimitFactory creates a rate limiter keyed by authenticated user ID instead of client IP, making it resistant to proxy rotation attacks. Must b
middleware/rate-limit.go:219
↓ 4 callersFunctionvalidAuthCacheMAC
(expected, actual string, expiresAt int64)
model/auth_cache_integrity.go:20
↓ 4 callersMethodvalidate
validate checks a decoded config value against the field and returns it with the defaults of absent properties filled in. path names the value in erro
pkg/jsplugin/config_schema.go:783
↓ 4 callersFunctionvalidateModelPricing
Writes pass the locked database snapshot here, so allowing an unchanged stale override cannot bypass validation through an out-of-date process-local c
model/model_pricing_config.go:502
↓ 4 callersFunctionvendorErrorMessage
(error: unknown)
web/src/features/models/vendor-api.ts:57
← previousnext →2,001–2,100 of 15,409, ranked by callers