MCPcopy Create free account

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

Functions12,054 in github.com/QuantumNous/new-api

↓ 10 callersMethodSetData
(data any)
model/task.go:74
↓ 10 callersMethodSetEnabled
(enabled bool)
pkg/jsplugin/registry.go:460
↓ 10 callersMethodSetGenerationPreparer
(preparer RoutingGenerationPreparer)
pkg/jsplugin/registry.go:580
↓ 10 callersFunctionShouldPreserveThinkingSuffix
ShouldPreserveThinkingSuffix reports whether the full model name is exempt from host thinking-suffix and @-modifier parsing. Exact blacklist entries m
setting/model_setting/global.go:146
↓ 10 callersMethodSize
Size 获取数据大小
common/body_storage.go:20
↓ 10 callersFunctionTaskErrorWrapperLocal
(err error, code string, statusCode int)
service/error.go:194
↓ 10 callersMethodType
()
service/system_task.go:35
↓ 10 callersFunctionUnlockOrder
UnlockOrder 释放给定订单号的锁
controller/topup.go:378
↓ 10 callersFunctionUsedVars
UsedVars returns the set of identifier names referenced by an expression. The result is cached alongside the compiled program. Returns nil for empty i
pkg/billingexpr/compile.go:273
↓ 10 callersFunctionUsingLogDatabase
(databaseType DatabaseType)
common/database.go:40
↓ 10 callersFunctionaddNewRecord
(type_ int, id int, value int)
model/utils.go:44
↓ 10 callersFunctionadvancedCustomGinContext
(path string)
relay/channel/advancedcustom/adaptor_test.go:850
↓ 10 callersFunctioncreateSectionRegistry
(config: SectionRegistryConfig<TSectionId, TSettings, TExtraArgs>)
web/src/features/system-settings/utils/section-registry.ts:49
↓ 10 callersFunctionexecuteTaskSubmissionWith
( c *gin.Context, relayInfo *relaycommon.RelayInfo, submit taskSubmitAttempt, )
controller/relay.go:595
↓ 10 callersFunctionformatBillingCurrencyFromUSD
( amountUSD: number | null | undefined, options?: CurrencyFormatOptions )
web/src/lib/currency.ts:471
↓ 10 callersFunctionformatLogQuota
(quota: number)
web/src/lib/format.ts:237
↓ 10 callersFunctionformatPricingNumber
(value: unknown)
web/src/features/system-settings/models/pricing-format.ts:55
↓ 10 callersFunctioninsertUserForPaymentGuardTest
(t *testing.T, id int, quota int)
model/payment_method_guard_test.go:12
↓ 10 callersFunctionmustRawMessage
(t *testing.T, value any)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_req_test.go:353
↓ 10 callersFunctionperformHeaderNavRequest
(t *testing.T, handler gin.HandlerFunc, authenticated bool)
middleware/header_nav_test.go:39
↓ 10 callersFunctionprocessHeaderOverride
processHeaderOverride applies channel header overrides, with placeholder substitution. Supported placeholders: - {api_key}: resolved to the channel AP
relay/channel/api_request.go:196
↓ 10 callersFunctionrawJSONPresent
(raw json.RawMessage)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_req.go:564
↓ 10 callersFunctionregisterTestPlugin
(registry *Registry, version string, factory bool)
pkg/jsplugin/registry_test.go:518
↓ 10 callersFunctionresetPricingEndpointTestTables
(t *testing.T)
model/pricing_endpoint_test.go:14
↓ 10 callersFunctionroutingProtocolExport
(name string)
pkg/jsplugin/routing_test.go:1020
↓ 10 callersFunctionsafeJsonParse
( value: string | undefined | null, options: SafeJsonParseOptions<T> = {} )
web/src/features/system-settings/utils/json-parser.ts:113
↓ 10 callersFunctionsecurityPasskeyResponse
securityPasskeyResponse acts as a software authenticator at the browser boundary. The handlers still validate the real WebAuthn challenge, origin and
controller/security_enrollment_test.go:364
↓ 10 callersFunctionseedTaskPollingChannel
(t *testing.T, id int, disableSleep bool)
service/task_polling_test.go:163
↓ 10 callersFunctionsetupManageUserTestDB
(t *testing.T)
controller/user_manage_test.go:30
↓ 10 callersFunctionsetupUserUpdateTestState
(t *testing.T)
model/user_update_test.go:15
↓ 10 callersFunctiontriggerRefresh
()
web/src/features/users/components/users-provider.tsx:41
↓ 10 callersFunctionuseSearch
()
web/src/context/search-provider.tsx:57
↓ 9 callersMethodBuildRequestBody
(c *gin.Context, info *relaycommon.RelayInfo)
relay/channel/adapter.go:69
↓ 9 callersMethodCloseIdleConnections
()
service/http_transport_sharded.go:94
↓ 9 callersMethodConvertOpenAIRequest
(c *gin.Context, info *relaycommon.RelayInfo, request *dto.GeneralOpenAIRequest)
relay/channel/adapter.go:22
↓ 9 callersFunctionCountActiveUserSessions
(userID int, now int64)
model/user_session.go:177
↓ 9 callersFunctionDefaultPluginProtocolLimits
()
relay/plugin_protocol.go:42
↓ 9 callersMethodDialContext
(ctx context.Context, network, addr string)
service/protected_fetch_client.go:170
↓ 9 callersFunctionDistribute
()
middleware/distributor.go:34
↓ 9 callersFunctionEffectiveEffort
(intent Intent)
relaykit/relayconvert/reasoning/intent.go:565
↓ 9 callersMethodEnsureClaudeConvertInfo
EnsureClaudeConvertInfo lazily creates and returns the mutable OpenAI→Claude stream conversion state. For non-nil receivers, the same instance must be
relaykit/relayconvert/convmeta/meta.go:41
↓ 9 callersFunctionGetBodyStorage
GetBodyStorage 获取请求体存储对象(用于需要多次读取的场景)
common/gin.go:86
↓ 9 callersMethodGetByChannelType
(channelType int)
pkg/jsplugin/registry.go:450
↓ 9 callersFunctionGetChannelAffinitySetting
()
setting/operation_setting/channel_affinity_setting.go:156
↓ 9 callersFunctionGetJsonString
(data any)
common/str.go:100
↓ 9 callersMethodGetMaxTokens
()
relaykit/dto/openai_request.go:391
↓ 9 callersFunctionGetModelRatioCopy
()
setting/ratio_setting/model_ratio.go:691
↓ 9 callersFunctionGetSystemTaskByTaskID
(taskID string)
model/system_task.go:121
↓ 9 callersFunctionGetTokenByKey
(key string, fromDB bool)
model/token.go:280
↓ 9 callersFunctionGetUserQuota
GetUserQuota gets quota from Redis first, falls back to DB if needed
model/user.go:1253
↓ 9 callersMethodHasChannelMeta
HasChannelMeta reports whether upstream channel information is attached; converters use it to decide if GetUpstreamModelName is meaningful.
relaykit/relayconvert/convmeta/meta.go:23
↓ 9 callersFunctionInitSessionCookieSettings
()
common/session_cookie.go:44
↓ 9 callersMethodIsNormalEnd
()
relay/common/stream_status.go:88
↓ 9 callersFunctionIsPaymentComplianceConfirmed
()
setting/operation_setting/payment_setting.go:33
↓ 9 callersMethodJSValue
()
pkg/jsplugin/routing.go:244
↓ 9 callersFunctionLogQuota
(quota int)
logger/logger.go:125
↓ 9 callersMethodLookupEndpointCandidates
LookupEndpointCandidates returns every legacy provider implementation that can serve one shared model endpoint. Candidate order is deterministic and t
pkg/jsplugin/routing.go:469
↓ 9 callersFunctionNewOpenAIChatBillingUsage
(usage *Usage)
relaykit/dto/billing_usage.go:58
↓ 9 callersFunctionRecalculateTaskQuota
RecalculateTaskQuota 通用的异步差额结算。 actualQuota 是任务完成后的实际应扣额度,与预扣额度 (task.Quota) 做差额结算。 reason 用于日志记录(例如 "token重算" 或 "adaptor调整")。 clamps 可选:若计算 actualQuo
service/task_billing.go:261
↓ 9 callersMethodRecordError
(msg string)
relay/common/stream_status.go:55
↓ 9 callersFunctionRecordLog
(userId int, logType int, content string)
model/log.go:150
↓ 9 callersFunctionRequestId
()
middleware/request-id.go:10
↓ 9 callersFunctionRouteTag
(tag string)
middleware/logger.go:13
↓ 9 callersMethodSetEstimatePromptTokens
func (info *RelayInfo) SetPromptTokens(promptTokens int) { info.promptTokens = promptTokens }
relay/common/relay_info.go:751
↓ 9 callersFunctionSetToolPriceForTest
SetToolPriceForTest injects a tool price and rebuilds the lookup index. Tests only.
setting/operation_setting/tools.go:222
↓ 9 callersMethodSnapshot
()
pkg/jsplugin/registry.go:769
↓ 9 callersFunctionSource
Source returns the embedded factory source for a task plugin key.
plugins/embed.go:41
↓ 9 callersFunctionStringData
(c *gin.Context, str string)
relay/helper/common.go:97
↓ 9 callersFunctionT
T translates a message key using the language from gin context
i18n/i18n.go:90
↓ 9 callersMethodToOpenAIError
()
relaykit/types/error.go:180
↓ 9 callersFunctionTokenAuth
()
middleware/auth.go:361
↓ 9 callersFunctionUpdateConfigFromMap
UpdateConfigFromMap 从map更新配置对象(导出函数)
setting/config/config.go:281
↓ 9 callersFunctionUpdateMaxTokenAutoGroups
(value string)
setting/auto_group.go:59
↓ 9 callersFunctionUserSubject
UserSubject is the casbin subject string for a single user.
service/authz/permission.go:20
↓ 9 callersFunctionValidateV1Meta
ValidateV1Meta applies the metadata constraints published in docs/plugin-api/v1.schema.json to administrator uploads.
pkg/jsplugin/registry.go:1055
↓ 9 callersFunctionauthSigningKey
(purpose string)
service/auth_token.go:54
↓ 9 callersFunctioncalculateTextToolCallSurcharge
(ctx *gin.Context, relayInfo *relaycommon.RelayInfo, summary *textQuotaSummary)
service/text_quota.go:148
↓ 9 callersFunctionfetchChannelUpstreamModelIDs
(channel *model.Channel)
controller/channel_upstream_update.go:364
↓ 9 callersFunctiongetChannelAffinityCache
()
service/channel_affinity.go:83
↓ 9 callersFunctiongetUserAuthFenceKey
(userId int)
model/user_auth_cache.go:26
↓ 9 callersFunctionhasPermission
( user: AuthUser | null | undefined, resource: string, action: string )
web/src/lib/admin-permissions.ts:78
↓ 9 callersFunctioninsertPricingEndpointAbility
(t *testing.T, channelID int, modelName string)
model/pricing_endpoint_test.go:49
↓ 9 callersFunctionloadHailuoPlugin
(t *testing.T)
plugins/hailuo_responses_test.go:74
↓ 9 callersFunctionnewPluginGenerationBuilder
(staticRoutes []gin.RouteInfo, trustedProxies []string, handlers pluginRouteHandlers)
router/plugin-router.go:68
↓ 9 callersFunctionnewTestResponsesStreamState
()
relaykit/relayconvert/internal/oai_responses/to_oai_chat_resp_test.go:535
↓ 9 callersFunctionparseQuotaFromDollars
(amount: number)
web/src/lib/format.ts:84
↓ 9 callersFunctionpopulateUserCache
(user User)
model/user_cache.go:70
↓ 9 callersFunctionrawJSON
(value any)
relaykit/relayconvert/internal/toolconv/decode.go:787
↓ 9 callersFunctionrecordManageAuditFor
recordManageAuditFor 记录一条管理审计日志,日志归属于操作者;targetUserId 只表示被操作用户,用于在结构化参数中保留目标上下文。
controller/audit.go:113
↓ 9 callersFunctionretrieveTaskPluginResponse
(c *gin.Context, deps pluginProtocolBridgeDeps)
controller/plugin_protocol.go:929
↓ 9 callersFunctionsafeNumberFieldProps
(field: ControllerRenderProps<TFieldValues, TName>)
web/src/features/system-settings/utils/numeric-field.ts:76
↓ 9 callersFunctionsetupTelegramOAuthTest
(t *testing.T)
controller/telegram_test.go:60
↓ 9 callersFunctiontaskPluginControllerTestSource
(key, version string)
controller/task_plugin_test.go:45
↓ 9 callersFunctiontaskPriceLabel
( description: LocalizedTextValue | undefined, field: string, language: string )
web/src/features/pricing/lib/task-price-display.ts:35
↓ 9 callersFunctionuseApiKeys
()
web/src/features/keys/components/api-keys-provider.tsx:182
↓ 9 callersFunctionuseModels
()
web/src/features/models/components/models-provider.tsx:125
↓ 9 callersFunctionuseThemeCustomization
()
web/src/context/theme-customization-provider.tsx:260
↓ 9 callersFunctionuseUsageLogsContext
()
web/src/features/usage-logs/components/usage-logs-provider.tsx:88
↓ 9 callersFunctionwriteAuthSessionError
(c *gin.Context, err error)
controller/auth_session.go:164
↓ 8 callersFunctionAdminAuth
()
middleware/auth.go:106
← previousnext →401–500 of 12,054, ranked by callers