MCPcopy Create free account

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

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

↓ 2 callersFunctioncreateLoginSession
(userID int, expectedAuthVersion int64, loginMethod, ip, userAgent string)
service/auth_session.go:63
↓ 2 callersFunctioncreateMessageVersion
(content: string)
web/src/features/playground/lib/message/message-utils.ts:32
↓ 2 callersFunctioncreateProgressColumn
(config: { accessorKey?: string headerLabel: string })
web/src/features/usage-logs/components/columns/column-helpers.tsx:253
↓ 2 callersFunctioncreateQueryClient
()
web/src/features/users/components/dialogs/__tests__/user-binding-dialog.test.tsx:52
↓ 2 callersFunctioncreateRefreshRunner
( runtime: AuthRefreshRuntime )
web/src/lib/auth-session.ts:211
↓ 2 callersFunctioncreateScrollLayerSynchronizer
( source: ScrollSource, layers: ScrollLayers, requestFrame: RequestFrame = window.requestAnimationFrame
web/src/components/json-code-editor/json-code-editor-utils.ts:103
↓ 2 callersFunctioncreateStreamRequestController
( runtime: StreamRequestControllerRuntime )
web/src/features/playground/hooks/use-stream-request.ts:59
↓ 2 callersFunctioncreateUserSessionWithTx
(tx *gorm.DB, session *UserSession)
model/user_session.go:143
↓ 2 callersFunctioncreateWindow
()
electron/main.js:388
↓ 2 callersMethodcredentialContext
(info *relaycommon.RelayInfo)
relay/channel/providerplugin/adaptor.go:586
↓ 2 callersFunctioncurrentValidAuthBundle
()
web/src/lib/auth-session.ts:345
↓ 2 callersFunctioncustomToolHistoryRequest
(t *testing.T, items ...map[string]any)
relaykit/relayconvert/request_registry_test.go:556
↓ 2 callersMethoddecide
decide reads the first response the handler writes: a 2xx event stream or JSON body is an answer to check, an error passes on as it is, and any other
relay/requestplugin/reply.go:895
↓ 2 callersFunctiondecodeBalanceResult
decodeBalanceResult reads {amount, currency, unlimited?, windows?}.
pluginkit/provider.go:2026
↓ 2 callersFunctiondecodeCredentialResult
(object map[string]any, subject string)
pluginkit/provider.go:1659
↓ 2 callersFunctiondecodeDoubaoOpenAIImage
(t *testing.T, plugin *jsplugin.LoadedPlugin, operation, model string, body map[string]any)
plugins/doubao_responses_test.go:866
↓ 2 callersFunctiondecodeEffects
(data []byte, allowed ...string)
pkg/requestpatch/patch.go:89
↓ 2 callersFunctiondecodeJWTClaims
(token string)
service/codex_oauth.go:156
↓ 2 callersFunctiondecodeListModelsPayload
(t *testing.T, recorder *httptest.ResponseRecorder)
controller/model_list_test.go:146
↓ 2 callersFunctiondecodeNextRequest
decodeNextRequest reads the next request and state of a chain result; text is the JSON text of next.body.
pluginkit/provider.go:1152
↓ 2 callersFunctiondecodeNoticeAndFindings
decodeNoticeAndFindings reads the notice and findings members a stage or reply hook result shares.
pluginkit/transform.go:472
↓ 2 callersFunctiondecodeOpenAIResponsesDefinition
(raw json.RawMessage)
relaykit/relayconvert/internal/toolconv/decode.go:393
↓ 2 callersFunctiondecodeOpenAIResponsesDefinitions
decodeOpenAIResponsesDefinitions decodes one Responses tool. A namespace tool expands into its member tools, each renamed with convmeta.NamespacedTool
relaykit/relayconvert/internal/toolconv/decode.go:251
↓ 2 callersFunctiondecodeSchema
(text []byte, subject string, channel bool)
pluginkit/config_schema.go:414
↓ 2 callersFunctiondecodeString
(data json.RawMessage, target *string)
pkg/requestpatch/patch.go:270
↓ 2 callersFunctiondecodeSystemTaskJSONString
(data string, v any)
model/system_task.go:604
↓ 2 callersFunctiondecodeTaskId
(value)
plugins/tasks/vertex-ai/plugin.js:338
↓ 2 callersFunctiondecodeToolCounts
decodeToolCounts reads the tools member of a result: tool calls per tool name, nil when the result has none.
pluginkit/provider.go:1217
↓ 2 callersFunctiondecodeToolPricesJSON
(value string, ignoreInvalidEntries bool)
setting/operation_setting/tools.go:151
↓ 2 callersFunctiondecodeUsageExamples
(value any)
pluginkit/meta.go:1714
↓ 2 callersFunctiondecodeUsageSchema
(value any)
pluginkit/meta.go:1592
↓ 2 callersFunctiondecodeUserModelsResponse
(t *testing.T, recorder *httptest.ResponseRecorder)
controller/model_list_test.go:355
↓ 2 callersFunctiondecodeWebSocketMessages
decodeWebSocketMessages reads an array of text messages and {bodyBase64} binary ones.
pluginkit/provider.go:893
↓ 2 callersFunctiondefaultPluginKind
( counts: Record<PluginKind, number> )
web/src/features/task-plugins/lib/plugin-kinds.ts:55
↓ 2 callersFunctiondefaultTaskPluginMarketplaceSources
()
setting/task_plugin.go:48
↓ 2 callersFunctiondeleteHeaderOverrideInContext
(context map[string]any, headerName string)
relay/common/override.go:1430
↓ 2 callersFunctiondeletePasskeyWithAuthVersion
(userID int, identity *AuthSessionIdentity)
model/passkey.go:273
↓ 2 callersFunctiondeliver
(value: unknown)
web/src/lib/auth-session-sync.ts:85
↓ 2 callersFunctiondeliveredImages
(body)
plugins/tasks/doubao/plugin.js:654
↓ 2 callersFunctiondescribeChanges
describeChanges lists the json.patch operations of effects as users read them, the first 20 and the count of the rest. before and after are the body a
relay/requestplugin/record.go:42
↓ 2 callersFunctiondescribePluginDocumentProblem
( t: TFunction, error: PluginDocumentFormatError )
web/src/features/task-plugins/lib/plugin-document-problem.ts:27
↓ 2 callersFunctiondetectQuickRangeDays
( filters: DashboardFilters | undefined )
web/src/features/dashboard/components/models/models-filter-dialog.tsx:75
↓ 2 callersFunctiondiffText
(before: string, after: string)
web/src/features/task-plugins/lib/text-diff.ts:39
↓ 2 callersFunctiondisableTwoFAWithAuthVersion
(userId int, identity *AuthSessionIdentity)
model/twofa.go:247
↓ 2 callersFunctiondispatchSelectedPayment
( paymentMethod: PaymentMethod, topupAmount: number, waffoMethodIndex: number | null, processors: Paym
web/src/features/wallet/lib/payment.ts:120
↓ 2 callersFunctiondistributorEndpointPluginSourceWithModels
(key string, channelType int, models ...string)
middleware/distributor_test.go:259
↓ 2 callersFunctiondistributorTaskPluginSource
(key string, channelType int)
middleware/distributor_test.go:236
↓ 2 callersFunctiondoRequest
(req *http.Request, info *relaycommon.RelayInfo)
relay/channel/coze/relay-coze.go:281
↓ 2 callersFunctiondocxText
docxText reads the text of a DOCX file's word/document.xml: the runs of each paragraph, a line per paragraph, tabs and breaks as they are.
relay/requestplugin/extract.go:125
↓ 2 callersMethoddone
()
relay/requestplugin/pdf.go:133
↓ 2 callersFunctiondottedPath
dottedPath renders a JSON Pointer as a.b[1].c. An array item takes brackets: a token whose parent is an array in one of bodies, or, where no body has
relay/requestplugin/record.go:97
↓ 2 callersFunctiondownloadMarketplaceRelease
( source: MarketplaceSource, plugin: MarketplacePlugin, entry: MarketplaceIndexVersion )
web/src/features/task-plugins/lib/marketplace-install.ts:39
↓ 2 callersFunctiondownloadPluginDocument
( file: PluginDocumentFile, signal: AbortSignal )
web/src/features/task-plugins/lib/plugin-document.ts:153
↓ 2 callersFunctiondrawerTree
(currentRow: Redemption, open = true)
web/src/features/redemption-codes/components/__tests__/redemptions-mutate-drawer.test.tsx:96
↓ 2 callersMethoddrop
drop counts a dropped request and, at most once a minute, writes a warning with the number dropped since the last one.
relay/requestplugin/report.go:502
↓ 2 callersFunctiondryRunBuiltInAs
dryRunBuiltInAs is dryRunBuiltIn for a request of another format and path.
plugins/request_plugins_test.go:1126
↓ 2 callersMethoddurable
(task *model.Task)
controller/task_plugin_debug.go:187
↓ 2 callersFunctionduration
(req)
plugins/tasks/vertex-ai/plugin.js:312
↓ 2 callersFunctioneffectiveModelPricing
(values map[string]map[string]any, name string)
model/model_pricing_config.go:173
↓ 2 callersFunctioneffectivePricingSyncData
effectivePricingSyncData follows the billing engine's mode precedence. An inactive expression and numeric settings covered by an active expression are
controller/ratio_sync.go:145
↓ 2 callersFunctionemailBindingData
(token string, flow *model.AuthFlow, state *model.EmailBindingState)
service/email_binding.go:201
↓ 2 callersFunctionencodePluginIconFile
(file: File)
web/src/features/task-plugins/lib/plugin-icon-file.ts:61
↓ 2 callersFunctionencodeWebSearch
encodeWebSearch runs the host web-search encoder for one definition. handled is false when no encoder is set or it returned nil; the caller then keeps
relaykit/relayconvert/internal/toolconv/encode.go:182
↓ 2 callersFunctionendpoint
(ctx, action)
plugins/tasks/jimeng/plugin.js:142
↓ 2 callersFunctionenforceAccessTokenRoute
enforceAccessTokenRoute applies the route's access token rule (fail closed: scoped tokens cannot call undeclared routes). With abort set it writes the
middleware/auth.go:289
↓ 2 callersMethodensureBlock
(event *dto.ResponsesStreamResponse, kind string)
relaykit/relayconvert/internal/oai_responses/to_claude_messages_stream_resp.go:219
↓ 2 callersMethodensureItem
(event *dto.ResponsesStreamResponse, itemType string)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:816
↓ 2 callersFunctionensureLogRequestId
(log *Log)
model/log.go:94
↓ 2 callersFunctionensureStatus
( queryClient: QueryClient )
web/src/lib/status-query.ts:179
↓ 2 callersFunctionequalStringPtr
equalStringPtr 比较两个 *string 是否相等(均为 nil 视为相等)。
controller/channel.go:1560
↓ 2 callersFunctionescapePointer
(token string)
relay/requestplugin/media.go:178
↓ 2 callersMethodestimate
()
relay/channel/gemini/relay-gemini.go:237
↓ 2 callersFunctionestimatePrice
(params: { location_ids: Array<string | number> hardware_id: string | number gpus_per_container: number
web/src/features/models/api.ts:502
↓ 2 callersFunctionestimateTokens
(seconds, resolution)
plugins/tasks/doubao/plugin.js:461
↓ 2 callersFunctionevalExprLocally
( exprStr: string, promptTokens: number, completionTokens: number, extraTokenValues: ExtraTokenValues,
web/src/features/pricing/lib/tier-expr.ts:287
↓ 2 callersFunctionevaluateTaskUsageExamples
( expression: string | null | undefined, schema: BillingUsageSchema | null | undefined, examples: Billin
web/src/features/pricing/lib/task-expr.ts:289
↓ 2 callersMethodeventFields
eventFields reads the text of a stream event in the client's format: delta fields, full-text fields, the outputs it ends, and whether it ends them all
relay/requestplugin/reply.go:1150
↓ 2 callersFunctioneventStreamMessage
eventStreamMessage encodes one AWS event stream message with string headers.
relay/channel/providerplugin/eventstream_test.go:17
↓ 2 callersFunctionexceedsThreshold
exceedsThreshold 判断采样值是否超过阈值;阈值 <= 0 表示不检查该项。
common/system_monitor.go:110
↓ 2 callersFunctionexecuteLogout
( runtime: LogoutRuntime, allowMismatchRecovery = true )
web/src/features/auth/api.ts:103
↓ 2 callersFunctionexecuteRequestSpec
(c context.Context, info convmeta.Meta, from types.RelayFormat, target types.RelayFormat, request any, spec Re
relaykit/relayconvert/request_registry.go:236
↓ 2 callersFunctionexecuteRequestSteps
(c context.Context, info convmeta.Meta, from types.RelayFormat, target types.RelayFormat, request any, convert
relaykit/relayconvert/request_registry.go:244
↓ 2 callersFunctionexecuteResponseSpec
(c context.Context, info convmeta.Meta, from types.RelayFormat, target types.RelayFormat, response any, spec R
relaykit/relayconvert/response_registry.go:475
↓ 2 callersFunctionexecuteResponseStreamSteps
(c context.Context, info convmeta.Meta, state *ResponseStreamState, values []any, start int)
relaykit/relayconvert/response_registry.go:607
↓ 2 callersFunctionexecuteTaskSubmission
executeTaskSubmission owns the retry, billing, and persistence lifecycle. It deliberately performs no client response writes so JSON and protocol pres
controller/relay.go:596
↓ 2 callersFunctionexecutionFromNativeType
(toolType string)
relaykit/relayconvert/internal/toolconv/decode.go:960
↓ 2 callersMethodexpect
(text: string)
web/src/features/pricing/lib/billing-expression/parser.ts:209
↓ 2 callersFunctionexplicitSubjectEffect
(e *casbin.SyncedEnforcer, subject string, permission Permission)
service/authz/resolver.go:58
↓ 2 callersFunctionexportLogs
exportLogs writes one JSON log per line, newest first, and ends with an API response object: success with the log count, or the failure. Each user run
controller/log.go:115
↓ 2 callersMethodexportWithMemberJSON
exportWithMemberJSON is Export that also returns members of the export as the text JSON.stringify writes for them, which keeps the member order of the
pluginkit/engine.go:218
↓ 2 callersMethodexpression
(minimum = 0)
web/src/features/pricing/lib/billing-expression/parser.ts:232
↓ 2 callersFunctionexpressionFailure
(error: unknown)
web/src/features/pricing/lib/billing-expression/types.ts:150
↓ 2 callersFunctionextractErrorPosition
( error: unknown, jsonString: string )
web/src/features/system-settings/models/utils.ts:60
↓ 2 callersFunctionextractRedirectModels
(modelMapping: string)
web/src/features/channels/lib/model-mapping-validation.ts:77
↓ 2 callersFunctionfail
(error: unknown)
web/src/features/auth/lib/oauth-popup.ts:72
↓ 2 callersMethodfail
(code, message string)
relay/plugin_protocol.go:955
↓ 2 callersFunctionfailureReason
(data)
plugins/tasks/xai/plugin.js:345
↓ 2 callersFunctionfetchActiveChatKey
()
web/src/features/chat/hooks/use-active-chat-key.ts:30
↓ 2 callersFunctionfetchLogStats
( endpoint: string, params: T, isAdmin: boolean )
web/src/features/usage-logs/api.ts:60
↓ 2 callersFunctionfetchMetadataCatalog
(c *gin.Context, locale string)
controller/model_sync.go:255
← previousnext →3,901–4,000 of 15,592, ranked by callers