MCPcopy Create free account

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

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

↓ 15 callersMethodValid
(data []byte)
relaykit/relayconvert/kitutil/json.go:21
↓ 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 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
↓ 15 callersFunctionregisterProviderPlugin
(t *testing.T, key, mode string)
service/provider_plugin_test.go:272
↓ 15 callersFunctionsetupAuthSessionTestDB
(t *testing.T)
service/auth_session_test.go:22
↓ 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 callersFunctionApply
Apply applies effects in order to a copy of body and header and returns the copies. protected reports a header that header.patch must not set or remov
pkg/requestpatch/patch.go:303
↓ 14 callersMethodBuildContentRequest
(ctx context.Context, task *model.Task, artifactKey string, clientRequest TaskArtifactClientRequest)
relay/channel/adapter.go:129
↓ 14 callersMethodConversionDiagnostics
()
relay/common/conversion_diagnostics.go:62
↓ 14 callersMethodConvertClaudeRequest
(c *gin.Context, info *relaycommon.RelayInfo, request *dto.ClaudeRequest)
relay/channel/adapter.go:33
↓ 14 callersMethodCountBillableToolCall
CountBillableToolCall is the single entry point for per-call tool billing counts. Built-in call types always count; custom function/tool_use names onl
relay/common/tool_usage.go:37
↓ 14 callersFunctionCreateAuthFlow
(input AuthFlowCreate)
model/auth_flow.go:148
↓ 14 callersFunctionDeleteToolPriceForTest
DeleteToolPriceForTest removes an injected tool price and rebuilds the index. Tests only.
setting/operation_setting/tools.go:293
↓ 14 callersFunctionFormatMatchingModelName
转换模型名,减少渠道必须配置各种带参数模型
setting/ratio_setting/model_ratio.go:724
↓ 14 callersFunctionGetBillingMode
--------------------------------------------------------------------------- Read accessors (hot path, must be fast) ----------------------------------
setting/billing_setting/tiered_billing.go:52
↓ 14 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:880
↓ 14 callersFunctionGetChannelAffinitySetting
()
setting/operation_setting/channel_affinity_setting.go:161
↓ 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:161
↓ 14 callersMethodGetKeys
()
model/channel.go:195
↓ 14 callersFunctionGetPaymentSetting
()
setting/operation_setting/payment_setting.go:51
↓ 14 callersMethodGetText
()
relaykit/dto/claude.go:57
↓ 14 callersMethodHasChannelMeta
HasChannelMeta reports whether upstream channel information is attached; converters use it to decide if GetUpstreamModelName is meaningful.
relaykit/relayconvert/convmeta/meta.go:25
↓ 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:187
↓ 14 callersMethodLookupEndpointCandidates
LookupEndpointCandidates returns every plugin that can serve a shared model endpoint, in ascending key order. Each candidate decodes before distributi
pkg/jsplugin/routing.go:234
↓ 14 callersFunctionModelPrice2JSONString
()
setting/ratio_setting/model_ratio.go:351
↓ 14 callersFunctionNewResponseStreamState
(from types.RelayFormat, target types.RelayFormat, options ResponseStreamOptions)
relaykit/relayconvert/response_registry.go:297
↓ 14 callersMethodParseTaskResult
(task *model.Task, resp *http.Response, respBody []byte)
relay/channel/adapter.go:87
↓ 14 callersMethodSetGenerationPreparer
(preparer RoutingGenerationPreparer)
pkg/jsplugin/registry.go:272
↓ 14 callersFunctionTokenAuth
()
middleware/auth.go:534
↓ 14 callersFunctioncredentialFor
(t *testing.T, plugin string, expiresAt int64)
router/provider_plugin_relay_test.go:372
↓ 14 callersFunctiongetChannelUsedQuota
(t *testing.T, id int)
service/task_billing_test.go:534
↓ 14 callersFunctiongetIoEnterpriseClient
(c *gin.Context)
controller/deployment.go:50
↓ 14 callersFunctiongetUserUsageAccounting
(t *testing.T, id int)
service/task_billing_test.go:527
↓ 14 callersFunctionhandler
()
web/src/features/models/hooks/use-model-deployment-settings.ts:174
↓ 14 callersFunctionnewAlibabaPlugin
(t *testing.T)
plugins/alibaba_responses_test.go:309
↓ 14 callersFunctionnewContext
(body, group string)
relay/requestplugin/requestplugin_test.go:95
↓ 14 callersFunctionnormalizeModelNames
(models []string)
controller/channel_upstream_update.go:103
↓ 14 callersFunctionoptionalString
(object map[string]any, name, subject string)
pluginkit/provider.go:1722
↓ 14 callersFunctionplainObject
(value)
plugins/tasks/xai/plugin.js:136
↓ 14 callersFunctionplanOf
(c *gin.Context)
relay/requestplugin/relay.go:33
↓ 14 callersFunctionpresentationLoss
(path string, code string, message string)
relaykit/relayconvert/internal/toolconv/encode.go:1689
↓ 14 callersFunctionsetupUserUpdateTestState
(t *testing.T)
model/user_update_test.go:21
↓ 14 callersFunctionstepOf
(t *testing.T, steps []relaycommon.RequestPluginStep, instance, stage string)
relay/requestplugin/requestplugin_test.go:114
↓ 14 callersFunctiontaskPluginControllerTestSource
(key, version string)
controller/task_plugin_test.go:52
↓ 14 callersFunctiontrimmed
(value)
plugins/tasks/vertex-ai/plugin.js:118
↓ 14 callersFunctionuseCopyToClipboard
(options?: UseCopyToClipboardOptions)
web/src/hooks/use-copy-to-clipboard.ts:36
↓ 14 callersMethodvalue
()
pluginkit/provider.go:263
↓ 13 callersFunctionBindVerificationOperation
(operation VerificationOperation)
service/security_verification.go:157
↓ 13 callersMethodClone
Clone returns a copy with empty lists, never nil ones.
setting/request_plugin_setting/config.go:119
↓ 13 callersMethodClose
()
relay/channel/providerplugin/stream.go:319
↓ 13 callersMethodConvertOpenAIRequest
(c *gin.Context, info *relaycommon.RelayInfo, request *dto.GeneralOpenAIRequest)
relay/channel/adapter.go:23
↓ 13 callersFunctionConvertResponse
(c context.Context, info convmeta.Meta, target types.RelayFormat, response any)
relaykit/relayconvert/response_registry.go:231
↓ 13 callersFunctionCountActiveUserSessions
(userID int, now int64)
model/user_session.go:179
↓ 13 callersFunctionCreateUserSession
(session *UserSession)
model/user_session.go:135
↓ 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 callersFunctionEgress
Egress runs the egress stage on the final upstream JSON body of a channel attempt, after the channel param override. It changes nothing; an instance c
relay/requestplugin/relay.go:382
↓ 13 callersFunctionGetContextKeyString
(c *gin.Context, key constant.ContextKey)
common/gin.go:186
↓ 13 callersMethodGetImageMedia
()
relaykit/dto/openai_request.go:527
↓ 13 callersFunctionGetRandomString
(length int)
common/str.go:34
↓ 13 callersFunctionGetTwoFAByUserId
GetTwoFAByUserId 根据用户ID获取2FA设置
model/twofa.go:39
↓ 13 callersFunctionInvalidatePricingCache
()
model/pricing.go:98
↓ 13 callersFunctionMergeUsageNonZero
MergeUsageNonZero overlays usage snapshots: a later non-zero field overwrites the current value, while a later zero value never erases an earlier posi
relaykit/dto/usage_merge.go:12
↓ 13 callersMethodRecordConversionDiagnostics
RecordConversionDiagnostics retains conversion losses for the consume log and emits one request-correlated warning per distinct diagnostic. The cap pr
relay/common/conversion_diagnostics.go:25
↓ 13 callersFunctionRefreshPluginCredential
RefreshPluginCredential refreshes the credential line a request or the background scan used, at keyIndex of the channel's keys. It returns the line to
service/provider_plugin.go:160
↓ 13 callersFunctionRegisterSyncTopic
RegisterSyncTopic makes this node run reload whenever another write bumps topic. Register every topic before StartNodeSync.
service/node_sync.go:58
↓ 13 callersFunctionResponsesRequestToChatCompletionsRequest
(ctx context.Context, req *dto.OpenAIResponsesRequest)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_req.go:34
↓ 13 callersFunctionRevokeAllUserSessions
(userID int, reason string)
model/user_session.go:730
↓ 13 callersMethodSetEnabled
(enabled bool)
pkg/jsplugin/registry.go:152
↓ 13 callersMethodSize
Size 获取数据大小
common/body_storage.go:24
↓ 13 callersFunctionTaskErrorWrapperLocal
(err error, code string, statusCode int)
service/error.go:194
↓ 13 callersMethodUpdate
(updatePassword bool)
model/user.go:789
↓ 13 callersMethodUpdateBalance
(balance float64)
model/channel.go:677
↓ 13 callersFunctionUpdateModelPriceByJSONString
(jsonStr string)
setting/ratio_setting/model_ratio.go:355
↓ 13 callersFunctionUpdateUserUsableGroupsByJSONString
(jsonStr string)
setting/user_usable_group.go:39
↓ 13 callersMethodUsageForModel
UsageForModel returns read-only usage metadata for a declared model. Aliases must be resolved by the host first; an unknown or ambiguous model uses th
pluginkit/meta.go:417
↓ 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 callersFunctionadvancedCustomGinContext
(path string)
relay/channel/advancedcustom/adaptor_test.go:1238
↓ 13 callersMethodcacheEntry
()
model/user_session.go:89
↓ 13 callersFunctiongetTaskNumberFields
( schema: BillingUsageSchema | null | undefined )
web/src/features/pricing/lib/task-expr.ts:70
↓ 13 callersFunctionloadHailuoPlugin
(t *testing.T)
plugins/hailuo_responses_test.go:172
↓ 13 callersFunctionmodelManagementDB
(t *testing.T, kind, dsn string)
controller/model_management_test.go:33
↓ 13 callersFunctionmustRawMessage
(t *testing.T, value any)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_req_test.go:541
↓ 13 callersFunctionnewAPIErrorFromParamOverride
newAPIErrorFromParamOverride classifies a param override failure by what triggered it. A condition that fails on the request's own value is a 400 requ
relay/param_override_error.go:16
↓ 13 callersFunctionroutingTestPluginSource
(key string, channelType int, models, metaFields, exports string)
pkg/jsplugin/routing_test.go:630
↓ 13 callersFunctionseedChargedAccounting
(t *testing.T, userID, channelID, tokenID, quota, requestCount int)
service/task_billing_test.go:130
↓ 13 callersFunctiontaskProtocolPluginSource
(key, version, models, endpoint, parseRequestBody string)
middleware/task_plugin_test.go:1975
↓ 13 callersFunctiontriggerRefresh
()
web/src/features/subscriptions/components/subscriptions-provider.tsx:62
↓ 13 callersFunctionuseRateLimitMiniRedis
(t *testing.T)
middleware/rate_limit_test.go:23
↓ 13 callersFunctionuseTestSessionSecret
(t *testing.T)
service/auth_token_test.go:15
↓ 13 callersFunctionwriteUserSessionCache
writeUserSessionCache writes a bounded Session snapshot. Active snapshots must carry a deadline captured immediately before their authoritative databa
model/user_session.go:290
↓ 12 callersFunctionApplyUpstreamBodyMetadata
ApplyUpstreamBodyMetadata restores metadata that net/http cannot infer from a ReplayableBody. Callers pass the body given to NewRequest, which wraps a
relay/channel/api_request.go:32
↓ 12 callersMethodDecode
(r io.Reader, v any)
relaykit/relayconvert/kitutil/json.go:20
↓ 12 callersMethodDialContext
(ctx context.Context, network, addr string)
service/protected_fetch_client.go:170
↓ 12 callersMethodExportAllConfigs
ExportAllConfigs 导出所有已注册的配置为扁平结构
setting/config/config.go:286
← previousnext →401–500 of 15,592, ranked by callers