MCPcopy Create free account

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

Functions10,934 in github.com/QuantumNous/new-api

↓ 9 callersFunctionsafeNumberFieldProps
(field: ControllerRenderProps<TFieldValues, TName>)
web/src/features/system-settings/utils/numeric-field.ts:76
↓ 9 callersFunctionseedTaskPollingChannel
(t *testing.T, id int, disableSleep bool)
service/task_polling_test.go:157
↓ 9 callersFunctionstreamValuesFromAny
(value any)
relaykit/relayconvert/response_registry.go:626
↓ 9 callersFunctionuseApiKeys
()
web/src/features/keys/components/api-keys-provider.tsx:182
↓ 9 callersFunctionuseIsMobile
()
web/src/hooks/use-mobile.ts:23
↓ 9 callersFunctionuseModels
()
web/src/features/models/components/models-provider.tsx:131
↓ 9 callersFunctionuseThemeCustomization
()
web/src/context/theme-customization-provider.tsx:260
↓ 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:443
↓ 8 callersMethodBuildRequestBody
(c *gin.Context, info *relaycommon.RelayInfo)
relay/channel/adapter.go:69
↓ 8 callersMethodClose
()
relay/channel/openai/image_stream_test.go:165
↓ 8 callersMethodConvertOpenAIRequest
(c *gin.Context, info *relaycommon.RelayInfo, request *dto.GeneralOpenAIRequest)
relay/channel/adapter.go:22
↓ 8 callersFunctionConvertStreamResponseChunk
(c context.Context, info convmeta.Meta, state *ResponseStreamState, response any)
relaykit/relayconvert/response_registry.go:301
↓ 8 callersMethodCreatedEvent
()
relay/plugin_protocol.go:429
↓ 8 callersFunctionDecreaseUserQuota
(id int, quota int, db bool)
model/user.go:1317
↓ 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:186
↓ 8 callersFunctionFinalizeStreamResponse
(c context.Context, info convmeta.Meta, state *ResponseStreamState)
relaykit/relayconvert/response_registry.go:326
↓ 8 callersFunctionGetGeminiSettings
GetGeminiSettings 获取Gemini配置
setting/model_setting/gemini.go:65
↓ 8 callersFunctionGetOIDCSettings
()
setting/system_setting/oidc.go:28
↓ 8 callersFunctionGetSystemTaskByTaskID
(taskID string)
model/system_task.go:121
↓ 8 callersFunctionGetTopUpByTradeNo
(tradeNo string)
model/topup.go:136
↓ 8 callersFunctionGetUUID
()
relaykit/relayconvert/kitutil/value.go:44
↓ 8 callersMethodHasChannelMeta
HasChannelMeta reports whether upstream channel information is attached; converters use it to decide if GetUpstreamModelName is meaningful.
relaykit/relayconvert/convmeta/meta.go:23
↓ 8 callersFunctionLogDatabaseType
()
common/database.go:19
↓ 8 callersFunctionNewOpenAIChatBillingUsage
(usage *Usage)
relaykit/dto/billing_usage.go:56
↓ 8 callersFunctionNewResponseStreamState
(from types.RelayFormat, target types.RelayFormat, options ResponseStreamOptions)
relaykit/relayconvert/response_registry.go:272
↓ 8 callersFunctionOaiResponsesHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/openai/relay_responses.go:20
↓ 8 callersFunctionOpenaiImageStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/openai/relay_image.go:93
↓ 8 callersMethodOverridePlugins
()
pkg/jsplugin/registry.go:595
↓ 8 callersFunctionParseAccessToken
(raw string)
service/auth_token.go:85
↓ 8 callersFunctionPrepareMidjourneyTaskBilling
PrepareMidjourneyTaskBilling sets the durable refund marker before the task is inserted.
service/midjourney.go:35
↓ 8 callersMethodRead
(p []byte)
common/body_storage.go:196
↓ 8 callersFunctionRecordConsumeLog
(c *gin.Context, userId int, params RecordConsumeLogParams)
model/log.go:358
↓ 8 callersMethodRecordError
(msg string)
relay/common/stream_status.go:55
↓ 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 callersMethodSetEstimatePromptTokens
func (info *RelayInfo) SetPromptTokens(promptTokens int) { info.promptTokens = promptTokens }
relay/common/relay_info.go:714
↓ 8 callersFunctionSetMainDatabaseType
(databaseType DatabaseType)
common/database.go:23
↓ 8 callersFunctionSetToolPriceForTest
SetToolPriceForTest injects a tool price and rebuilds the lookup index. Tests only.
setting/operation_setting/tools.go:222
↓ 8 callersMethodSnapshot
()
pkg/jsplugin/registry.go:807
↓ 8 callersFunctionSource
Source returns the embedded factory source for a task plugin key.
plugins/embed.go:35
↓ 8 callersFunctionUpdateUserUsableGroupsByJSONString
(jsonStr string)
setting/user_usable_group.go:38
↓ 8 callersFunctionValidateSSRFProtectedFetchURL
(urlStr string)
service/http_client.go:71
↓ 8 callersFunctioncalculateTextToolCallSurcharge
(ctx *gin.Context, relayInfo *relaycommon.RelayInfo, summary *textQuotaSummary)
service/text_quota.go:148
↓ 8 callersFunctioncanManageTargetRole
(myRole int, targetRole int)
controller/user.go:401
↓ 8 callersFunctioncompilePluginProtocolRetrieveEndpoint
(t *testing.T, key, source string, options pluginruntime.Options)
controller/plugin_protocol_test.go:1537
↓ 8 callersFunctioncreateLog
(log *Log)
model/log.go:101
↓ 8 callersFunctiondefaultHTTPTransportPolicy
()
service/http_transport_policy.go:22
↓ 8 callersFunctionformatLogQuota
(quota: number)
web/src/lib/format.ts:237
↓ 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 callersMethodhasHook
(ctx context.Context, hook string)
relay/channel/task/jsplugin/adaptor.go:1384
↓ 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 callersFunctionisTagAggregateRow
(row: Channel | TagRow)
web/src/features/channels/lib/channel-utils.ts:617
↓ 8 callersFunctionjsonValue
(value any)
relay/channel/task/jsplugin/adaptor.go:1396
↓ 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 callersFunctionnewImageTestContext
(t *testing.T, body, contentType string, isStream bool)
relay/channel/openai/image_stream_test.go:19
↓ 8 callersFunctionnewOuterPluginTestEngine
()
router/plugin_router_test.go:812
↓ 8 callersFunctionnewPluginProtocolObservationLimiter
(limits pluginProtocolObservationLimits)
controller/plugin_protocol_limiter.go:56
↓ 8 callersFunctionnewPluginProtocolRetrieveContext
(responseID string)
controller/plugin_protocol_test.go:1553
↓ 8 callersFunctionnewTestResponsesStreamState
()
relaykit/relayconvert/internal/oai_responses/to_oai_chat_resp_test.go:436
↓ 8 callersFunctionnormalizeHeaderContextKey
(key string)
relay/common/override.go:1558
↓ 8 callersFunctionpluginProtocolRetrieveDeps
(pinned pluginruntime.PinnedEndpoint, task *model.Task, exists bool, err error)
controller/plugin_protocol_test.go:1563
↓ 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 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:1033
↓ 8 callersFunctiontaskPluginControllerTestSource
(key, version string)
controller/task_plugin_test.go:42
↓ 8 callersFunctiontieredQuota
--------------------------------------------------------------------------- BuildTieredTokenParams: token normalization and ratio parity tests -------
service/tiered_settle_test.go:664
↓ 8 callersFunctiontrimmed
(value)
plugins/tasks/alibaba/plugin.js:42
↓ 8 callersFunctionuseContextValue
()
web/src/components/ai-elements/context.tsx:52
↓ 8 callersFunctionuseRateLimitMiniRedis
(t *testing.T)
middleware/rate_limit_test.go:20
↓ 8 callersFunctionuseSubscriptions
()
web/src/features/subscriptions/components/subscriptions-provider.tsx:82
↓ 8 callersFunctionuseSystemConfig
(options: UseSystemConfigOptions = {})
web/src/hooks/use-system-config.ts:144
↓ 8 callersFunctionuseUsageLogsContext
()
web/src/features/usage-logs/components/usage-logs-provider.tsx:88
↓ 7 callersFunctionBuildTaskPluginView
BuildTaskPluginView converts a persisted task into the deliberately narrow public shape permitted at JavaScript plugin boundaries.
service/task_plugin_view.go:11
↓ 7 callersFunctionConfigureTrustedProxies
(engine *gin.Engine)
middleware/trusted_proxies.go:11
↓ 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:562
↓ 7 callersMethodGetAutoBan
()
model/channel.go:343
↓ 7 callersFunctionGetByTaskId
(userId int, taskId string)
model/task.go:413
↓ 7 callersFunctionGetContextKeyString
(c *gin.Context, key constant.ContextKey)
common/gin.go:165
↓ 7 callersFunctionGetEnvOrDefaultString
(env string, defaultValue string)
common/env.go:21
↓ 7 callersFunctionGetGroupRatioCopy
()
setting/ratio_setting/group_ratio.go:62
↓ 7 callersMethodGetImageMedia
()
relaykit/dto/openai_request.go:329
↓ 7 callersFunctionGetModelRatio
(name string)
setting/ratio_setting/model_ratio.go:385
↓ 7 callersFunctionGetMonitorSetting
()
setting/operation_setting/monitor_setting.go:41
↓ 7 callersFunctionGetPasskeyByUserID
(userID int)
model/passkey.go:123
↓ 7 callersFunctionGetPaymentSetting
()
setting/operation_setting/payment_setting.go:29
↓ 7 callersMethodGetResultURL
GetResultURL 获取任务结果 URL(视频地址等) 新数据存在 PrivateData.ResultURL 中;旧数据回退到 FailReason(历史兼容)
model/task.go:175
↓ 7 callersFunctionGetSSRFProtectedHTTPClient
GetSSRFProtectedHTTPClient 返回带拨号时 SSRF 校验的客户端。 ssrfProtectedHTTPClient 由 InitHttpClient 在启动时初始化,运行期只读。
service/http_client.go:159
↓ 7 callersFunctionGetTaskPluginDisabledFactoryKeys
()
setting/task_plugin.go:75
← previousnext →401–500 of 10,934, ranked by callers