MCPcopy Create free account

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

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

↓ 12 callersFunctionRecordAuditLog
RecordAuditLog captures safe request metadata only; raw URLs, query strings, credentials and response/request bodies must never enter this table.
model/audit_log.go:74
↓ 12 callersMethodSetContentString
(s string)
relaykit/dto/openai_response.go:101
↓ 12 callersMethodSetDisabledFactoryKeys
(keys []string)
pkg/jsplugin/registry.go:892
↓ 12 callersMethodSetOtherInfo
(otherInfo map[string]any)
model/channel.go:338
↓ 12 callersFunctionSetToolPriceForTest
SetToolPriceForTest injects a tool price and rebuilds the lookup index. Tests only.
setting/operation_setting/tools.go:284
↓ 12 callersMethodUpdateWithStatus
UpdateWithStatus performs a conditional UPDATE guarded by fromStatus (CAS). Returns (true, nil) if this caller won the update, (false, nil) if another
model/task.go:590
↓ 12 callersFunctionUploadTaskPlugin
(c *gin.Context)
controller/task_plugin.go:106
↓ 12 callersFunctionadvancedCustomGinContext
(path string)
relay/channel/advancedcustom/adaptor_test.go:1137
↓ 12 callersFunctionattemptCall
(c *gin.Context, info *relaycommon.RelayInfo)
relay/requestplugin/relay.go:423
↓ 12 callersFunctioncallChannelAPI
callChannelAPI runs a channel handler as the root user signed in with a browser session.
controller/provider_plugin_test.go:92
↓ 12 callersFunctioncombineBillingExpr
( baseExpr: string, requestRuleExpr: string )
web/src/features/pricing/lib/billing-expr.ts:651
↓ 12 callersFunctiondecode
(t *testing.T, text string)
pkg/requestpatch/patch_test.go:15
↓ 12 callersFunctiondecodeAPIResponse
(t *testing.T, recorder *httptest.ResponseRecorder)
controller/token_test.go:216
↓ 12 callersMethodevent
(eventType string, payload dto.ResponsesStreamResponse)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:998
↓ 12 callersFunctiongenBaseRelayInfo
(c *gin.Context, request dto.Request)
relay/common/relay_info.go:605
↓ 12 callersFunctionhandler
()
web/src/features/models/hooks/use-model-deployment-settings.ts:174
↓ 12 callersFunctionhasPermission
( user: AuthUser | null | undefined, resource: string, action: string )
web/src/lib/admin-permissions.ts:78
↓ 12 callersFunctionmakeRelayInfo
(expr string, groupRatio float64, estPrompt, estCompletion int)
service/tiered_settle_test.go:48
↓ 12 callersFunctionnewAPIErrorFromParamOverride
(err error)
relay/param_override_error.go:8
↓ 12 callersFunctionnewAwsTestContext
(writer http.ResponseWriter, requestContext context.Context)
relay/channel/aws/relay_aws_test.go:85
↓ 12 callersFunctionnewImageTestContext
(t *testing.T, body, contentType string, isStream bool)
relay/channel/openai/image_stream_test.go:23
↓ 12 callersFunctionnewPluginGenerationBuilder
(staticRoutes []gin.RouteInfo, trustedProxies []string, handlers pluginRouteHandlers)
router/plugin-router.go:86
↓ 12 callersMethodrecord
record is the public record of the instances that masked, found or stopped something, or could not read the answer.
relay/requestplugin/reply.go:460
↓ 12 callersFunctionresultObject
(value any, subject string)
pkg/jsplugin/provider.go:1714
↓ 12 callersFunctionsafeNumberFieldProps
(field: ControllerRenderProps<TFieldValues, TName>)
web/src/features/system-settings/utils/numeric-field.ts:76
↓ 12 callersFunctionsecurityPasskeyResponse
securityPasskeyResponse acts as a software authenticator at the browser boundary. The handlers still validate the real WebAuthn challenge, origin and
controller/security_enrollment_test.go:577
↓ 12 callersFunctionsetupPasskeyDomainOptions
(t *testing.T)
controller/passkey_test.go:294
↓ 12 callersFunctionsyncNodeTopics
syncNodeTopics runs the reload of each registered topic whose newest sync task is newer than the one this node applied, and reports whether any ran. A
service/node_sync.go:157
↓ 12 callersFunctiontaskSubmissionTestContext
()
controller/relay_task_plugin_test.go:481
↓ 12 callersFunctiontaskUsageUnitLabel
( definition: { unit?: string; unitLabel?: LocalizedTextValue } | undefined, language: string, fallback:
web/src/features/pricing/lib/task-price-display.ts:59
↓ 12 callersFunctiontrimmed
(value)
plugins/tasks/alibaba/plugin.js:377
↓ 12 callersFunctionuseRateLimitMiniRedis
(t *testing.T)
middleware/rate_limit_test.go:23
↓ 12 callersFunctionuseTheme
()
web/src/context/theme-provider.tsx:138
↓ 12 callersFunctionwithHeaderNavModules
(t *testing.T, raw string)
middleware/header_nav_test.go:19
↓ 11 callersFunctionAccessTokenAudit
AccessTokenAudit also captures public reads and rejections before route-level authentication (for example, rate limiting). It does not grant authentic
middleware/audit.go:265
↓ 11 callersFunctionAdminAuth
()
middleware/auth.go:138
↓ 11 callersFunctionAsClientError
(err error)
relaykit/relayconvert/reasoning/intent.go:39
↓ 11 callersFunctionCompletePluginLoginCallback
CompletePluginLoginCallback handles the redirect back from the vendor, which the callback page of the plugin posts.
service/provider_plugin_login.go:255
↓ 11 callersFunctionContinuePluginLogin
ContinuePluginLogin submits the browser's input to the current step.
service/provider_plugin_login.go:201
↓ 11 callersFunctionDone
(c *gin.Context)
relay/helper/common.go:295
↓ 11 callersFunctionGetChannelBaseURL
(channelType int)
constant/channel.go:137
↓ 11 callersFunctionGetContextKeyInt
(c *gin.Context, key constant.ContextKey)
common/gin.go:247
↓ 11 callersFunctionGetContextKeyString
(c *gin.Context, key constant.ContextKey)
common/gin.go:186
↓ 11 callersFunctionGetDBTimestamp
GetDBTimestamp returns a UNIX timestamp from database time. Falls back to application time on error.
model/db_time.go:7
↓ 11 callersFunctionGetDiskCacheConfig
GetDiskCacheConfig 获取磁盘缓存配置
common/disk_cache_config.go:30
↓ 11 callersMethodGetFinalRequestRelayFormat
()
relay/common/relay_info.go:807
↓ 11 callersMethodGetRequestURL
(info *relaycommon.RelayInfo)
relay/channel/advancedcustom/adaptor.go:174
↓ 11 callersFunctionGetSystemTaskByTaskID
(taskID string)
model/system_task.go:131
↓ 11 callersFunctionGetTaskAdaptor
(platform constant.TaskPlatform)
relay/relay_adaptor.go:191
↓ 11 callersFunctionGetUUID
()
relaykit/relayconvert/kitutil/value.go:44
↓ 11 callersFunctionGetUserGroup
GetUserGroup gets group from Redis first, falls back to DB if needed
model/user.go:1275
↓ 11 callersFunctionGetUserQuota
GetUserQuota gets quota from Redis first, falls back to DB if needed
model/user.go:1252
↓ 11 callersMethodHasStrength
()
relaykit/relayconvert/reasoning/intent.go:86
↓ 11 callersFunctionIncreaseUserQuota
(id int, quota int, db bool)
model/user.go:1340
↓ 11 callersFunctionInitDB
()
model/main.go:186
↓ 11 callersMethodInsert
()
model/task.go:518
↓ 11 callersFunctionInvalidatePricingCache
()
model/pricing.go:98
↓ 11 callersMethodIsNormalEnd
()
relay/common/stream_status.go:209
↓ 11 callersMethodListArtifacts
(task *model.Task)
relay/channel/adapter.go:112
↓ 11 callersMethodLookupDeclaredRoute
LookupDeclaredRoute resolves a manifest path declaration, or its /{key} copy, to the first binding in ascending key order. It does not match an incomi
pkg/jsplugin/routing.go:558
↓ 11 callersFunctionNewOAuthErrorWithRaw
NewOAuthErrorWithRaw creates a new OAuth error with raw error message for logging
oauth/types.go:60
↓ 11 callersFunctionOaiResponsesHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/openai/relay_responses.go:21
↓ 11 callersFunctionParseEffort
(value string)
relaykit/relayconvert/reasoning/intent.go:124
↓ 11 callersMethodRead
(p []byte)
common/body_storage.go:222
↓ 11 callersFunctionRefreshPricing
RefreshPricing 强制立即重新计算与定价相关的缓存。 该方法用于需要最新数据的内部管理 API, 因此会绕过默认的 1 分钟延迟刷新。
model/pricing_refresh.go:6
↓ 11 callersMethodRender
(w http.ResponseWriter)
common/custom-event.go:75
↓ 11 callersFunctionReport
Report hands a finished relay request to the report hooks of its plan: once, after the client has the response and the request has settled, whether it
relay/requestplugin/report.go:228
↓ 11 callersMethodSaveToDB
SaveToDB 将配置保存到数据库
setting/config/config.go:71
↓ 11 callersMethodSetAdmin
(key string, value any)
model/log_other.go:94
↓ 11 callersFunctionSetDiskCacheConfig
SetDiskCacheConfig 设置磁盘缓存配置
common/disk_cache_config.go:37
↓ 11 callersFunctionSetMainDatabaseType
(databaseType DatabaseType)
common/database.go:25
↓ 11 callersMethodSnapshot
()
pkg/jsplugin/registry.go:1193
↓ 11 callersFunctionStringData
(c *gin.Context, str string)
relay/helper/common.go:256
↓ 11 callersMethodTotalErrorCount
()
relay/common/stream_status.go:200
↓ 11 callersMethodTransformHooks
TransformHooks returns the stage hooks the plugin exports, in TransformStages order, then ReplyHook and ReportHook when it exports them; nil when it h
pkg/jsplugin/transform.go:55
↓ 11 callersMethodType
()
service/system_task.go:35
↓ 11 callersFunctionUpdateChannelUsedQuota
(id int, quota int)
model/channel.go:1072
↓ 11 callersFunctionUsingLogDatabase
(databaseType DatabaseType)
common/database.go:42
↓ 11 callersMethodValue
Value returns the final ordinary JSON tree and verifies the incremental byte accounting against the configured codec before callers can persist it.
pkg/jsplugin/json_state.go:416
↓ 11 callersFunctionVerifySecurityInput
(identity AuthIdentity, input VerificationInput)
service/security_verification.go:573
↓ 11 callersFunctionbuildSSEBody
(n int)
relay/helper/stream_scanner_test.go:124
↓ 11 callersMethodclose
()
common/email_test.go:97
↓ 11 callersFunctioncreateSectionRegistry
(config: SectionRegistryConfig<TSectionId, TSettings, TExtraArgs>)
web/src/features/system-settings/utils/section-registry.ts:49
↓ 11 callersFunctioninsertPluginChannel
(t *testing.T, pluginKey, baseURL, key string, multiKey bool)
controller/provider_plugin_test.go:121
↓ 11 callersFunctionmodelManagementDB
(t *testing.T, kind, dsn string)
controller/model_management_test.go:33
↓ 11 callersFunctionnewFakeAuthServer
(t *testing.T)
service/provider_plugin_test.go:115
↓ 11 callersFunctionnewSecurityLoginPasskey
(t *testing.T, userID int)
controller/auth_flow_test.go:33
↓ 11 callersMethodnext
()
relay/requestplugin/pdf.go:570
↓ 11 callersFunctionnormalizeIntent
normalizeIntent canonicalizes one intent. Only unknown effort or mode values are errors; contradictions between mode, effort, and budget are resolved
relaykit/relayconvert/reasoning/intent.go:153
↓ 11 callersFunctionparseQuotaFromDollars
(amount: number)
web/src/lib/format.ts:100
↓ 11 callersFunctionregisterTestPlugin
(registry *Registry, version string, factory bool)
pkg/jsplugin/registry_test.go:559
↓ 11 callersFunctionrequirePaymentCompliance
(c *gin.Context)
controller/payment_compliance.go:20
↓ 11 callersFunctionresponseSemanticLoss
(path string, code string, message string)
relaykit/relayconvert/internal/toolconv/response.go:509
↓ 11 callersMethodrun
()
relay/requestplugin/pdf.go:912
↓ 11 callersMethodscan
scan examines a plugin-channel snapshot. Workers exist only while a hook is running; a busy key waits for the next scan.
service/provider_plugin_scheduled.go:70
↓ 11 callersFunctionsetupManageUserTestDB
(t *testing.T)
controller/user_manage_test.go:32
↓ 11 callersFunctionsideDrawerFooterClassName
(className?: string)
web/src/components/drawer-layout.ts:42
↓ 11 callersMethodsubmitContext
(c *gin.Context, info *relaycommon.RelayInfo)
relay/channel/task/jsplugin/adaptor.go:1814
↓ 11 callersFunctiontaskPriceLabel
( description: LocalizedTextValue | undefined, field: string, language: string )
web/src/features/pricing/lib/task-price-display.ts:39
↓ 11 callersFunctiontrimmed
(value)
plugins/tasks/kling/plugin.js:98
← previousnext →501–600 of 15,409, ranked by callers