MCPcopy Create free account

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

Functions11,560 in github.com/QuantumNous/new-api

↓ 8 callersFunctionjsonValue
(value any)
relay/channel/task/jsplugin/adaptor.go:1553
↓ 8 callersMethodmemCache
()
pkg/cachex/hybrid_cache.go:69
↓ 8 callersFunctionmetricValue
(metrics: FlowMetrics, metric: FlowMetric)
web/src/features/dashboard/lib/flow.ts:164
↓ 8 callersFunctionnewAuthzTestDB
(t *testing.T)
service/authz/authz_test.go:14
↓ 8 callersFunctionnewConvertRequestFailedError
(c *gin.Context, info *relaycommon.RelayInfo, err error)
relay/convert_request_error.go:13
↓ 8 callersFunctionnewImageTestContext
(t *testing.T, body, contentType string, isStream bool)
relay/channel/openai/image_stream_test.go:19
↓ 8 callersFunctionnewOuterPluginTestEngine
()
router/plugin_router_test.go:812
↓ 8 callersFunctionnewPluginProtocolObservationLimiter
(limits pluginProtocolObservationLimits)
controller/plugin_protocol_limiter.go:56
↓ 8 callersFunctionnewPluginProtocolRetrieveContext
(responseID string)
controller/plugin_protocol_test.go:1553
↓ 8 callersFunctionnormalizeHeaderContextKey
(key string)
relay/common/override.go:1629
↓ 8 callersFunctionpluginProtocolRetrieveDeps
(pinned pluginruntime.PinnedEndpoint, task *model.Task, exists bool, err error)
controller/plugin_protocol_test.go:1563
↓ 8 callersFunctionpresentationLoss
(path string, code string, message string)
relaykit/relayconvert/internal/toolconv/encode.go:1302
↓ 8 callersFunctionrawJSONPresent
(value json.RawMessage)
relaykit/relayconvert/internal/toolconv/response_artifacts.go:805
↓ 8 callersMethodredisOn
()
pkg/cachex/hybrid_cache.go:59
↓ 8 callersFunctionrequireDeploymentID
(c *gin.Context)
controller/deployment.go:120
↓ 8 callersFunctionresetBatchUpdateTestState
(t *testing.T)
model/quota_reserve_test.go:58
↓ 8 callersFunctionresetSessionCookieSettingsAfterTest
(t *testing.T)
common/url_validator_test.go:125
↓ 8 callersFunctionresponseStreamEventItemID
(event *dto.ResponsesStreamResponse)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_resp.go:363
↓ 8 callersFunctionsetupTaskSubmissionDatabase
(t *testing.T, migrate bool, events *[]string)
controller/relay_task_plugin_test.go:354
↓ 8 callersFunctionstaticProtection
(protection *common.SSRFProtection)
service/protected_fetch_client_test.go:26
↓ 8 callersMethodsubmitContext
(c *gin.Context, info *relaycommon.RelayInfo)
relay/channel/task/jsplugin/adaptor.go:1190
↓ 8 callersFunctiontaskPluginControllerTestSource
(key, version string)
controller/task_plugin_test.go:43
↓ 8 callersFunctiontieredQuota
--------------------------------------------------------------------------- BuildTieredTokenParams: token normalization and ratio parity tests -------
service/tiered_settle_test.go:664
↓ 8 callersFunctiontrimmed
(value)
plugins/tasks/alibaba/plugin.js:42
↓ 8 callersFunctionuseContextValue
()
web/src/components/ai-elements/context.tsx:52
↓ 8 callersFunctionuseRateLimitMiniRedis
(t *testing.T)
middleware/rate_limit_test.go:20
↓ 8 callersFunctionuseSubscriptions
()
web/src/features/subscriptions/components/subscriptions-provider.tsx:82
↓ 8 callersFunctionuseSystemConfig
(options: UseSystemConfigOptions = {})
web/src/hooks/use-system-config.ts:144
↓ 8 callersFunctionuseUsageLogsContext
()
web/src/features/usage-logs/components/usage-logs-provider.tsx:88
↓ 7 callersMethodCanonicalUsage
CanonicalUsage decodes the original provider usage carried across relay hops into the shared accounting shape. The BillingUsage snapshot remains the s
relaykit/dto/billing_usage.go:242
↓ 7 callersFunctionConfigureTrustedProxies
(engine *gin.Engine)
middleware/trusted_proxies.go:11
↓ 7 callersMethodConvertGeminiRequest
(c *gin.Context, info *relaycommon.RelayInfo, request *dto.GeminiChatRequest)
relay/channel/adapter.go:33
↓ 7 callersFunctionConvertStreamResponseChunk
(c *gin.Context, info *relaycommon.RelayInfo, state *relayconvert.ResponseStreamState, response any)
service/response_converter.go:26
↓ 7 callersMethodFinalResponse
FinalResponse validates a plugin-authored complete Responses object and overwrites every host-owned identity and lifecycle field. Unknown protocol fie
relay/plugin_protocol.go:562
↓ 7 callersFunctionFormatClaudeResponseInfo
(claudeResponse *dto.ClaudeResponse, oaiResponse *dto.ChatCompletionsStreamResponse, claudeInfo *ClaudeRespons
relay/channel/claude/relay-claude.go:83
↓ 7 callersMethodGetAutoBan
()
model/channel.go:343
↓ 7 callersFunctionGetByTaskId
(userId int, taskId string)
model/task.go:421
↓ 7 callersFunctionGetClaudeSettings
GetClaudeSettings 获取Claude配置
setting/model_setting/claude.go:45
↓ 7 callersFunctionGetContextKeyString
(c *gin.Context, key constant.ContextKey)
common/gin.go:165
↓ 7 callersFunctionGetEnvOrDefaultString
(env string, defaultValue string)
common/env.go:21
↓ 7 callersFunctionGetGroupRatioCopy
()
setting/ratio_setting/group_ratio.go:62
↓ 7 callersMethodGetImageMedia
()
relaykit/dto/openai_request.go:336
↓ 7 callersFunctionGetModelPrice
GetModelPrice 返回模型的价格,如果模型不存在则返回-1,false
setting/ratio_setting/model_ratio.go:359
↓ 7 callersFunctionGetModelRatio
(name string)
setting/ratio_setting/model_ratio.go:384
↓ 7 callersFunctionGetMonitorSetting
()
setting/operation_setting/monitor_setting.go:41
↓ 7 callersFunctionGetPasskeyByUserID
(userID int)
model/passkey.go:123
↓ 7 callersFunctionGetPaymentSetting
()
setting/operation_setting/payment_setting.go:29
↓ 7 callersMethodGetResultURL
GetResultURL 获取任务结果 URL(视频地址等) 新数据存在 PrivateData.ResultURL 中;旧数据回退到 FailReason(历史兼容)
model/task.go:180
↓ 7 callersFunctionGetSSRFProtectedHTTPClient
GetSSRFProtectedHTTPClient 返回带拨号时 SSRF 校验的客户端。 ssrfProtectedHTTPClient 由 InitHttpClient 在启动时初始化,运行期只读。
service/http_client.go:159
↓ 7 callersFunctionGetTaskPluginDisabledFactoryKeys
()
setting/task_plugin.go:75
↓ 7 callersMethodGetUpstreamModelName
()
relaykit/relayconvert/convmeta/meta.go:20
↓ 7 callersFunctionGetUserSessionCached
GetUserSessionCached validates cached state first and falls back to the database on a miss or Redis read failure. A deny tombstone never falls back.
model/user_session.go:211
↓ 7 callersFunctionHasGeminiUsageMetadataTokens
(metadata *GeminiUsageMetadata)
relaykit/dto/billing_usage.go:429
↓ 7 callersFunctionHeaderNavModuleAuth
(module string)
middleware/header_nav.go:104
↓ 7 callersFunctionInvalidatePricingCache
()
model/pricing.go:84
↓ 7 callersFunctionIssueSecurityProof
(identity AuthIdentity, method string, scopes []string)
service/auth_token.go:132
↓ 7 callersFunctionLoadFromJsonStringWithCallback
(m *RWMap[K, V], jsonStr string, onSuccess func())
types/rw_map.go:83
↓ 7 callersFunctionParseHTTPStatusCodeRanges
(input string)
setting/operation_setting/status_code_ranges.go:117
↓ 7 callersFunctionPostConsumeUserSubscriptionDelta
Update subscription used amount by delta (positive consume more, negative refund).
model/subscription.go:1510
↓ 7 callersMethodRead
(p []byte)
relay/channel/openai/image_stream_test.go:152
↓ 7 callersFunctionRechargeEpay
RechargeEpay 原子完成易支付订单:订单行锁、状态校验、成功更新与用户额度增加 在同一个事务内完成,因此同一订单的并发/重复回调(包括多实例部署下)最多充值一次。 alreadyDone=true 表示订单此前已完成,本次为幂等重复回调。 进程内的 LockOrder 只是优化,正确性由本
model/topup.go:177
↓ 7 callersFunctionRoutingMatchModelName
RoutingMatchModelName returns the name used for channel-ability and token-limit fallback matching: strip @ modifiers and legacy aliases first, then ap
setting/ratio_setting/model_ratio.go:700
↓ 7 callersMethodSetUsage
(usage *dto.Usage)
relaykit/relayconvert/response_registry.go:424
↓ 7 callersMethodSetWithTTL
(key string, v V, ttl time.Duration)
pkg/cachex/hybrid_cache.go:111
↓ 7 callersFunctionSetupContextForSelectedChannel
(c *gin.Context, channel *model.Channel, modelName string)
middleware/distributor.go:606
↓ 7 callersMethodSnapshot
Snapshot returns a detached top-level view for tests and read-only inspection. Mutating it cannot add or replace fields in LogOther.
model/log_other.go:176
↓ 7 callersFunctionStrToMap
(str string)
common/str.go:47
↓ 7 callersFunctionUpdateChannelStatus
(channelId int, usingKey string, status int, reason string)
model/channel.go:736
↓ 7 callersFunctionUpdateOption
(key string, value string)
model/option.go:231
↓ 7 callersFunctionUpdateUserUsedQuotaAndRequestCount
(id int, quota int)
model/user.go:1369
↓ 7 callersFunctionUserAuth
()
middleware/auth.go:94
↓ 7 callersFunctionUserUsableGroups2JSONString
()
setting/user_usable_group.go:27
↓ 7 callersFunctionUsingLogDatabase
(databaseType DatabaseType)
common/database.go:40
↓ 7 callersFunctionValidateLoginSession
(identity AuthIdentity)
service/auth_session.go:121
↓ 7 callersFunctionabortWithOpenAiMessage
(c *gin.Context, statusCode int, message string, code ...types.ErrorCode)
middleware/utils.go:14
↓ 7 callersFunctionattachQuotaSaturation
attachQuotaSaturation records the request's quota clamp (if any) onto the consume log's other.admin_info and emits a request-correlated backend audit
service/log_info_generate.go:36
↓ 7 callersFunctionauthSigningKey
(purpose string)
service/auth_token.go:54
↓ 7 callersFunctioncallHailuoHook
(t *testing.T, plugin *jsplugin.LoadedPlugin, hook string, args ...any)
plugins/hailuo_responses_test.go:83
↓ 7 callersFunctioncreateUserSessionTestUser
(t *testing.T, userID int, authVersion int64)
model/user_session_test.go:66
↓ 7 callersFunctioncreditTopUpQuota
creditTopUpQuota atomically enforces the wallet ceiling while adding quota. Keeping the predicate and increment in one UPDATE prevents two concurrent
model/topup.go:88
↓ 7 callersFunctioncurrentEnforcer
()
service/authz/enforcer.go:63
↓ 7 callersFunctionfilterDisabledFactory
(factory map[string]*LoadedPlugin, disabled map[string]struct{})
pkg/jsplugin/registry.go:881
↓ 7 callersFunctiongeminiStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response, callback func(data string, geminiResponse *
relay/channel/gemini/relay-gemini.go:167
↓ 7 callersFunctiongenerateTaskExprFromConfig
( config: TaskVisualConfig | null | undefined, schema: BillingUsageSchema )
web/src/features/pricing/lib/task-expr.ts:418
↓ 7 callersFunctiongetCurrencyLabel
()
web/src/lib/currency.ts:546
↓ 7 callersFunctiongetSubscriptionPlanByIdTx
(tx *gorm.DB, id int)
model/subscription.go:389
↓ 7 callersFunctiongetUserQuotaForPaymentGuardTest
(t *testing.T, userID int)
model/payment_method_guard_test.go:84
↓ 7 callersMethodhasHook
(ctx context.Context, hook string)
relay/channel/task/jsplugin/adaptor.go:1541
↓ 7 callersFunctionhasPermission
( user: AuthUser | null | undefined, resource: string, action: string )
web/src/lib/admin-permissions.ts:77
↓ 7 callersFunctionisDynamicPricingModel
(model: PricingModel)
web/src/features/pricing/lib/dynamic-price.ts:130
↓ 7 callersFunctionmanageMultiKeys
( params: MultiKeyManageParams )
web/src/features/channels/api.ts:373
↓ 7 callersFunctionnumberValue
(value: unknown)
web/src/features/dashboard/lib/flow.ts:145
↓ 7 callersFunctionpluginProtocolTestSSEEventTypes
(body string)
controller/plugin_protocol_test.go:1517
↓ 7 callersMethodprepareGeneration
( factory, override map[string]*LoadedPlugin, enabled, tolerateConflicts bool, retainCurrent map[string]str
pkg/jsplugin/registry.go:660
↓ 7 callersMethodpublishGeneration
( generation *RoutingGeneration, routingErrors map[string]string, activeOverride map[string]*LoadedPlugin,
pkg/jsplugin/registry.go:712
↓ 7 callersFunctionrateLimitFactory
(maxRequestNum int, duration int64, mark string)
middleware/rate-limit.go:147
↓ 7 callersMethodrecordRebuildFailure
(err error)
pkg/jsplugin/registry.go:766
↓ 7 callersFunctionredisIPRateLimitKey
(mark string, clientIP string)
middleware/rate-limit.go:44
↓ 7 callersMethodresolveActiveOverrides
( generation *RoutingGeneration, override map[string]*LoadedPlugin, enabled bool, )
pkg/jsplugin/registry.go:921
↓ 7 callersMethodresolveForConversion
(c *gin.Context, info *relaycommon.RelayInfo)
relay/channel/advancedcustom/adaptor.go:359
← previousnext →501–600 of 11,560, ranked by callers