MCPcopy Create free account

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

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

↓ 4 callersFunctionnormalizeLang
normalizeLang normalizes language code to supported format
i18n/i18n.go:190
↓ 4 callersFunctionnormalizeResolution
(value)
plugins/tasks/alibaba/plugin.js:818
↓ 4 callersFunctionnormalizedReply
(text string)
router/provider_plugin_relay_test.go:234
↓ 4 callersMethodobject
(number int, body string)
relay/requestplugin/pdf_test.go:30
↓ 4 callersMethodobserve
()
web/src/test-setup.ts:91
↓ 4 callersMethodobserve
(response *dto.GeminiChatResponse)
relay/channel/gemini/relay-gemini.go:117
↓ 4 callersMethodoutput
(index int)
relay/requestplugin/reply.go:216
↓ 4 callersFunctionparseChannelSettings
( settingStr: string | null | undefined )
web/src/features/channels/lib/channel-utils.ts:280
↓ 4 callersFunctionparseJSONArray
(jsonStr string, formatErrorKey string)
setting/console_setting/validation.go:26
↓ 4 callersFunctionparseJsonArray
(data: unknown)
web/src/features/wallet/hooks/use-topup-info.ts:41
↓ 4 callersFunctionparseJsonToRows
(json: string)
web/src/components/json-editor.tsx:86
↓ 4 callersFunctionparseJsonToRows
(json: string)
web/src/features/channels/components/model-mapping-editor.tsx:141
↓ 4 callersFunctionparseLooseValue
(valueText: string)
web/src/features/channels/components/dialogs/param-override-editor-dialog.tsx:468
↓ 4 callersFunctionparseModelsString
(modelsStr: string)
web/src/features/channels/lib/model-mapping-validation.ts:26
↓ 4 callersFunctionparsePasskeyFinishRequest
(c *gin.Context)
controller/passkey.go:34
↓ 4 callersMethodparseTaskCredential
A key line of a task plugin channel may be a credential its plugin's login stored. Task requests then carry the credential's headers and query instead
relay/channel/task/jsplugin/credential.go:32
↓ 4 callersFunctionparseUserSettings
(settingsJson?: string)
web/src/features/profile/lib/format.ts:28
↓ 4 callersFunctionpdfStream
(dictionary, data string)
relay/requestplugin/pdf_test.go:97
↓ 4 callersFunctionpdfText
pdfText reads the text of a PDF: its first maxPDFPages pages, at most maxChars UTF-16 code units, until deadline. Encrypted files are unreadable.
relay/requestplugin/pdf.go:59
↓ 4 callersFunctionperformVerifiedManageUserRequest
performVerifiedManageUserRequest drives ManageUser as the root operator from a dashboard login session, carrying the step-up proof status or role chan
controller/user_manage_test.go:91
↓ 4 callersFunctionpinnedTaskPluginIdentities
(c *gin.Context, expected string)
service/channel_select.go:217
↓ 4 callersMethodpluginAndAdvancedCustom
pluginAndAdvancedCustom registers a plugin whose converter routes send each incoming path to /vendor plus the path, and returns its channel and an Adv
router/provider_plugin_relay_test.go:1478
↓ 4 callersFunctionpluginTaskStatus
(taskStatus string)
relay/plugin_protocol.go:1056
↓ 4 callersFunctionprocessChannelError
(c *gin.Context, channelError types.ChannelError, err *types.NewAPIError, relayInfo *relaycommon.RelayInfo)
controller/relay.go:362
↓ 4 callersFunctionprocessNegativeIndex
(doc *ojson.Doc, path string)
relay/common/override.go:722
↓ 4 callersFunctionproductionPluginRouteHandlers
(generation *jsplugin.RoutingGeneration, group jsplugin.RouteGroup)
router/plugin-router.go:108
↓ 4 callersFunctionprojectTaskArtifacts
(task *model.Task)
controller/task.go:167
↓ 4 callersMethodputRuntime
Idle runtimes are bounded by the execution limit and survive GC. Start with one instance and grow only when concurrent work actually needs more.
pluginkit/engine.go:761
↓ 4 callersFunctionqueryWindow
queryWindow covers the current partial hour plus the preceding complete hours, so every reader shares the same hourly buckets.
pkg/perf_metrics/metrics.go:151
↓ 4 callersFunctionquotaResultFromLua
(result int, err error)
model/quota_reserve.go:67
↓ 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:40
↓ 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 callersFunctionregister
(payload: RegisterPayload)
web/src/features/auth/api.ts:250
↓ 4 callersFunctionregisterModelTestPlugin
(t *testing.T, source, key string)
model/channel_plugin_credential_test.go:49
↓ 4 callersFunctionrelayManagementRoute
relayManagementRoute reports a /v1/models or balance route, which serves channel management rather than client requests.
pluginkit/meta.go:257
↓ 4 callersFunctionrenderAuditContent
( other: LogOtherData | null | undefined, t: (key: string, opts?: Record<string, unknown>) => string )
web/src/features/usage-logs/lib/format.ts:609
↓ 4 callersFunctionrenderLogContent
( other: LogOtherData | null | undefined, t: (key: string, opts?: Record<string, unknown>) => string )
web/src/features/usage-logs/lib/format.ts:582
↓ 4 callersFunctionreplaceRoutes
( nextRoutes: AdvancedCustomRoute[], nextRouteKeys = allRouteRows.map((routeRow) => routeRow.routeKey)
web/src/features/channels/components/dialogs/advanced-custom-editor-dialog.tsx:393
↓ 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)
pluginkit/provider.go:1780
↓ 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:950
↓ 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:260
↓ 4 callersFunctionsanitizeDBError
只收敛数据库服务端生成的驱动错误(消息可能内联数据值);网络/上下文等 其它错误不含查询数据,原样保留以便排障。
model/gorm_logger.go:68
↓ 4 callersFunctionsanitizeHeaderOverrideMap
(source map[string]any)
relay/common/override.go:552
↓ 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:87
↓ 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:1164
↓ 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:126
↓ 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:68
↓ 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:962
↓ 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:1860
↓ 4 callersFunctionstoredGapsChannel
(t *testing.T, id int)
controller/channel_plugin_gaps_test.go:83
↓ 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:822
↓ 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:1307
↓ 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:865
← previousnext →2,001–2,100 of 15,592, ranked by callers