MCPcopy Create free account

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

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

↓ 11 callersFunctionuseSidebar
()
web/src/components/ui/sidebar.tsx:67
↓ 11 callersMethodvalue
()
pkg/jsplugin/provider.go:265
↓ 11 callersFunctionwithSMTPSettings
(t *testing.T)
common/email_test.go:243
↓ 10 callersFunctionAccountMailLanguage
AccountMailLanguage is the language of mail about a user's account: the language the user saved, else the one the request stated.
service/account_security.go:36
↓ 10 callersMethodAddEvent
(event PolicyEvent)
service/request_policy.go:68
↓ 10 callersFunctionApplyParamOverrideWithRelayInfo
(jsonData []byte, info *RelayInfo)
relay/common/override.go:203
↓ 10 callersFunctionBuildTaskPluginView
BuildTaskPluginView converts a persisted task into the deliberately narrow public shape permitted at JavaScript plugin boundaries.
service/task_plugin_view.go:11
↓ 10 callersMethodCacheCreationTokensTotal
CacheCreationTokensTotal returns the cache-write token count regardless of which field the upstream reported it in. Claude-derived conversions populat
relaykit/dto/openai_response.go:338
↓ 10 callersMethodConvertGeminiRequest
(c *gin.Context, info *relaycommon.RelayInfo, request *dto.GeminiChatRequest)
relay/channel/adapter.go:34
↓ 10 callersMethodConvertOpenAIResponsesRequest
(c *gin.Context, info *relaycommon.RelayInfo, request dto.OpenAIResponsesRequest)
relay/channel/adapter.go:28
↓ 10 callersFunctionDefaultPluginProtocolLimits
()
relay/plugin_protocol.go:43
↓ 10 callersFunctionFlushWriter
(c *gin.Context)
relay/helper/common.go:155
↓ 10 callersFunctionGenerateTextOtherInfo
(ctx *gin.Context, relayInfo *relaycommon.RelayInfo, modelRatio, groupRatio, completionRatio float64, cacheTo
service/log_info_generate.go:103
↓ 10 callersMethodGetAutoBan
()
model/channel.go:358
↓ 10 callersFunctionGetBillingExpr
(model string)
setting/billing_setting/tiered_billing.go:70
↓ 10 callersMethodGetByChannelType
(channelType int)
pkg/jsplugin/registry.go:860
↓ 10 callersFunctionGetModelPricingSnapshot
(names []string)
model/model_pricing_config.go:242
↓ 10 callersMethodGetNextEnabledKey
()
model/channel.go:219
↓ 10 callersMethodGetOriginModelName
()
relaykit/relayconvert/convmeta/meta.go:21
↓ 10 callersMethodGetRequestURL
(info *relaycommon.RelayInfo)
relay/channel/adapter.go:21
↓ 10 callersFunctionGetTokenByKey
(key string, fromDB bool)
model/token.go:284
↓ 10 callersMethodHasExport
HasExport reports whether a module export was defined when the plugin loaded: an export that was undefined then counts as absent, and a later assignme
pkg/jsplugin/engine.go:283
↓ 10 callersMethodHasProviderPart
HasProviderPart reports whether the plugin declares relay routes.
pkg/jsplugin/registry.go:171
↓ 10 callersMethodHasTransformPart
HasTransformPart reports whether the plugin exports a stage hook.
pkg/jsplugin/transform.go:48
↓ 10 callersFunctionInitLogDB
()
model/main.go:235
↓ 10 callersMethodIsDisk
IsDisk 是否是磁盘存储
common/body_storage.go:26
↓ 10 callersMethodIsStringContent
()
relaykit/dto/claude.go:144
↓ 10 callersMethodLine
Line encodes the credential as one compact JSON line.
pkg/jsplugin/provider.go:90
↓ 10 callersFunctionLockOrder
LockOrder 尝试对给定订单号加锁
controller/topup.go:384
↓ 10 callersMethodMarshalJSONString
()
types/rw_map.go:94
↓ 10 callersFunctionNewOAuthError
NewOAuthError creates a new OAuth error with the given web console message
oauth/types.go:55
↓ 10 callersFunctionNewOpenAIChatBillingUsage
(usage *Usage)
relaykit/dto/billing_usage.go:58
↓ 10 callersFunctionNewOpenAIResponsesBillingUsage
(usage *Usage)
relaykit/dto/billing_usage.go:62
↓ 10 callersFunctionNewStreamStatus
()
relay/common/stream_status.go:73
↓ 10 callersFunctionOaiResponsesStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/openai/relay_responses.go:69
↓ 10 callersFunctionOpenaiImageStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/openai/relay_image.go:122
↓ 10 callersFunctionRebuildToolPriceIndex
RebuildToolPriceIndex rebuilds the lookup index from the current config. Called on init and after config updates. Not on the billing hot path.
setting/operation_setting/tools.go:211
↓ 10 callersFunctionRelayTaskSubmit
RelayTaskSubmit 完成 task 提交的全部流程(每次尝试调用一次): 刷新渠道元数据 → 确定 platform/adaptor → 验证请求 → 估算计费(EstimateBilling) → 计算价格 → 预扣费(重试时补足差额)→ 构建/发送/解析上游请求 → 提交后计费调整(
relay/relay_task.go:203
↓ 10 callersFunctionReloadPolicy
()
service/authz/enforcer.go:69
↓ 10 callersFunctionRequestId
()
middleware/request-id.go:10
↓ 10 callersMethodSetupRequestHeader
(c *gin.Context, req *http.Header, info *relaycommon.RelayInfo)
relay/channel/adapter.go:22
↓ 10 callersFunctionStorePluginLoginCredential
StorePluginLoginCredential writes the credential of a finished login: it replaces the line at keyIndex, or adds one (a new line in multi-key mode, oth
service/provider_plugin_login.go:621
↓ 10 callersFunctionUnlockOrder
UnlockOrder 释放给定订单号的锁
controller/topup.go:399
↓ 10 callersFunctionUpdateConfigFromMap
UpdateConfigFromMap 从map更新配置对象(导出函数)
setting/config/config.go:281
↓ 10 callersFunctionUpdateMaxTokenAutoGroups
(value string)
setting/auto_group.go:59
↓ 10 callersFunctionUpdateOption
(c *gin.Context)
controller/option.go:187
↓ 10 callersFunctionUpdateUserUsableGroupsByJSONString
(jsonStr string)
setting/user_usable_group.go:39
↓ 10 callersFunctionUserSubject
UserSubject is the casbin subject string for a single user.
service/authz/permission.go:20
↓ 10 callersMethodWriteHeader
(statusCode int)
router/plugin-router.go:543
↓ 10 callersFunctionaddNewRecord
(type_ int, id int, value int)
model/utils.go:43
↓ 10 callersFunctionauditSteps
(outcome Outcome)
relay/requestplugin/relay.go:472
↓ 10 callersFunctionconfigureEmailDelivery
(t *testing.T, options map[string]string)
controller/email_delivery_test.go:27
↓ 10 callersFunctionfetchChannelUpstreamModelIDs
(channel *model.Channel)
controller/channel_upstream_update.go:377
↓ 10 callersFunctionformatBillingCurrencyFromUSD
( amountUSD: number | null | undefined, options?: CurrencyFormatOptions )
web/src/lib/currency.ts:471
↓ 10 callersFunctiongetChannelAffinityCache
()
service/channel_affinity.go:83
↓ 10 callersFunctiongetCurrencyLabel
()
web/src/lib/currency.ts:546
↓ 10 callersFunctiongetTokenCacheKey
(key string)
model/token_cache.go:28
↓ 10 callersFunctioninsertPricingEndpointChannel
(t *testing.T, channelID int, channelType int, settings dto.ChannelOtherSettings)
model/pricing_endpoint_test.go:34
↓ 10 callersFunctioninsertUserForPaymentGuardTest
(t *testing.T, id int, quota int)
model/payment_method_guard_test.go:12
↓ 10 callersFunctionlocalizedPluginName
( plugin: { name: string; name_i18n?: LocalizedTextValue | null }, language: string )
web/src/features/task-plugins/lib/plugin-name.ts:25
↓ 10 callersFunctionmodelKey
(model)
plugins/tasks/alibaba/plugin.js:465
↓ 10 callersFunctionnewMantleTestInfo
()
relay/channel/aws/relay_aws_test.go:591
↓ 10 callersFunctionnewTaskSubmitContext
(t *testing.T, originalModel, mapping string)
relay/relay_task_test.go:220
↓ 10 callersFunctionperformHeaderNavRequest
(t *testing.T, handler gin.HandlerFunc, authenticated bool)
middleware/header_nav_test.go:41
↓ 10 callersFunctionpopulateUserCache
(user User)
model/user_cache.go:82
↓ 10 callersFunctionpricingOptions
( values: Record<string, string | boolean> )
web/src/features/model-pricing/pricing.ts:147
↓ 10 callersFunctionrawJSONPresent
(raw json.RawMessage)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_req.go:707
↓ 10 callersFunctionrecordManageAuditFor
recordManageAuditFor 记录一条管理审计日志,日志归属于操作者;targetUserId 只表示被操作用户,用于在结构化参数中保留目标上下文。
controller/audit.go:150
↓ 10 callersFunctionrequireBrowserSession
(c *gin.Context)
controller/auth_session.go:151
↓ 10 callersFunctionretrieveTaskPluginResponse
(c *gin.Context, deps pluginProtocolBridgeDeps)
controller/plugin_protocol.go:950
↓ 10 callersFunctionseedTaskPollingChannel
(t *testing.T, id int, disableSleep bool)
service/task_polling_test.go:192
↓ 10 callersFunctionsettleTaskBillingOnComplete
settleTaskBillingOnComplete 任务完成时的统一计费调整。 返回 true 表示用量结算路径已接管最终计费;失败任务仅在返回 false 时补做全额退款。 优先级:1. tiered snapshot → 2. adaptor 调整 → 3. token 重算。 表达式求值
service/task_polling.go:774
↓ 10 callersFunctionsetupAccessTokenAudit
(t *testing.T)
controller/access_token_audit_test.go:34
↓ 10 callersFunctionsetupTaskSubmissionDatabase
setupTaskSubmissionDatabase opens the dialect selected by TEST_TASK_DB_DIALECT (SQLite in memory by default) and records every task INSERT in events s
controller/relay_task_plugin_test.go:465
↓ 10 callersFunctiontaskSubmissionRelayInfo
(billing relaycommon.BillingSettler)
controller/relay_task_plugin_test.go:488
↓ 10 callersFunctiontranslateServerText
( t: (key: string, options?: Record<string, unknown>) => string, text: string )
web/src/lib/server-error-message.ts:179
↓ 10 callersFunctionupdateOptionMap
(key string, value string)
model/option.go:386
↓ 10 callersFunctionuseSearch
()
web/src/context/search-provider.tsx:54
↓ 10 callersFunctionuseSecureVerification
()
web/src/features/auth/secure-verification/hooks/use-secure-verification.ts:141
↓ 10 callersFunctionuseThemeCustomization
()
web/src/context/theme-customization-provider.tsx:243
↓ 10 callersFunctionuseUsageLogsContext
()
web/src/features/usage-logs/components/usage-logs-provider.tsx:88
↓ 10 callersFunctionvisitAuthorize
visitAuthorize follows the step's URL like the browser does and returns the query the vendor redirects back with.
service/provider_plugin_login_test.go:30
↓ 9 callersMethodCallTransform
CallTransform runs one stage hook, tctx.Stage, and validates the result shape. tctx.Config, req.Body and req.Headers are passed to JavaScript without
pkg/jsplugin/transform.go:213
↓ 9 callersMethodCloseIdleConnections
()
service/http_transport_sharded.go:91
↓ 9 callersMethodDeleteMany
DeleteMany accepts either fully namespaced keys or raw keys and deletes them. It returns a map keyed by fully namespaced keys.
pkg/cachex/hybrid_cache.go:231
↓ 9 callersFunctionEffectiveEffort
(intent Intent)
relaykit/relayconvert/reasoning/intent.go:654
↓ 9 callersMethodEnsureClaudeConvertInfo
EnsureClaudeConvertInfo lazily creates and returns the mutable OpenAI→Claude stream conversion state. For non-nil receivers, the same instance must be
relaykit/relayconvert/convmeta/meta.go:43
↓ 9 callersFunctionEnsureLegacyAccessTokenRetireAt
EnsureLegacyAccessTokenRetireAt records the legacy token deadline on first start (now + 30 days) and loads the stored value. The first node to start w
model/user_access_token.go:305
↓ 9 callersFunctionGenerateHMACWithKey
(key []byte, data string)
common/crypto.go:12
↓ 9 callersFunctionGetByTaskId
(userId int, taskId string)
model/task.go:471
↓ 9 callersFunctionGetContextKeyType
(c *gin.Context, key constant.ContextKey)
common/gin.go:267
↓ 9 callersFunctionGetJsonString
(data any)
common/str.go:100
↓ 9 callersMethodGetMaxTokens
()
relaykit/dto/openai_request.go:467
↓ 9 callersFunctionGetModelRatioCopy
()
setting/ratio_setting/model_ratio.go:684
↓ 9 callersMethodGetScopes
GetScopes returns the stored scope list; a malformed value grants nothing.
model/user_access_token.go:59
↓ 9 callersFunctionGetTaskPluginDisabledFactoryKeys
()
setting/task_plugin.go:101
↓ 9 callersFunctionGetVerificationRequirements
(identity AuthIdentity, scope string)
service/security_verification.go:367
↓ 9 callersFunctionInitSessionCookieSettings
()
common/session_cookie.go:44
↓ 9 callersFunctionIsPaymentComplianceConfirmed
()
setting/operation_setting/payment_setting.go:55
↓ 9 callersFunctionIssueAccessToken
(identity AuthIdentity)
service/auth_token.go:60
← previousnext →601–700 of 15,409, ranked by callers