MCPcopy Create free account

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

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

↓ 12 callersMethodFetchTask
── Polling ──────────────────────────────────────────────────────
relay/channel/adapter.go:86
↓ 12 callersFunctionGetAuthHeader
GetAuthHeader get auth header
controller/channel-billing.go:141
↓ 12 callersFunctionGetChannelBaseURL
(channelType int)
constant/channel.go:137
↓ 12 callersFunctionGetMaxTokenAutoGroups
()
setting/auto_group.go:47
↓ 12 callersMethodGetModels
()
model/channel.go:309
↓ 12 callersMethodGetReasoningContent
()
relaykit/dto/openai_request.go:662
↓ 12 callersMethodGetRequestURL
(info *relaycommon.RelayInfo)
relay/channel/advancedcustom/adaptor.go:184
↓ 12 callersFunctionGetResponseBody
(method, url string, channel *model.Channel, headers http.Header)
controller/channel-billing.go:155
↓ 12 callersMethodHasErrors
()
relay/common/stream_status.go:191
↓ 12 callersMethodInsert
()
model/task.go:519
↓ 12 callersMethodIsEmpty
()
relaykit/relayconvert/reasoning/intent.go:90
↓ 12 callersFunctionNewGeminiChatBillingUsage
(metadata *GeminiUsageMetadata)
relaykit/dto/billing_usage.go:120
↓ 12 callersFunctionNewStreamScanner
NewStreamScanner shares relay scanner configuration. Callers buffering bounded task state may additionally cap a line without increasing the configure
relay/helper/stream_scanner.go:48
↓ 12 callersFunctionObjectData
(c *gin.Context, object any)
relay/helper/common.go:284
↓ 12 callersFunctionOptionsOf
OptionsOf returns m's conversion options, or empty defaults when m is nil.
relaykit/relayconvert/convmeta/meta.go:315
↓ 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:173
↓ 12 callersFunctionSetMainDatabaseType
(databaseType DatabaseType)
common/database.go:25
↓ 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:591
↓ 12 callersFunctionUploadTaskPlugin
(c *gin.Context)
controller/task_plugin.go:107
↓ 12 callersFunctionUserUsableGroups2JSONString
()
setting/user_usable_group.go:28
↓ 12 callersFunctionValidateV1Meta
ValidateV1Meta applies the metadata constraints published in v1.schema.json to administrator uploads.
pluginkit/meta.go:1146
↓ 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 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 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:464
↓ 12 callersFunctionresultObject
(value any, subject string)
pluginkit/provider.go:1698
↓ 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 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 callersFunctionGetContextKeyInt
(c *gin.Context, key constant.ContextKey)
common/gin.go:247
↓ 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 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:1291
↓ 11 callersFunctionGetUserQuota
GetUserQuota gets quota from Redis first, falls back to DB if needed
model/user.go:1268
↓ 11 callersMethodHasStrength
()
relaykit/relayconvert/reasoning/intent.go:86
↓ 11 callersFunctionIncreaseUserQuota
(id int, quota int, db bool)
model/user.go:1356
↓ 11 callersFunctionInitDB
()
model/main.go:186
↓ 11 callersFunctionInitLogDB
()
model/main.go:235
↓ 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:192
↓ 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 callersMethodSnapshot
()
pkg/jsplugin/registry.go:472
↓ 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
pluginkit/transform.go:117
↓ 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.
pluginkit/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 callersFunctionconfigureEmailDelivery
(t *testing.T, options map[string]string)
controller/email_delivery_test.go:31
↓ 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 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 callersFunctionproxyTaskMedia
(c *gin.Context, task *model.Task, descriptor *relaychannel.TaskContentRequest)
controller/video_proxy.go:135
← previousnext →501–600 of 15,592, ranked by callers