MCPcopy Create free account

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

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

↓ 19 callersFunctioncompileProviderPlugin
(t *testing.T, relay, source string)
pkg/jsplugin/provider_test.go:36
↓ 19 callersFunctionmustCompileRoutingPlugin
(t *testing.T, key string, channelType int, models, metaFields, exports string)
pkg/jsplugin/routing_test.go:1200
↓ 19 callersFunctionnewInfo
(bound ...string)
relay/requestplugin/requestplugin_test.go:101
↓ 19 callersFunctionnewPluginProtocolTestContext
(stream, requestBodyStream bool)
controller/plugin_protocol_test.go:1480
↓ 19 callersFunctionresolve
resolve returns the value at tokens.
pkg/requestpatch/patch.go:600
↓ 19 callersFunctionsemanticLoss
(path string, code string, message string)
relaykit/relayconvert/internal/toolconv/encode.go:1678
↓ 19 callersFunctionsplitBillingExprAndRequestRules
(expr: string)
web/src/features/pricing/lib/billing-expr.ts:612
↓ 19 callersFunctionuseDataTable
(options: UseDataTableOptions<TData>)
web/src/components/data-table/hooks/use-data-table.ts:278
↓ 19 callersFunctionuseProviderPluginDatabase
useProviderPluginDatabase installs a database for the provider plugin tests. TEST_TASK_DB_DIALECT selects mysql or postgres through TEST_MYSQL_DSN and
service/provider_plugin_test.go:42
↓ 18 callersFunctionCloneBillingUsage
(usage *BillingUsage)
relaykit/dto/billing_usage.go:223
↓ 18 callersFunctionConvertRequest
(c *gin.Context, info *relaycommon.RelayInfo, target types.RelayFormat, request any)
service/request_converter.go:26
↓ 18 callersMethodError
Error records a soft error. The stream continues processing. Can be called multiple times per chunk.
relay/helper/stream_result.go:25
↓ 18 callersFunctionGetAdaptor
(apiType int)
relay/relay_adaptor.go:51
↓ 18 callersFunctionNormalizeEmail
(email string)
model/user.go:311
↓ 18 callersMethodOtherRatios
()
types/price_data.go:67
↓ 18 callersFunctionReply
Reply starts the reply checks of a channel attempt, and the report capture when the attempt brings a report instance: before the attempt's handler run
relay/requestplugin/reply.go:76
↓ 18 callersFunctionSendEmail
(subject string, receiver string, content string)
common/email.go:78
↓ 18 callersMethodSetEstimatePromptTokens
func (info *RelayInfo) SetPromptTokens(promptTokens int) { info.promptTokens = promptTokens }
relay/common/relay_info.go:850
↓ 18 callersFunctionUnmarshalBodyReusableNoCopy
UnmarshalBodyReusableNoCopy borrows from immutable memory bodies and decodes disk bodies through a file reader. Clone the decoded request before apply
common/gin.go:126
↓ 18 callersFunctionUpdateOption
(key string, value string)
model/option.go:288
↓ 18 callersFunctiongetLobeIcon
( iconName: string | undefined | null, size: number = 20 )
web/src/lib/lobe-icon.tsx:131
↓ 18 callersFunctionpinTaskPluginRoute
(plugin *jsplugin.LoadedPlugin, routeIndex int)
middleware/task_plugin_test.go:2025
↓ 18 callersFunctionsafeJsonParseWithValidation
( value: string | undefined | null, options: SafeJsonParseWithValidationOptions<T> )
web/src/features/system-settings/utils/json-parser.ts:141
↓ 18 callersFunctionsetInstances
(t *testing.T, instances string)
relay/requestplugin/requestplugin_test.go:85
↓ 17 callersFunctionBuildTieredTokenParams
BuildTieredTokenParams constructs billingexpr.TokenParams from a dto.Usage, normalizing P and C so they mean "tokens not separately priced by the expr
service/tiered_settle.go:32
↓ 17 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:10
↓ 17 callersFunctionComputeTieredQuota
ComputeTieredQuota runs the Expr from a frozen BillingSnapshot against actual token counts and returns the settlement result.
pkg/billingexpr/settle.go:24
↓ 17 callersMethodExtractUsageFactsValidated
(c *gin.Context, info *relaycommon.RelayInfo)
relay/channel/adapter.go:146
↓ 17 callersFunctionGetGeminiSettings
GetGeminiSettings 获取Gemini配置
setting/model_setting/gemini.go:66
↓ 17 callersFunctionGetPageQuery
(c *gin.Context)
common/page_info.go:41
↓ 17 callersFunctionGetPricing
()
model/pricing.go:84
↓ 17 callersFunctionInit
(db *gorm.DB)
service/authz/enforcer.go:33
↓ 17 callersMethodParseResponse
(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo)
relay/channel/adapter.go:79
↓ 17 callersFunctionRelayErrorHandler
(ctx context.Context, resp *http.Response, showBodyWhenFail bool)
service/error.go:87
↓ 17 callersFunctionRequireSecurityProof
RequireSecurityProof validates a proof against the authenticated dashboard session or scoped access token and writes the shared proof error contract o
middleware/secure_verification.go:40
↓ 17 callersMethodRoutes
()
pkg/jsplugin/routing.go:619
↓ 17 callersMethodSeek
(offset int64, whence int)
common/body_storage.go:231
↓ 17 callersMethodSetItems
(items any)
common/page_info.go:37
↓ 17 callersMethodSetSetting
(setting dto.UserSetting)
model/user.go:176
↓ 17 callersMethodSetToolCalls
(toolCalls any)
relaykit/dto/openai_request.go:691
↓ 17 callersMethodSetTotal
(total int)
common/page_info.go:33
↓ 17 callersMethodText
Text returns the text for lang: its own locale, then the bare language, then the first regional locale of that language in sorted order, then en.
pkg/jsplugin/provider.go:1846
↓ 17 callersMethodclose
()
web/src/features/playground/hooks/use-stream-request.test.ts:50
↓ 17 callersMethodcloseAndWait
(t *testing.T)
controller/responses_websocket_test.go:290
↓ 17 callersFunctionfinish
(result)
web/src/features/auth/lib/oauth-popup.ts:82
↓ 17 callersFunctiongetServerMessage
(value: unknown)
web/src/lib/server-error-message.ts:162
↓ 17 callersFunctionnewPluginRouterTest
( t *testing.T, plugins []*jsplugin.LoadedPlugin, handlers pluginRouteHandlers, )
router/plugin_router_test.go:1008
↓ 17 callersFunctionnewResponsesWSBillingTest
(t *testing.T, expression string, handle func(*websocket.Conn, *http.Request), httpEvents ...string)
controller/responses_websocket_test.go:330
↓ 17 callersFunctionrequireSuccess
(response: ApiResponse<T>)
web/src/features/task-plugins/api.ts:63
↓ 17 callersFunctionsetupUserSessionTest
(t *testing.T)
model/user_session_test.go:43
↓ 17 callersFunctionsideDrawerContentClassName
(className?: string)
web/src/components/drawer-layout.ts:24
↓ 17 callersFunctiontrimmed
(value)
plugins/tasks/hailuo/plugin.js:171
↓ 16 callersMethodAddPin
(p ChannelPin)
dto/channel_constraints.go:61
↓ 16 callersFunctionClaimSystemTask
(id int64, taskType string, runnerID string, lockUntil int64)
model/system_task.go:365
↓ 16 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:507
↓ 16 callersFunctionFinishSystemTask
(taskID string, lockedBy string, status SystemTaskStatus, resultPayload any, errorMessage string)
model/system_task.go:539
↓ 16 callersFunctionGetPointer
(v T)
common/utils.go:277
↓ 16 callersFunctionGetQuotaDisplayType
GetQuotaDisplayType 返回额度展示类型
setting/operation_setting/general_setting.go:55
↓ 16 callersMethodKind
Kind names the rule category: "scope", "any" or "session".
middleware/access_token_routes.go:365
↓ 16 callersFunctionNewPluginResponsesMachine
(taskID, model string, createdAt int64, limits PluginProtocolLimits)
relay/plugin_protocol.go:378
↓ 16 callersFunctionPasskeySettingsSnapshot
PasskeySettingsSnapshot includes the effective defaults without sharing a mutable settings pointer with a WebAuthn ceremony.
setting/system_setting/passkey.go:32
↓ 16 callersFunctionResetStatusCode
(newApiErr *types.NewAPIError, statusCodeMappingStr string)
service/error.go:140
↓ 16 callersMethodSetData
(data any)
model/task.go:75
↓ 16 callersMethodSetEndReason
(reason StreamEndReason, err error)
relay/common/stream_status.go:77
↓ 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:32
↓ 16 callersFunctionUnregister
Unregister removes a provider from the registry
oauth/registry.go:55
↓ 16 callersFunctionUserAuth
()
middleware/auth.go:132
↓ 16 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:103
↓ 16 callersMethodValidateConfig
ValidateConfig checks an instance config against meta.configSchema and returns it with the defaults of absent properties applied. Without a schema onl
pkg/jsplugin/config_schema.go:158
↓ 16 callersFunctionValidateLoginSession
(identity AuthIdentity)
service/auth_session.go:130
↓ 16 callersFunctioncountLogs
(t *testing.T)
service/task_billing_test.go:586
↓ 16 callersFunctionexecuteTaskSubmissionWith
( c *gin.Context, relayInfo *relaycommon.RelayInfo, submit taskSubmitAttempt, )
controller/relay.go:602
↓ 16 callersFunctionnewTestUserSession
(sid string, userID int, now int64)
model/user_session_test.go:82
↓ 16 callersFunctionnormalizeAdvancedCustomConfig
( config: AdvancedCustomConfig )
web/src/features/channels/lib/advanced-custom.ts:580
↓ 16 callersFunctionpluginCredentialKeyLines
pluginCredentialKeyLines splits a channel key into its lines: the whole key is the one line of a single-key channel. An empty key has none.
service/provider_plugin.go:426
↓ 16 callersFunctionpluginProtocolTestOutcome
( info *relaycommon.RelayInfo, pluginKey string, taskID string, _ ...any, )
controller/plugin_protocol_test.go:1522
↓ 16 callersFunctionreplyContext
replyContext is a relay request on path from user alice with token ci, past its ingress stage.
relay/requestplugin/requestplugin_test.go:986
↓ 16 callersFunctionresetPricingEndpointTestTables
(t *testing.T)
model/pricing_endpoint_test.go:14
↓ 16 callersMethodscope
scope returns the instances that run at stage for a request for model, in order: the global ones, then those of group, then the channel's bound ids; e
relay/requestplugin/plan.go:178
↓ 16 callersFunctionsetupGenericTaskTest
(t *testing.T)
controller/task_generic_test.go:27
↓ 16 callersFunctionsetupModelListControllerTestDB
(t *testing.T)
controller/model_list_test.go:37
↓ 16 callersFunctionsetupStreamTest
(t *testing.T, body io.Reader)
relay/helper/stream_scanner_test.go:106
↓ 16 callersFunctionwriteJSON
(w http.ResponseWriter, status int, value any)
service/provider_plugin_test.go:136
↓ 15 callersFunctionAdd
(ctx context.Context, diagnostics ...types.ConversionDiagnostic)
relaykit/relayconvert/internal/convdiag/collector.go:27
↓ 15 callersMethodChannelConfigFor
ChannelConfigFor returns a channel's stored plugin config as its hooks get it: the properties meta.channelConfig declares, with the defaults of absent
pkg/jsplugin/config_schema.go:253
↓ 15 callersFunctionGetBodyStorage
GetBodyStorage 获取请求体存储对象(用于需要多次读取的场景)
common/gin.go:97
↓ 15 callersFunctionGetFetchSetting
()
setting/system_setting/fetch_setting.go:32
↓ 15 callersMethodLookupEndpoint
(method, path, model string)
pkg/jsplugin/routing.go:583
↓ 15 callersFunctionNewClaudeMessagesBillingUsage
(usage *ClaudeUsage)
relaykit/dto/billing_usage.go:25
↓ 15 callersFunctionPostTextConsumeQuota
(ctx *gin.Context, relayInfo *relaycommon.RelayInfo, usage *dto.Usage, extraContent []*common.Message)
service/text_quota.go:400
↓ 15 callersMethodValid
(data []byte)
relaykit/relayconvert/kitutil/json.go:21
↓ 15 callersFunctionValidatePasswordAndHash
(password string, hash string)
common/crypto.go:30
↓ 15 callersFunctionWithFetcher
WithFetcher makes utils.fetch available to the hook called with ctx.
pkg/jsplugin/fetch.go:59
↓ 15 callersMethodappend
append adds an accepted request without preallocating for the configured limit.
common/rate-limit.go:23
↓ 15 callersFunctionassertResponsesWSAccounting
(t *testing.T, fixture *responsesWSBillingTest, expectedQuotas []int)
controller/responses_websocket_test.go:512
↓ 15 callersFunctiondecodePluginValue
(t *testing.T, value any)
plugins/vertex_ai_responses_test.go:199
↓ 15 callersFunctiongetServerErrorMessage
( value: unknown, fallback?: string )
web/src/lib/server-error-message.ts:186
↓ 15 callersFunctiongetUserCacheKey
getUserCacheKey returns the key for user cache
model/user_cache.go:62
↓ 15 callersFunctioninsertPricingEndpointAbility
(t *testing.T, channelID int, modelName string)
model/pricing_endpoint_test.go:49
↓ 15 callersFunctionreadResponsesWSTestEvent
(t *testing.T, client *websocket.Conn)
controller/responses_websocket_test.go:502
← previousnext →301–400 of 15,409, ranked by callers