MCPcopy Create free account

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

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

↓ 2 callersFunctionmultipartMemoryLimit
multipartMemoryLimit returns the configured multipart memory limit in bytes
common/gin.go:487
↓ 2 callersFunctionnativeBody
(ctx)
plugins/tasks/jimeng/plugin.js:120
↓ 2 callersFunctionnativeRequest
(ctx)
plugins/tasks/alibaba/plugin.js:399
↓ 2 callersMethodneedsRefundLocked
()
service/billing_session.go:138
↓ 2 callersFunctionnewAPIGateway
newAPIGateway emulates the upstream New API instance a type-60 channel points at: it answers only on the plugin's prefixed native routes, requires the
relay/channel/task/jsplugin/adaptor_test.go:2770
↓ 2 callersFunctionnewAwsStreamResponse
(request *http.Request, body io.ReadCloser)
relay/channel/aws/relay_aws_test.go:140
↓ 2 callersFunctionnewCallMedia
(request *requestMedia, view []byte, media []inlineMedia, form *formBody)
relay/requestplugin/attachments.go:290
↓ 2 callersFunctionnewEpayRSAKeyPairForTest
newEpayRSAKeyPairForTest returns a throwaway key pair as single-line Base64 text, the format Epay merchant consoles show.
controller/payment_webhook_availability_test.go:312
↓ 2 callersFunctionnewFakeUpstream
(t *testing.T)
router/provider_plugin_relay_test.go:72
↓ 2 callersMethodnewFallbackID
()
relaykit/relayconvert/internal/gemini_chat/to_oai_chat_req.go:345
↓ 2 callersFunctionnewGeminiChatBillingUsage
(metadata *GeminiUsageMetadata, estimated bool)
relaykit/dto/billing_usage.go:210
↓ 2 callersFunctionnewGeminiStreamResponse
(candidates []dto.GeminiChatCandidate, usage *dto.Usage, info convmeta.Meta)
relaykit/relayconvert/internal/oai_chat/to_gemini_chat_resp.go:478
↓ 2 callersFunctionnewGormAdapter
(db *gorm.DB)
service/authz/adapter.go:18
↓ 2 callersFunctionnewJSONStateNode
(value any, depth int, budget *jsonStateBudget)
pluginkit/json_state.go:99
↓ 2 callersFunctionnewKeywordList
(text string, hash [sha256.Size]byte)
pluginkit/keywords.go:52
↓ 2 callersFunctionnewLoginSession
(userID int, authVersion int64, loginMethod, ip, userAgent string)
service/auth_session.go:104
↓ 2 callersFunctionnewMemoryStorage
(data []byte)
common/body_storage.go:76
↓ 2 callersFunctionnewMultipartFileContext
(t *testing.T, field, filename, contentType string, content []byte)
relay/channel/task/jsplugin/adaptor_test.go:324
↓ 2 callersFunctionnewNodeSyncRegistry
()
service/node_sync.go:52
↓ 2 callersFunctionnewOpenAIBillingUsage
(source string, usage *Usage)
relaykit/dto/billing_usage.go:66
↓ 2 callersFunctionnewPassThroughBody
(t *testing.T, payload []byte)
relay/channel/api_request_getbody_test.go:442
↓ 2 callersFunctionnewPlanOf
newPlanOf is the plan of instances, in their order.
relay/requestplugin/plan.go:140
↓ 2 callersFunctionnewPluginRouterTestWithProxies
( t *testing.T, plugins []*jsplugin.LoadedPlugin, handlers pluginRouteHandlers, trustedProxies []string, )
router/plugin_router_test.go:1025
↓ 2 callersFunctionnewProtectedFetchHTTPClientWithDialer
(resolver ssrfResolver, dialContext func(ctx context.Context, network, address string) (net.Conn, error), getP
service/protected_fetch_client.go:62
↓ 2 callersFunctionnewRelayHTTPClient
(transport http.RoundTripper)
service/http_client.go:132
↓ 2 callersFunctionnewRelayHTTPTransport
()
service/http_client.go:79
↓ 2 callersFunctionnewReportError
newReportError is the error a client received, as the record shows it.
relay/requestplugin/report.go:325
↓ 2 callersFunctionnewReportQueue
(records int, maxBytes int64, workers int)
relay/requestplugin/report.go:461
↓ 2 callersFunctionnewResponseStreamStateFromSpec
(from types.RelayFormat, target types.RelayFormat, options ResponseStreamOptions, spec ResponseConverterSpec)
relaykit/relayconvert/response_registry.go:579
↓ 2 callersFunctionnewResponsesWSRequestRunner
(c *gin.Context)
controller/responses_websocket.go:76
↓ 2 callersFunctionnewRevokeServer
(t *testing.T)
controller/provider_plugin_test.go:55
↓ 2 callersMethodnewRuntime
(ctx context.Context)
pluginkit/engine.go:871
↓ 2 callersMethodnewStreamConverter
newStreamConverter converts the stream of an upstream request whose convertResponse would read state as ctx.state.
relay/channel/providerplugin/stream.go:69
↓ 2 callersFunctionnewTaskAPIRequest
(c *gin.Context, fullRequestURL string, requestBody io.Reader)
relay/channel/api_request.go:642
↓ 2 callersFunctionnewTaskArtifactAccessLimiter
(limits system_setting.TaskArtifactAccessLimits)
middleware/task_artifact_access.go:45
↓ 2 callersFunctionnewTestTLSCertificate
()
common/email_test.go:215
↓ 2 callersMethodnewline
newline ends the current line unless the text is empty or ends one.
relay/requestplugin/extract.go:59
↓ 2 callersMethodnext
()
web/src/features/pricing/lib/billing-expression/parser.ts:81
↓ 2 callersMethodnext
next reads one message as convertStreamEvent gets it: event is the :event-type header, or :exception-type or :error-code for an exception or an error,
relay/channel/providerplugin/eventstream.go:35
↓ 2 callersFunctionnextRequestBody
nextRequestBody is the body and content type of a chained request: its body with $file markers filled in, its form, its client file, or none.
relay/channel/providerplugin/chain.go:92
↓ 2 callersFunctionnextTaskPluginBaseUrl
( currentValue: string | undefined, previousDefault: string | undefined, nextDefault: string | undefined
web/src/features/channels/lib/task-plugin-base-url.ts:85
↓ 2 callersFunctionnoAvailableChannelMessage
noAvailableChannelMessage logs candidate plugin keys under the request ID. A 503 also tells the caller when a task plugin claims the model.
middleware/distributor.go:144
↓ 2 callersFunctionnodeSyncState
( node: NodeSyncNode, topics: string[] )
web/src/features/system-info/lib/node-sync.ts:55
↓ 2 callersFunctionnonnegativePriceLiteral
(node: ExpressionNode)
web/src/features/pricing/lib/billing-expression/display.ts:83
↓ 2 callersFunctionnormalizeAccessTokenName
normalizeAccessTokenName returns the trimmed name, or false when it is empty or longer than the 64-character column.
controller/access_token.go:53
↓ 2 callersFunctionnormalizeAdvancedCustomRouteModels
( models: string[] | undefined )
web/src/features/channels/lib/advanced-custom.ts:848
↓ 2 callersFunctionnormalizeBaseUrl
(value: string | undefined)
web/src/features/channels/lib/channel-form.ts:924
↓ 2 callersFunctionnormalizeChannelModelMapping
(channel *model.Channel)
controller/channel_upstream_update.go:155
↓ 2 callersFunctionnormalizeChannelTestMode
(value?: string)
web/src/features/system-settings/request-policies/channel-health-section.tsx:145
↓ 2 callersFunctionnormalizeClaudeEffort
(effort Effort, capabilities claudeCapabilities)
relaykit/relayconvert/reasoning/claude.go:456
↓ 2 callersFunctionnormalizeClickHouseDSN
(dsn string)
model/main.go:127
↓ 2 callersFunctionnormalizeCondition
( condition: Record<string, unknown> = {} )
web/src/features/channels/components/dialogs/param-override-editor-dialog.tsx:495
↓ 2 callersFunctionnormalizeCondition
( cond: Partial<RequestCondition> | null | undefined )
web/src/features/pricing/lib/billing-expr.ts:728
↓ 2 callersFunctionnormalizeGeminiSchemaTypeAndNullable
(schema map[string]interface{})
relaykit/relayconvert/internal/shared/gemini/schema.go:172
↓ 2 callersFunctionnormalizeHttp2ConnectionShards
( value: number | undefined | null )
web/src/features/channels/lib/channel-form.ts:98
↓ 2 callersFunctionnormalizeLookupValues
(values []string)
model/model_meta.go:430
↓ 2 callersFunctionnormalizeMetaBaseURL
normalizeMetaBaseURL admits an absolute http(s) URL that a channel can adopt verbatim as its base URL: no credentials, query, or fragment, an ASCII lo
pluginkit/meta.go:2032
↓ 2 callersFunctionnormalizeModelList
(models: unknown[] = [])
web/src/features/channels/lib/upstream-update-utils.ts:19
↓ 2 callersFunctionnormalizeOperation
( operation: Record<string, unknown> = {} )
web/src/features/channels/components/dialogs/param-override-editor-dialog.tsx:511
↓ 2 callersFunctionnormalizePlanType
(value: unknown)
web/src/features/channels/components/dialogs/codex-usage-dialog.tsx:239
↓ 2 callersFunctionnormalizePluginConfig
normalizePluginConfig validates the plugin config in the channel's settings and stores it as the schema reads it: declared properties only, defaults l
controller/channel.go:565
↓ 2 callersFunctionnormalizePluginSourceUrl
(input: string)
web/src/features/task-plugins/lib/plugin-url.ts:38
↓ 2 callersFunctionnormalizeReason
(reason string)
pkg/wsmanager/wsmanager.go:234
↓ 2 callersFunctionnormalizeRequestPluginInstances
normalizeRequestPluginInstances checks an instance list and returns it as it is saved: ids filled in, names trimmed and configs validated. An enabled
controller/request_plugin.go:92
↓ 2 callersFunctionnormalizeResolution
(value)
plugins/tasks/doubao/plugin.js:408
↓ 2 callersFunctionnormalizeResponsesReasoningReplay
DeepSeek's stateless Responses API requires plaintext reasoning before an assistant tool step, including a step resumed after a tool result. Reproduce
relay/channel/deepseek/responses_reasoning.go:46
↓ 2 callersFunctionnormalizeResponsesWSCreateEvent
normalizeResponsesWSCreateEvent builds the HTTP-shaped request body from a response.create whose envelope the read loop already parsed and validated.
relay/responses_websocket.go:973
↓ 2 callersFunctionnormalizeSyncValue
(field string, value any)
controller/ratio_sync.go:125
↓ 2 callersFunctionnormalizeTaskMediaHost
(scheme, host string)
controller/video_proxy.go:574
↓ 2 callersFunctionnormalizeTaskVisualConfig
( config: TaskVisualConfig | null | undefined, schema: BillingUsageSchema )
web/src/features/pricing/lib/task-expr.ts:307
↓ 2 callersFunctionnormalizeUserSettings
( setting?: string )
web/src/features/profile/lib/user-settings.ts:36
↓ 2 callersFunctionnormalizeV1Meta
(meta *Meta)
pluginkit/meta.go:1151
↓ 2 callersFunctionnoteTaskQuotaClamp
noteTaskQuotaClamp records the first quota saturation event onto the task's RelayInfo so LogTaskConsumption can surface it on the submit log's admin_i
relay/relay_task.go:466
↓ 2 callersFunctionnotifyAdmins
notifyAdmins sends a notice to each enabled administrator for whom receives returns true, and returns how many notices it sent.
service/user_notify.go:42
↓ 2 callersFunctionnotifySystemTaskRunner
notifySystemTaskRunner wakes the runner without blocking. If a wakeup is already pending it is a no-op, which is fine since one pass drains all work.
service/system_task.go:116
↓ 2 callersMethodnumeric
(node: ExpressionNode)
web/src/features/pricing/lib/billing-expression/runtime.ts:313
↓ 2 callersFunctionobjectMembers
(data json.RawMessage, subject string)
pkg/requestpatch/patch.go:246
↓ 2 callersFunctionobjectStreamData
objectStreamData is the data of an object stream holding objects under numbers, and the offset of the first object in it.
relay/requestplugin/pdf_test.go:107
↓ 2 callersFunctionobserveStreamChoices
observeStreamChoices collects billable function call names and records the finish reason facts used by health sampling from one parsed chunk.
relay/channel/openai/relay-openai.go:203
↓ 2 callersMethodoffSlot
offSlot runs work, which waits or computes in Go, with the call's JavaScript clock stopped and its execution slot lent to other calls. It returns the
pluginkit/media.go:217
↓ 2 callersFunctionollamaChatHandler
non-stream handler for chat/generate
relay/channel/ollama/stream.go:224
↓ 2 callersFunctionollamaStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/ollama/stream.go:143
↓ 2 callersFunctionollamaToolCallsToOpenAI
(toolCalls []OllamaToolCall, startIndex int, includeIndex bool)
relay/channel/ollama/stream.go:45
↓ 2 callersFunctionomitTrailingAssistantText
omitTrailingAssistantText drops the assistant turns without tool calls that end the converted conversation after a user turn or tool result. In Respon
relaykit/relayconvert/internal/oai_responses/req_helpers.go:70
↓ 2 callersFunctionomniDuration
(req)
plugins/tasks/vertex-ai/plugin.js:155
↓ 2 callersFunctionomniResolution
(req)
plugins/tasks/vertex-ai/plugin.js:147
↓ 2 callersFunctionomniUsageFacts
(seconds, resolution)
plugins/tasks/vertex-ai/plugin.js:27
↓ 2 callersFunctiononPaginationChange
(updater)
web/src/hooks/use-table-url-state.ts:169
↓ 2 callersFunctiononlyMembers
(members map[string]json.RawMessage, subject string, allowed ...string)
pkg/requestpatch/patch.go:254
↓ 2 callersFunctionopenAIImageRuleFor
(model, detail string)
tokenkit/image.go:96
↓ 2 callersFunctionopenTokenControllerExternalDB
(t *testing.T, dialect string, dsn string)
controller/token_test.go:123
↓ 2 callersFunctionopenTokenControllerTestDB
(t *testing.T)
controller/token_test.go:82
↓ 2 callersFunctionopenaiImageDataHasField
openaiImageDataHasField reports whether an image data entry carries a non-empty string value for field.
relay/channel/openai/relay_image.go:87
↓ 2 callersFunctionopenaiImageResponseCount
openaiImageResponseCount counts billable images in an OpenAI-format image response body. An object-shaped data is one image when it carries url or b64
relay/channel/openai/relay_image.go:61
↓ 2 callersFunctionoptionsKeyIsUnique
(db *gorm.DB)
model/option_primary_key_migration.go:46
↓ 2 callersFunctionoptionsRevision
(t *testing.T)
model/sensitive_word_migration_test.go:14
↓ 2 callersFunctionorderCardCells
( cells: Cell<TData, unknown>[] )
web/src/components/data-table/layout/card-row-content.tsx:26
↓ 2 callersFunctionorderProtocolSupports
(protocol string, supports []string)
pluginkit/routing.go:149
↓ 2 callersFunctionoriginKey
(req *http.Request)
service/http_transport_sharded.go:40
↓ 2 callersFunctionoriginTaskTestContext
(userID int)
middleware/task_plugin_origin_task_test.go:73
← previousnext →4,401–4,500 of 15,592, ranked by callers