MCPcopy Create free account

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

Functions12,054 in github.com/QuantumNous/new-api

↓ 8 callersMethodApplyTick
ApplyTick maps bounded plugin semantics onto host-owned Responses events. taskStatus is the current durable DB status (for example, IN_PROGRESS, SUCCE
relay/plugin_protocol.go:444
↓ 8 callersFunctionBuildTaskPluginView
BuildTaskPluginView converts a persisted task into the deliberately narrow public shape permitted at JavaScript plugin boundaries.
service/task_plugin_view.go:11
↓ 8 callersMethodClose
()
relay/channel/openai/image_stream_test.go:165
↓ 8 callersMethodConvertClaudeRequest
(c *gin.Context, info *relaycommon.RelayInfo, request *dto.ClaudeRequest)
relay/channel/adapter.go:32
↓ 8 callersMethodCreatedEvent
()
relay/plugin_protocol.go:430
↓ 8 callersMethodDecode
(r io.Reader, v any)
relaykit/relayconvert/kitutil/json.go:20
↓ 8 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
↓ 8 callersMethodExport
Export returns one module export without exposing Sobek values outside the engine boundary. It is used for declarative exports such as meta.
pkg/jsplugin/engine.go:187
↓ 8 callersFunctionGetModelRatio
(name string)
setting/ratio_setting/model_ratio.go:385
↓ 8 callersFunctionGetOIDCSettings
()
setting/system_setting/oidc.go:28
↓ 8 callersFunctionGetTopUpByTradeNo
(tradeNo string)
model/topup.go:135
↓ 8 callersMethodGetUsageMetadata
()
relaykit/dto/gemini.go:522
↓ 8 callersFunctionHashAccountPassword
HashAccountPassword is for account passwords, not MFA backup codes. The temporary bcrypt mode permits rolling out dual-format readers to all nodes bef
common/account_password.go:44
↓ 8 callersFunctionIssueAccessToken
(identity AuthIdentity)
service/auth_token.go:60
↓ 8 callersFunctionOaiResponsesHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/openai/relay_responses.go:21
↓ 8 callersFunctionOpenaiImageStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/openai/relay_image.go:93
↓ 8 callersFunctionParseEffort
(value string)
relaykit/relayconvert/reasoning/intent.go:123
↓ 8 callersFunctionPrepareMidjourneyTaskBilling
PrepareMidjourneyTaskBilling sets the durable refund marker before the task is inserted.
service/midjourney.go:35
↓ 8 callersFunctionRecordConsumeLog
(c *gin.Context, userId int, params RecordConsumeLogParams)
model/log.go:339
↓ 8 callersFunctionReloadPolicy
()
service/authz/enforcer.go:69
↓ 8 callersFunctionRequireVerificationMethod
(identity AuthIdentity, scope, method string)
service/security_verification.go:313
↓ 8 callersMethodReset
Reset clears pending observations (used when a terminal response fails).
relay/common/tool_usage.go:129
↓ 8 callersFunctionResetProxyClientCache
ResetProxyClientCache clears cached proxy and non-default direct policy clients and closes idle connections on every transport/shard. The package-leve
service/http_client.go:453
↓ 8 callersMethodSaveToDB
SaveToDB 将配置保存到数据库
setting/config/config.go:71
↓ 8 callersFunctionUpdateUserUsableGroupsByJSONString
(jsonStr string)
setting/user_usable_group.go:37
↓ 8 callersMethodUsage
()
relaykit/relayconvert/response_registry.go:405
↓ 8 callersMethodValid
(data []byte)
relaykit/relayconvert/kitutil/json.go:21
↓ 8 callersFunctionValidateAccessToken
(token string)
model/user.go:1236
↓ 8 callersFunctionValidateFlowAuthorization
ValidateFlowAuthorization permits a dedicated configuration flow to outlive its consumed proof, while retaining its operation, session and method poli
service/security_verification.go:386
↓ 8 callersFunctionValidateSSRFProtectedFetchURL
(urlStr string)
service/http_client.go:71
↓ 8 callersMethodauthorization
(t *testing.T, intent string, identity service.AuthIdentity, scope string, claims jwt.MapClaims)
controller/telegram_test.go:154
↓ 8 callersFunctioncanManageTargetRole
(myRole int, targetRole int)
controller/user.go:380
↓ 8 callersFunctioncloneRaw
(raw []byte)
relaykit/relayconvert/internal/toolconv/decode.go:799
↓ 8 callersFunctioncompilePluginProtocolRetrieveEndpoint
(t *testing.T, key, source string, options pluginruntime.Options)
controller/plugin_protocol_test.go:1537
↓ 8 callersFunctionconvertCompatRequest
(c context.Context, info convmeta.Meta, target types.RelayFormat, request any)
relaykit/relayconvert/request_compat.go:63
↓ 8 callersFunctiondefaultHTTPTransportPolicy
()
service/http_transport_policy.go:22
↓ 8 callersFunctioneffectiveBillingUsage
(usage *dto.Usage)
service/billing_usage.go:19
↓ 8 callersFunctionformatQuotaWithCurrency
( quota: number | null | undefined, options?: CurrencyFormatOptions )
web/src/lib/currency.ts:516
↓ 8 callersFunctiongetCurrencyLabel
()
web/src/lib/currency.ts:546
↓ 8 callersFunctiongetTaskEnumFields
( schema: BillingUsageSchema | null | undefined )
web/src/features/pricing/lib/task-expr.ts:78
↓ 8 callersFunctiongetTokenUsedQuota
(t *testing.T, id int)
service/task_billing_test.go:482
↓ 8 callersFunctiongetUserAuthVersionKey
(userId int)
model/user_auth_cache.go:30
↓ 8 callersFunctionhasParsedChildren
( node: ParsedNode )
web/src/components/ai-elements/response-node-guards.ts:36
↓ 8 callersFunctioninsertOriginTaskChannel
(t *testing.T, status int)
middleware/task_plugin_origin_task_test.go:43
↓ 8 callersFunctioninsertPricingEndpointChannel
(t *testing.T, channelID int, channelType int, settings dto.ChannelOtherSettings)
model/pricing_endpoint_test.go:34
↓ 8 callersFunctionintPtr
(v int)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_resp.go:263
↓ 8 callersFunctionisDynamicPricingModel
(model: PricingModel)
web/src/features/pricing/lib/dynamic-price.ts:131
↓ 8 callersFunctionisTagAggregateRow
(row: Channel | TagRow)
web/src/features/channels/lib/channel-utils.ts:617
↓ 8 callersFunctionjsonValue
(value any)
relay/channel/task/jsplugin/adaptor.go:1551
↓ 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:815
↓ 8 callersFunctionnewPluginProtocolObservationLimiter
(limits pluginProtocolObservationLimits)
controller/plugin_protocol_limiter.go:56
↓ 8 callersFunctionnewPluginProtocolRetrieveContext
(responseID string)
controller/plugin_protocol_test.go:1553
↓ 8 callersFunctionnewSecurityLoginPasskey
(t *testing.T, userID int)
controller/auth_flow_test.go:33
↓ 8 callersFunctionnormalizeHeaderContextKey
(key string)
relay/common/override.go:1626
↓ 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 callersFunctiontelegramIdentityClaims
(id any)
controller/telegram_test.go:186
↓ 8 callersFunctiontelegramOAuthCallback
(state, code string, identity service.AuthIdentity)
controller/telegram_test.go:194
↓ 8 callersFunctiontieredQuota
--------------------------------------------------------------------------- BuildTieredTokenParams: token normalization and ratio parity tests -------
service/tiered_settle_test.go:664
↓ 8 callersFunctiontoIntlLocale
(value?: string | null)
web/src/i18n/languages.ts:86
↓ 8 callersFunctiontrimmed
(value)
plugins/tasks/alibaba/plugin.js:47
↓ 8 callersFunctionuseContextValue
()
web/src/components/ai-elements/context.tsx:52
↓ 8 callersFunctionuseRateLimitMiniRedis
(t *testing.T)
middleware/rate_limit_test.go:20
↓ 8 callersFunctionuseRedemptions
()
web/src/features/redemption-codes/components/redemptions-provider.tsx:66
↓ 8 callersFunctionuseSecureVerification
()
web/src/features/auth/secure-verification/hooks/use-secure-verification.ts:140
↓ 8 callersFunctionuseSubscriptions
()
web/src/features/subscriptions/components/subscriptions-provider.tsx:82
↓ 8 callersFunctionuseSystemConfig
(options: UseSystemConfigOptions = {})
web/src/hooks/use-system-config.ts:144
↓ 8 callersFunctionuseTableUrlState
( params: UseTableUrlStateParams )
web/src/hooks/use-table-url-state.ts:107
↓ 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:236
↓ 7 callersFunctionConfigureTrustedProxies
(engine *gin.Engine)
middleware/trusted_proxies.go:11
↓ 7 callersFunctionConsumeAuthFlowWithAction
ConsumeAuthFlowWithAction consumes a flow and runs action in the same database transaction. An action failure rolls the consumption back.
model/auth_flow.go:240
↓ 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 callersFunctionDecreaseUserQuota
(id int, quota int, db bool)
model/user.go:1388
↓ 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:563
↓ 7 callersFunctionFormatClaudeResponseInfo
(claudeResponse *dto.ClaudeResponse, oaiResponse *dto.ChatCompletionsStreamResponse, claudeInfo *ClaudeRespons
relay/channel/claude/relay-claude.go:83
↓ 7 callersFunctionGenerateHMACWithKey
(key []byte, data string)
common/crypto.go:12
↓ 7 callersMethodGetAccessToken
()
model/user.go:133
↓ 7 callersFunctionGetAuditLogs
(filter AuditLogFilter, start, limit, viewerRole int)
model/audit_log.go:139
↓ 7 callersMethodGetAutoBan
()
model/channel.go:343
↓ 7 callersFunctionGetBillingExpr
(model string)
setting/billing_setting/tiered_billing.go:65
↓ 7 callersFunctionGetByTaskId
(userId int, taskId string)
model/task.go:421
↓ 7 callersFunctionGetClaudeSettings
GetClaudeSettings 获取Claude配置
setting/model_setting/claude.go:45
↓ 7 callersFunctionGetContextKeyBool
(c *gin.Context, key constant.ContextKey)
common/gin.go:173
↓ 7 callersFunctionGetContextKeyString
(c *gin.Context, key constant.ContextKey)
common/gin.go:165
↓ 7 callersFunctionGetEnvOrDefaultString
(env string, defaultValue string)
common/env.go:21
← previousnext →501–600 of 12,054, ranked by callers