MCPcopy Create free account

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

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

↓ 17 callersFunctioncleanup
()
web/src/features/auth/lib/oauth-popup.ts:66
↓ 17 callersFunctionmustCompileRoutingPlugin
(t *testing.T, key string, channelType int, models, metaFields, exports string)
pkg/jsplugin/routing_test.go:1008
↓ 17 callersFunctionpinTaskPluginRoute
(plugin *jsplugin.LoadedPlugin, routeIndex int)
middleware/task_plugin_test.go:1675
↓ 17 callersFunctionsemanticLoss
(path string, code string, message string)
relaykit/relayconvert/internal/toolconv/encode.go:1298
↓ 17 callersFunctionsetupUserSessionTest
(t *testing.T)
model/user_session_test.go:43
↓ 17 callersFunctionsideDrawerContentClassName
(className?: string)
web/src/components/drawer-layout.ts:24
↓ 17 callersFunctionuseDataTable
(options: UseDataTableOptions<TData>)
web/src/components/data-table/hooks/use-data-table.ts:278
↓ 16 callersFunctionConvertRequest
(c *gin.Context, info *relaycommon.RelayInfo, target types.RelayFormat, request any)
service/request_converter.go:26
↓ 16 callersFunctionConvertRequest
(c context.Context, info convmeta.Meta, target types.RelayFormat, request any)
relaykit/relayconvert/request_registry.go:155
↓ 16 callersFunctionFinishSystemTask
(taskID string, lockedBy string, status SystemTaskStatus, resultPayload any, errorMessage string)
model/system_task.go:399
↓ 16 callersFunctionGetChannelConstraints
(c *gin.Context)
service/channel_select.go:15
↓ 16 callersFunctionGetQuotaDisplayType
GetQuotaDisplayType 返回额度展示类型
setting/operation_setting/general_setting.go:55
↓ 16 callersFunctionNewLogOther
()
model/log_other.go:44
↓ 16 callersFunctionPinTaskPluginEndpoint
PinTaskPluginEndpoint decides shared-endpoint ownership without executing plugin code. Invalid or unidentifiable ordinary requests deliberately fall t
middleware/task_plugin.go:318
↓ 16 callersFunctionPrepareTaskPluginEndpoint
PrepareTaskPluginEndpoint normalizes a claimed shared request through the deterministic parser pinned before distribution. A shared-model request can
middleware/task_plugin.go:506
↓ 16 callersFunctionPublishUserAuthCache
PublishUserAuthCache refreshes the current database state after a successful auth-sensitive transaction without touching the cached quota field.
model/user_auth_cache.go:229
↓ 16 callersFunctionRelayErrorHandler
(ctx context.Context, resp *http.Response, showBodyWhenFail bool)
service/error.go:87
↓ 16 callersFunctionSetDatabaseTypes
(mainType DatabaseType, logType DatabaseType)
common/database.go:31
↓ 16 callersMethodSetReasoningEffort
SetReasoningEffort records the effort level a converter derived from a model-name suffix so downstream billing/logging can see it.
relaykit/relayconvert/convmeta/meta.go:30
↓ 16 callersMethodSnapshot
()
model/task.go:500
↓ 16 callersMethodString
()
service/http_transport_policy.go:89
↓ 16 callersFunctioncountLogs
(t *testing.T)
service/task_billing_test.go:520
↓ 16 callersFunctiongetLobeIcon
( iconName: string | undefined | null, size: number = 20 )
web/src/lib/lobe-icon.tsx:82
↓ 16 callersFunctionnewPluginRouterTest
( t *testing.T, plugins []*jsplugin.LoadedPlugin, handlers pluginRouteHandlers, )
router/plugin_router_test.go:780
↓ 16 callersFunctionnormalizeAdvancedCustomConfig
( config: AdvancedCustomConfig )
web/src/features/channels/lib/advanced-custom.ts:552
↓ 16 callersFunctionpluginProtocolTestOutcome
( info *relaycommon.RelayInfo, pluginKey string, taskID string, _ ...any, )
controller/plugin_protocol_test.go:1498
↓ 16 callersFunctionsetupStreamTest
(t *testing.T, body io.Reader)
relay/helper/stream_scanner_test.go:31
↓ 15 callersFunctionApplyReasoningModelSuffix
ApplyReasoningModelSuffix parses host-private reasoning suffixes from the origin and mapped model names, attaches the resulting intent to RelayInfo, a
relay/helper/reasoning_suffix.go:25
↓ 15 callersFunctionCacheGetChannel
(id int)
model/channel_cache.go:219
↓ 15 callersFunctionCan
Can reports whether the subject may perform the permission. A superuser role short-circuits to allow. Otherwise a per-user override wins, then the uni
service/authz/resolver.go:8
↓ 15 callersFunctionClaimSystemTask
(id int64, taskType string, runnerID string, lockUntil int64)
model/system_task.go:225
↓ 15 callersMethodClose
()
common/body_storage.go:214
↓ 15 callersFunctionConsumeOperationProof
ConsumeOperationProof accepts a proof at most once. The consumption commits before the caller performs its action; an action failure must not restore
service/security_verification.go:348
↓ 15 callersMethodDoResponse
(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo)
relay/channel/adapter.go:29
↓ 15 callersFunctionModelPriceHelper
(c *gin.Context, info *relaycommon.RelayInfo, promptTokens int, meta *types.TokenCountMeta)
relay/helper/price.go:75
↓ 15 callersFunctionModelRatio2JSONString
()
setting/ratio_setting/model_ratio.go:649
↓ 15 callersFunctionNewPluginResponsesMachine
(taskID, model string, createdAt int64, limits PluginProtocolLimits)
relay/plugin_protocol.go:378
↓ 15 callersMethodOtherRatios
()
types/price_data.go:58
↓ 15 callersFunctionRunExprWithRequest
(exprStr string, params TokenParams, request RequestInput)
pkg/billingexpr/run.go:28
↓ 15 callersMethodSeek
(offset int64, whence int)
common/body_storage.go:205
↓ 15 callersFunctionSetEventStreamHeaders
(c *gin.Context)
relay/helper/common.go:45
↓ 15 callersFunctionUpdateModelRatioByJSONString
(jsonStr string)
setting/ratio_setting/model_ratio.go:372
↓ 15 callersFunctionValidateAuthSessionWithTx
ValidateAuthSessionWithTx rechecks the authoritative identity while holding the user/session locks until the caller's credential change or flow consum
model/auth_flow.go:101
↓ 15 callersMethodabort
()
web/src/features/auth/secure-verification/__tests__/verification-api.test.ts:192
↓ 15 callersFunctionnewTestUserSession
(sid string, userID int, now int64)
model/user_session_test.go:82
↓ 15 callersFunctionsetupModelListControllerTestDB
(t *testing.T)
controller/model_list_test.go:37
↓ 15 callersFunctionsideDrawerFormClassName
(className?: string)
web/src/components/drawer-layout.ts:36
↓ 15 callersFunctionsideDrawerHeaderClassName
(className?: string)
web/src/components/drawer-layout.ts:30
↓ 15 callersFunctionstreamValuesFromAny
(value any)
relaykit/relayconvert/response_registry.go:731
↓ 14 callersFunctionFormatMatchingModelName
转换模型名,减少渠道必须配置各种带参数模型
setting/ratio_setting/model_ratio.go:732
↓ 14 callersFunctionGetAdaptor
(apiType int)
relay/relay_adaptor.go:50
↓ 14 callersFunctionGetGeminiSettings
GetGeminiSettings 获取Gemini配置
setting/model_setting/gemini.go:65
↓ 14 callersFunctionGetHttpClient
GetHttpClient returns the general outbound client used by relay/provider integrations. Do not attach the SSRF-protected dialer here: provider base URL
service/http_client.go:153
↓ 14 callersFunctionGetHttpClientWithProxy
GetHttpClientWithProxy returns the default client or a cached proxy-enabled client.
service/http_client.go:382
↓ 14 callersFunctionIncrementUserAuthVersionWithTx
IncrementUserAuthVersionWithTx locks the user, publishes the next deny fence, then persists the version in the caller's transaction. Unscoped is inten
model/user_auth_cache.go:180
↓ 14 callersFunctionInit
(db *gorm.DB)
service/authz/enforcer.go:33
↓ 14 callersFunctionInitHttpClient
()
service/http_client.go:139
↓ 14 callersFunctionLogDatabaseType
()
common/database.go:19
↓ 14 callersFunctionNewClaudeMessagesBillingUsage
(usage *ClaudeUsage)
relaykit/dto/billing_usage.go:25
↓ 14 callersFunctionRequireSecurityProof
RequireSecurityProof validates a proof against the authenticated dashboard session and writes the shared proof error contract on failure.
middleware/secure_verification.go:39
↓ 14 callersFunctionResetStatusCode
(newApiErr *types.NewAPIError, statusCodeMappingStr string)
service/error.go:140
↓ 14 callersMethodRoutes
()
pkg/jsplugin/routing.go:490
↓ 14 callersMethodUpdate
(updatePassword bool)
model/user.go:799
↓ 14 callersFunctiongetChannelUsedQuota
(t *testing.T, id int)
service/task_billing_test.go:468
↓ 14 callersFunctiongetIoEnterpriseClient
(c *gin.Context)
controller/deployment.go:50
↓ 14 callersFunctiongetTaskNumberFields
( schema: BillingUsageSchema | null | undefined )
web/src/features/pricing/lib/task-expr.ts:69
↓ 14 callersFunctiongetUserUsageAccounting
(t *testing.T, id int)
service/task_billing_test.go:461
↓ 14 callersFunctionnormalizeModelNames
(models []string)
controller/channel_upstream_update.go:101
↓ 14 callersFunctionsetupAuthSessionTestDB
(t *testing.T)
service/auth_session_test.go:22
↓ 14 callersFunctiontrimmed
(value)
plugins/tasks/hailuo/plugin.js:70
↓ 14 callersFunctionuseCopyToClipboard
(options?: UseCopyToClipboardOptions)
web/src/hooks/use-copy-to-clipboard.ts:36
↓ 13 callersFunctionComputeTieredQuota
ComputeTieredQuota runs the Expr from a frozen BillingSnapshot against actual token counts and returns the settlement result.
pkg/billingexpr/settle.go:20
↓ 13 callersFunctionDecodePluginProtocolEventResult
DecodePluginProtocolEventResult converts an exported JS value into the deliberately small semantic event contract. Unknown fields are rejected so plug
relay/plugin_protocol.go:131
↓ 13 callersMethodError
Error records a soft error. The stream continues processing. Can be called multiple times per chunk.
relay/helper/stream_result.go:21
↓ 13 callersMethodGetBillingModelName
GetBillingModelName returns the effective pricing identity without changing either the client-visible model or the model sent to the selected channel.
relay/common/relay_info.go:781
↓ 13 callersMethodGetContentString
()
relaykit/dto/openai_response.go:105
↓ 13 callersFunctionGetGeneralSetting
()
setting/operation_setting/general_setting.go:40
↓ 13 callersFunctionGetPasskeyByUserID
(userID int)
model/passkey.go:123
↓ 13 callersFunctionGetPricing
()
model/pricing.go:70
↓ 13 callersMethodLookupEndpoint
(method, path, model string)
pkg/jsplugin/routing.go:453
↓ 13 callersFunctionSendEmail
(subject string, receiver string, content string)
common/email.go:78
↓ 13 callersFunctionUnregister
Unregister removes a provider from the registry
oauth/registry.go:46
↓ 13 callersFunctionUserAuth
()
middleware/auth.go:100
↓ 13 callersFunctionValidatePasswordAndHash
(password string, hash string)
common/crypto.go:30
↓ 13 callersFunctionWalletQuotaFromDecimalStrict
WalletQuotaFromDecimalStrict converts wallet and top-up values within the JavaScript-safe integer range, which is also exactly representable by float6
common/quota_math.go:172
↓ 13 callersMethodcacheEntry
()
model/user_session.go:87
↓ 13 callersFunctionrequireSuccess
(response: ApiResponse<T>)
web/src/features/task-plugins/api.ts:57
↓ 13 callersFunctionseedChargedAccounting
(t *testing.T, userID, channelID, tokenID, quota, requestCount int)
service/task_billing_test.go:125
↓ 13 callersFunctionsplitBillingExprAndRequestRules
(expr: string)
web/src/features/pricing/lib/billing-expr.ts:901
↓ 13 callersFunctionuseMediaQuery
(query: string)
web/src/hooks/use-media-query.ts:26
↓ 13 callersFunctionwriteUserSessionCache
writeUserSessionCache writes a bounded Session snapshot. Active snapshots must carry a deadline captured immediately before their authoritative databa
model/user_session.go:284
↓ 12 callersFunctionApplyUpstreamBodyMetadata
ApplyUpstreamBodyMetadata restores metadata that net/http cannot infer from a ReplayableBody. Callers must pass the original body because NewRequest h
relay/channel/api_request.go:31
↓ 12 callersMethodCallPath
CallPath invokes a function nested below an exported object. It is used for protocol hooks such as protocols.openai_responses.renderEvents.
pkg/jsplugin/engine.go:313
↓ 12 callersMethodError
Error implements the error interface
pkg/ionet/types.go:274
↓ 12 callersFunctionFormatQuota
(quota int)
logger/logger.go:152
↓ 12 callersMethodGetErrorCode
()
relaykit/types/error.go:109
↓ 12 callersFunctionGetRandomString
(length int)
common/str.go:32
↓ 12 callersMethodHasStrength
()
relaykit/relayconvert/reasoning/intent.go:85
↓ 12 callersMethodIsEmpty
()
relaykit/relayconvert/reasoning/intent.go:89
↓ 12 callersFunctionNewResponseStreamState
(from types.RelayFormat, target types.RelayFormat, options ResponseStreamOptions)
relaykit/relayconvert/response_registry.go:297
← previousnext →201–300 of 11,918, ranked by callers