MCPcopy Create free account

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

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

↓ 4 callersMethodValidateAndFill
ValidateAndFill check password & user status
model/user.go:1058
↓ 4 callersFunctionValidateMetadataValues
(values MetadataValues)
model/model_metadata_sync.go:99
↓ 4 callersFunctionValidateNumericCode
ValidateNumericCode 验证数字验证码格式
common/totp.go:129
↓ 4 callersFunctionVendorRecordVersion
(v *Vendor)
model/vendor_management.go:73
↓ 4 callersFunctionVerifyTaskArtifactAccess
VerifyTaskArtifactAccess verifies the route binding without reading task, user, or token state. Signature comparison is constant-time.
service/task_artifact_access.go:48
↓ 4 callersFunctionWaffoPancakeBuyerIdentityFromUserID
WaffoPancakeBuyerIdentityFromUserID renders the canonical buyer identity for checkout. Webhook handlers compare against the value rendered here to rej
service/waffo_pancake.go:161
↓ 4 callersMethodWriteContext
(c *gin.Context)
model/user_cache.go:41
↓ 4 callersFunctionabortTaskPluginRouteErrorDetail
(c *gin.Context, status int, detail string)
middleware/task_plugin.go:1699
↓ 4 callersFunctionabortWithWebMessage
abortWithWebMessage answers a web console request; the web console translates the message, and code, when set, stays a stable error code.
middleware/auth.go:376
↓ 4 callersFunctionactiveRules
(config)
plugins/tasks/request-redact/plugin.js:330
↓ 4 callersMethodadmit
admit reserves size bytes for a request, or drops it when the queue is full.
relay/requestplugin/report.go:467
↓ 4 callersFunctionappendRequestPluginRecord
appendRequestPluginRecord shows users what the request plugins changed in their request. A retry rewrites the attempt's entries in place, so the log k
service/log_info_generate.go:163
↓ 4 callersFunctionappendSeparatedText
(builder *strings.Builder, text string)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_resp.go:314
↓ 4 callersFunctionapplyAuthBundle
( bundle: AuthBundle, synchronizeTabs = true )
web/src/lib/auth-session.ts:150
↓ 4 callersFunctionapplyAuthFlowMatch
(query *gorm.DB, token string, match AuthFlowMatch)
model/auth_flow.go:127
↓ 4 callersMethodapplyCompletionUsageFacts
(result *relaycommon.TaskInfo, facts any, models ...string)
relay/channel/task/jsplugin/adaptor.go:1007
↓ 4 callersFunctionapplyEffects
applyEffects applies a result's effects to body and headers through the host's own decoder, so every effect also passes the host's checks.
plugins/request_plugins_test.go:53
↓ 4 callersFunctionapplyOriginTaskIntent
(c *gin.Context, intent map[string]any, meta pluginruntime.Meta)
middleware/task_plugin.go:1328
↓ 4 callersFunctionapplyRechargeRate
* Apply recharge rate to price * * priceRate represents how much users need to recharge (in the display currency) * to get 1 USD credit. usdExchang
web/src/features/pricing/lib/price.ts:131
↓ 4 callersFunctionapplyTaskCredential
applyTaskCredential puts a credential's headers and query on a task request.
relay/channel/task/jsplugin/credential.go:103
↓ 4 callersMethodapplyUpstreamCredentials
applyUpstreamCredentials sets ctx.upstream together with the credentials every driver hook reads. A New API channel (type 60) is another gateway: the
relay/channel/task/jsplugin/adaptor.go:1382
↓ 4 callersFunctionapplyWebSocketSubprotocolAuthorization
(header http.Header)
middleware/auth.go:660
↓ 4 callersFunctionarrayIndex
arrayIndex reads an RFC 6901 array index: digits without a leading zero.
pkg/requestpatch/patch.go:573
↓ 4 callersFunctionartifactData
(ctx)
plugins/tasks/alibaba/plugin.js:1289
↓ 4 callersFunctionartifactData
(ctx)
plugins/tasks/doubao/plugin.js:1015
↓ 4 callersFunctionasOAIChatStreamResponse
(response any)
relaykit/relayconvert/response_registry.go:1269
↓ 4 callersFunctionasciiFold
asciiFold maps only 'A'–'Z' onto 'a'–'z'. Every other byte is unchanged. Unicode case folding is intentionally not applied: U+212A (KELVIN SIGN) must
pluginkit/model_fold.go:6
↓ 4 callersFunctionassertBilledAlike
assertBilledAlike checks that a plugin channel billed a request as the Advanced Custom channel did.
router/provider_plugin_relay_test.go:1496
↓ 4 callersFunctionassertChannelRoutePermission
(t *testing.T, method string, path string, permission authz.Permission, handler any)
router/channel_router_test.go:63
↓ 4 callersMethodattachments
Stage hooks only: the request's files in body order, then the file parts of a form body. The host never downloads a file the request only names.
pluginkit/v1.d.ts:36
↓ 4 callersFunctionauditFieldLabel
(key: string, t: TFunction)
web/src/features/usage-logs/audit/lib/audit-details.ts:83
↓ 4 callersFunctionawaitH2ServerResult
(t *testing.T, resultCh <-chan h2ServerResult)
relay/channel/api_request_getbody_test.go:329
↓ 4 callersFunctionbaseAutoTokenRequest
(name string)
controller/token_auto_groups_test.go:56
↓ 4 callersFunctionbatchUpdate
()
model/utils.go:64
↓ 4 callersFunctionbearerHeaderAuth
()
web/src/features/channels/lib/advanced-custom.ts:225
↓ 4 callersFunctionbeginSecurityLoginPasskey
(t *testing.T, parentToken string)
controller/auth_flow_test.go:47
↓ 4 callersFunctionbenchmarkAlibaba
(b *testing.B)
relay/channel/task/jsplugin/performance_test.go:22
↓ 4 callersFunctionbody
(parts: string)
web/src/features/task-plugins/__tests__/request-plugin-samples.test.ts:71
↓ 4 callersFunctionbucketStart
(ts int64)
pkg/perf_metrics/metrics.go:425
↓ 4 callersFunctionbuildChannelAffinityCacheKeySuffix
(rule operation_setting.ChannelAffinityRule, modelName string, usingGroup string, affinityValue string)
service/channel_affinity.go:339
↓ 4 callersFunctionbuildClaudeUsageFromOpenAIUsage
(oaiUsage *dto.Usage)
relaykit/relayconvert/internal/oai_chat/to_claude_messages_resp.go:89
↓ 4 callersFunctionbuildDefaultDashboardFilters
( preferences: DashboardChartPreferences = getSavedChartPreferences() )
web/src/features/dashboard/lib/filters.ts:143
↓ 4 callersFunctionbuildMaskedTokenResponse
(token *model.Token)
controller/token.go:57
↓ 4 callersFunctionbuildResponsesWSErrorPayload
(eventID, streamID string, apiErr *types.NewAPIError, upstreamURLs ...string)
relay/responses_websocket.go:1045
↓ 4 callersFunctionbuildSettingJSON
(formData: ChannelFormValues)
web/src/features/channels/lib/channel-form.ts:701
↓ 4 callersFunctionbuildUsageFromGeminiMetadata
(metadata *dto.GeminiUsageMetadata, fallbackPromptTokens int)
relay/channel/gemini/relay-gemini.go:30
↓ 4 callersFunctioncacheApplyTokenQuotaDelta
(id int, key string, delta int64)
model/quota_reserve.go:99
↓ 4 callersFunctioncacheInitToken
cacheInitToken publishes database metadata when the hash is cold or fails verification. Existing quota counters survive repairs because pre-consume ca
model/token_cache.go:73
↓ 4 callersMethodcacheMAC
()
model/token_cache.go:12
↓ 4 callersFunctioncalcNextResetTime
(base time.Time, plan *SubscriptionPlan, endUnix int64)
model/subscription.go:356
↓ 4 callersMethodcallCompletionUsage
callCompletionUsage runs extractUsageOnComplete. A result that is not an object is reported as rejected facts, as applyCompletionUsageFacts reports in
relay/channel/task/jsplugin/adaptor.go:997
↓ 4 callersMethodcapture
capture starts keeping what the client gets for Report once an instance that may report the request is in scope: at the request's ingress, or at a cha
relay/requestplugin/report.go:108
↓ 4 callersFunctioncapturePointer
( event: ReactPointerEvent<HTMLElement>, capture: boolean )
web/src/components/floating-window.tsx:264
↓ 4 callersFunctionceilDiv
(a, b int)
tokenkit/image.go:288
↓ 4 callersMethodchannelType
channelType is the executing channel's type when polling or content fetches run with channel metadata; zero otherwise, which is a vendor upstream.
relay/channel/task/jsplugin/adaptor.go:1361
↓ 4 callersFunctionchatAnswer
(content string)
relay/requestplugin/requestplugin_test.go:1100
↓ 4 callersFunctionchatChunk
(content string, finish string)
relay/requestplugin/requestplugin_test.go:1106
↓ 4 callersFunctioncheckIsActive
( href: string, item: NavItem, mainNav = false )
web/src/components/layout/lib/url-utils.ts:57
↓ 4 callersFunctionchooseDB
(envName string, isLog bool)
model/main.go:140
↓ 4 callersFunctionclampPosition
( position: FloatingWindowPosition, width: number )
web/src/components/floating-window.tsx:133
↓ 4 callersFunctioncleanupAuthArtifacts
()
service/auth_cleanup.go:29
↓ 4 callersFunctionclearAuthenticatedClientState
( queryClient: QueryClient, synchronizeTabs = true )
web/src/lib/auth-session.ts:199
↓ 4 callersFunctionclearChannelInfo
(channel *model.Channel)
controller/channel.go:73
↓ 4 callersFunctionclientCacheKey
(proxyCacheKey string, policy HTTPTransportPolicy)
service/http_client.go:143
↓ 4 callersMethodclone
()
pkg/requestpatch/patch.go:459
↓ 4 callersFunctioncloneHostedOutput
(output *dto.ResponsesOutput)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:982
↓ 4 callersFunctioncloneOpenAIUsage
(usage *Usage)
relaykit/dto/billing_usage.go:386
↓ 4 callersFunctionclonePluginMap
(source map[string]*LoadedPlugin)
pkg/jsplugin/registry.go:510
↓ 4 callersFunctioncode
(key: string, version: string)
web/src/features/task-plugins/__tests__/marketplace-updates-dialog.test.tsx:48
↓ 4 callersFunctioncompileEntryFromCacheByHash
(exprStr, hash string)
pkg/billingexpr/compile.go:189
↓ 4 callersFunctioncompileFromCacheByHash
(exprStr, hash string)
pkg/billingexpr/compile.go:181
↓ 4 callersFunctioncompileProtocolPlugin
(t *testing.T, key, models, protocols, exports string)
pluginkit/protocol_supports_contract_test.go:205
↓ 4 callersFunctioncomposeTieredTextQuota
(relayInfo *relaycommon.RelayInfo, summary textQuotaSummary, tieredQuota int, tieredResult *billingexpr.Tiered
service/text_quota.go:201
↓ 4 callersFunctionconditionRange
( node: VisualCondition )
web/src/features/system-settings/models/visual-condition-tree.tsx:64
↓ 4 callersFunctionconfirmUserSessionActiveSnapshot
(session *UserSession)
model/user_session.go:380
↓ 4 callersFunctionconvertImage
(ctx)
plugins/tasks/alibaba/plugin.js:511
↓ 4 callersFunctioncountGeminiBillableFunctionCalls
(info *relaycommon.RelayInfo, response *dto.GeminiChatResponse)
relay/channel/gemini/relay-gemini.go:144
↓ 4 callersFunctioncreateAccessTokenTestSession
createAccessTokenTestSession returns a browser session identity and the dashboard JWT that carries it.
controller/access_token_audit_test.go:125
↓ 4 callersFunctioncreateAccessTokenTestUser
(t *testing.T, username string)
model/user_update_test.go:469
↓ 4 callersFunctioncreateDefaultTaskVisualConfig
( schema: BillingUsageSchema )
web/src/features/pricing/lib/task-expr.ts:104
↓ 4 callersFunctioncreateLoadingAssistantMessage
( startedAt: number = Date.now() )
web/src/features/playground/lib/message/message-utils.ts:92
↓ 4 callersFunctioncreateMiddlewareScopedToken
(t *testing.T, userID int, expiresAt int64, scopes ...string)
middleware/auth_test.go:419
↓ 4 callersFunctioncreateOAuthAuthorization
( provider: string, intent: 'login' | 'bind' | 'verify', operation?: VerificationOperation, signal?: A
web/src/features/auth/api.ts:173
↓ 4 callersFunctioncreateReserveTestToken
(t *testing.T, remainQuota int)
model/quota_reserve_test.go:30
↓ 4 callersFunctioncreateTaskError
(err error, code string, statusCode int, localError bool)
relay/common/relay_utils.go:110
↓ 4 callersFunctioncustomToolInputFromArguments
customToolInputFromArguments unwraps the raw custom tool input from the {"input": ...} arguments a Chat function call carries. Arguments of any other
relaykit/relayconvert/internal/oai_chat/to_oai_responses_resp.go:261
↓ 4 callersFunctiondecideTaskRetry
decideTaskRetry is the single retry decision for task submissions. The reason is recorded in the request policy decision events of the log details.
controller/relay.go:984
↓ 4 callersFunctiondeclaredPluginScope
( plugin: Pick<TaskPluginOption, 'scope'> | undefined )
web/src/features/task-plugins/lib/plugin-scope.ts:24
↓ 4 callersFunctiondecodeBillingExprB64
(exprB64: string | undefined)
web/src/features/usage-logs/lib/format.ts:268
↓ 4 callersFunctiondecodeDataWithFlexibleTimes
(data []byte, target *T)
pkg/ionet/jsonutil.go:39
↓ 4 callersFunctiondecodeImageConfig
decodeImageConfig 从字节数据解码图片配置
service/file_service.go:465
↓ 4 callersMethoddeleteExpiredEntries
deleteExpiredEntries walks only the oldest LRU entries and stops at the first active key.
common/rate-limit.go:107
↓ 4 callersFunctiondetectHEIF
detectHEIF checks ISOBMFF magic bytes to detect HEIC/HEIF files. Returns "image/heic", "image/heif", or "" if not recognized.
service/file_service.go:496
↓ 4 callersMethoddisconnect
()
web/src/test-setup.ts:93
↓ 4 callersFunctiondistributorEndpointPluginSource
(key string, channelType int)
middleware/distributor_test.go:255
↓ 4 callersFunctiondoAwsClientRequest
(c *gin.Context, info *relaycommon.RelayInfo, a *Adaptor, requestBody io.Reader)
relay/channel/aws/relay-aws.go:97
↓ 4 callersMethodendStream
endStream ends the outputs of a stream: the instances read the rest of the text, and every event waiting goes out.
relay/requestplugin/reply.go:1507
↓ 4 callersFunctionensureEmailAvailableWithTx
(tx *gorm.DB, email string, excludeUserID int)
model/user.go:656
↓ 4 callersFunctionensureMapKeyInContext
(context map[string]any, key string)
relay/common/override.go:1636
↓ 4 callersMethodevent
(event dto.PluginResponsesStreamEvent)
relay/plugin_protocol.go:996
← previousnext →1,801–1,900 of 15,592, ranked by callers