MCPcopy Create free account

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

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

↓ 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 callersFunctionDistribute
()
middleware/distributor.go:34
↓ 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 callersMethodGetContentString
()
relaykit/dto/openai_response.go:105
↓ 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 callersFunctionModelPrice2JSONString
()
setting/ratio_setting/model_ratio.go:351
↓ 14 callersMethodSetGenerationPreparer
(preparer RoutingGenerationPreparer)
pkg/jsplugin/registry.go:991
↓ 14 callersFunctionSetupContextForSelectedChannel
(c *gin.Context, channel *model.Channel, modelName string)
middleware/distributor.go:617
↓ 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 callersFunctionnewAlibabaPlugin
(t *testing.T)
plugins/alibaba_responses_test.go:309
↓ 14 callersFunctionnormalizeModelNames
(models []string)
controller/channel_upstream_update.go:103
↓ 14 callersFunctionoptionalString
(object map[string]any, name, subject string)
pkg/jsplugin/provider.go:1738
↓ 14 callersFunctionplainObject
(value)
plugins/tasks/xai/plugin.js:136
↓ 14 callersFunctionplanOf
(c *gin.Context)
relay/requestplugin/relay.go:33
↓ 14 callersFunctionsetupUserUpdateTestState
(t *testing.T)
model/user_update_test.go:17
↓ 14 callersFunctionstepOf
(t *testing.T, steps []relaycommon.RequestPluginStep, instance, stage string)
relay/requestplugin/requestplugin_test.go:112
↓ 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
↓ 13 callersFunctionBindVerificationOperation
(operation VerificationOperation)
service/security_verification.go:157
↓ 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 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 callersMethodGetImageMedia
()
relaykit/dto/openai_request.go:524
↓ 13 callersFunctionGetRandomString
(length int)
common/str.go:34
↓ 13 callersFunctionGetTwoFAByUserId
GetTwoFAByUserId 根据用户ID获取2FA设置
model/twofa.go:39
↓ 13 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:600
↓ 13 callersMethodMatchPathForModel
MatchPathForModel returns the first route whose IncomingPath and Models match. An empty Models list is a catch-all fallback for that incoming path.
relaykit/dto/channel_settings.go:280
↓ 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 callersFunctionNewResponseStreamState
(from types.RelayFormat, target types.RelayFormat, options ResponseStreamOptions)
relaykit/relayconvert/response_registry.go:297
↓ 13 callersMethodParseTaskResult
(task *model.Task, resp *http.Response, respBody []byte)
relay/channel/adapter.go:87
↓ 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:871
↓ 13 callersMethodSize
Size 获取数据大小
common/body_storage.go:24
↓ 13 callersFunctionTaskErrorWrapperLocal
(err error, code string, statusCode int)
service/error.go:194
↓ 13 callersFunctionTokenAuth
()
middleware/auth.go:528
↓ 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 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
pkg/jsplugin/registry.go:328
↓ 13 callersFunctionValidateV1Meta
ValidateV1Meta applies the metadata constraints published in docs/plugin-api/v1.schema.json to administrator uploads.
pkg/jsplugin/registry.go:1568
↓ 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: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:167
↓ 13 callersFunctionmustRawMessage
(t *testing.T, value any)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_req_test.go:541
↓ 13 callersFunctionnewContext
(body, group string)
relay/requestplugin/requestplugin_test.go:93
↓ 13 callersFunctionpresentationLoss
(path string, code string, message string)
relaykit/relayconvert/internal/toolconv/encode.go:1682
↓ 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 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 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:240
↓ 12 callersFunctionConvertResponse
(c context.Context, info convmeta.Meta, target types.RelayFormat, response any)
relaykit/relayconvert/response_registry.go:231
↓ 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
↓ 12 callersMethodFetchTask
── Polling ──────────────────────────────────────────────────────
relay/channel/adapter.go:86
↓ 12 callersFunctionGetAuthHeader
GetAuthHeader get auth header
controller/channel-billing.go:141
↓ 12 callersFunctionGetMaxTokenAutoGroups
()
setting/auto_group.go:47
↓ 12 callersMethodGetModels
()
model/channel.go:309
↓ 12 callersMethodGetReasoningContent
()
relaykit/dto/openai_request.go:659
↓ 12 callersFunctionGetResponseBody
(method, url string, channel *model.Channel, headers http.Header)
controller/channel-billing.go:155
↓ 12 callersMethodHasErrors
()
relay/common/stream_status.go:191
↓ 12 callersMethodIsEmpty
()
relaykit/relayconvert/reasoning/intent.go:90
↓ 12 callersFunctionNewGeminiChatBillingUsage
(metadata *GeminiUsageMetadata)
relaykit/dto/billing_usage.go:120
↓ 12 callersFunctionNewStreamScanner
NewStreamScanner shares relay scanner configuration. Callers buffering bounded task state may additionally cap a line without increasing the configure
relay/helper/stream_scanner.go:48
↓ 12 callersFunctionObjectData
(c *gin.Context, object any)
relay/helper/common.go:284
↓ 12 callersFunctionOptionsOf
OptionsOf returns m's conversion options, or empty defaults when m is nil.
relaykit/relayconvert/convmeta/meta.go:315
← previousnext →401–500 of 15,409, ranked by callers