MCPcopy Create free account

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

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

↓ 3 callersMethodGetModelMapping
()
model/channel.go:594
↓ 3 callersMethodGetOpenAIError
GetOpenAIError 从动态错误类型中提取OpenAIError结构
relaykit/dto/openai_response.go:52
↓ 3 callersFunctionGetPerformanceMonitorConfig
GetPerformanceMonitorConfig 获取性能监控配置
common/performance_config.go:26
↓ 3 callersFunctionGetPluginBillingExpr
(pluginKey, model string)
setting/billing_setting/tiered_billing.go:102
↓ 3 callersFunctionGetPluginBillingExprCopy
()
setting/billing_setting/tiered_billing.go:98
↓ 3 callersFunctionGetPricingSyncData
(base map[string]any)
setting/billing_setting/tiered_billing.go:189
↓ 3 callersMethodGetPriority
()
model/channel.go:569
↓ 3 callersMethodGetRawData
()
relaykit/types/file_source.go:16
↓ 3 callersMethodGetSendResponseCount
GetSendResponseCount / IncrSendResponseCount expose the shared downstream-chunk counter (the host may also increment it).
relaykit/relayconvert/convmeta/meta.go:56
↓ 3 callersMethodGetSetting
()
model/channel.go:1205
↓ 3 callersFunctionGetStatus
(c *gin.Context)
controller/misc.go:41
↓ 3 callersMethodGetStringContent
()
relaykit/dto/claude.go:152
↓ 3 callersFunctionGetSubscriptionOrderByTradeNo
(tradeNo string)
model/subscription.go:253
↓ 3 callersFunctionGetSystemStatus
GetSystemStatus 获取当前系统状态
common/system_monitor.go:139
↓ 3 callersMethodGetTag
()
model/channel.go:347
↓ 3 callersFunctionGetTaskArtifactStore
GetTaskArtifactStore returns the process-wide artifact storage backend. This release always returns the disabled implementation.
service/task_artifact_store.go:61
↓ 3 callersFunctionGetTaskPluginGatewayID
GetTaskPluginGatewayID returns the gateway id, creating it on first use. The first node to insert the row wins, so every node reads the same value.
model/task_plugin.go:332
↓ 3 callersFunctionGetTaskPluginMarketplaceSources
()
setting/task_plugin.go:56
↓ 3 callersFunctionGetTaskPluginRuntime
(c *gin.Context)
controller/task_plugin.go:400
↓ 3 callersFunctionGetTaskPluginUsage
(key string)
model/task_plugin.go:25
↓ 3 callersFunctionGetUniqueUserByEmail
(email string)
model/user.go:1149
↓ 3 callersFunctionGetUserLogs
(userId int, filter LogFilter, startIdx int, num int)
model/log.go:596
↓ 3 callersFunctionGetUserUsedQuota
(id int)
model/user.go:1264
↓ 3 callersFunctionGetVendors
GetVendors 返回当前定价接口使用到的供应商信息
model/pricing.go:108
↓ 3 callersMethodGetWeight
()
model/channel.go:576
↓ 3 callersFunctionHardDeleteUserById
HardDeleteUserById permanently deletes a user and returns how many scoped access tokens were deleted with it.
model/user.go:564
↓ 3 callersMethodHasBody
HasBody reports whether the request carries a body, a form or a file.
pkg/jsplugin/provider.go:625
↓ 3 callersFunctionHasOpenAIUsageTokens
(usage *Usage)
relaykit/dto/billing_usage.go:77
↓ 3 callersFunctionImageHelper
(c *gin.Context, info *relaycommon.RelayInfo)
relay/image_handler.go:32
↓ 3 callersFunctionImageTokens
ImageTokens returns the prompt tokens one image costs on model.
tokenkit/image.go:32
↓ 3 callersFunctionInitOpenAIError
(errorCode ErrorCode, statusCode int, ops ...NewAPIErrorOptions)
relaykit/types/error.go:299
↓ 3 callersFunctionInspectResponse
InspectResponse reports protocol information that the current response converters cannot faithfully express. It keeps loss handling centralized so dir
relaykit/relayconvert/internal/toolconv/response.go:17
↓ 3 callersFunctionInvalidatePluginKeyToken
InvalidatePluginKeyToken drops the cached token of a key line after the upstream rejected it, unless another exchange replaced it meanwhile.
service/provider_plugin.go:367
↓ 3 callersFunctionInvalidateProxyClient
InvalidateProxyClient removes every cached policy variant for one proxy and closes their idle connections (including all HTTP/2 shards).
service/http_client.go:445
↓ 3 callersFunctionIsBuiltInToolPriceKey
IsBuiltInToolPriceKey reports whether the built-in price seed prices the tool name, as a default or for a model prefix. Operator prices never count.
setting/operation_setting/tools.go:126
↓ 3 callersFunctionIsChannelError
(err *NewAPIError)
relaykit/types/error.go:374
↓ 3 callersMethodIsConfigured
()
setting/system_setting/telegram.go:24
↓ 3 callersFunctionIsDiskCacheAvailable
IsDiskCacheAvailable 检查是否可以创建新的磁盘缓存
common/disk_cache_config.go:170
↓ 3 callersFunctionIsExposeRatioEnabled
()
setting/ratio_setting/expose_ratio.go:15
↓ 3 callersFunctionIsIpInCIDRList
(ip net.IP, cidrList []string)
common/ip.go:33
↓ 3 callersFunctionIsModelPricingOption
(key string)
model/model_pricing_config.go:77
↓ 3 callersMethodIsNative
IsNative reports whether the route forwards requests without protocol conversion. Validate normalizes an empty converter to none, but callers may see
relaykit/dto/channel_settings.go:258
↓ 3 callersFunctionIsProtectedHeader
IsProtectedHeader reports a header no plugin effect may change: the credentials, the request framing and the hop-by-hop headers.
pkg/requestpatch/patch.go:360
↓ 3 callersFunctionIsTaskArtifactAccess
(c *gin.Context)
middleware/task_artifact_access.go:220
↓ 3 callersFunctionIsUserSelectableGroup
(userGroup, groupName string)
service/group.go:49
↓ 3 callersFunctionIsValidateRole
(role int)
common/constants.go:208
↓ 3 callersFunctionIssueTaskArtifactAccess
IssueTaskArtifactAccess creates a stable capability bound to exactly one public task ID and artifact key. It contains no user or upstream data.
service/task_artifact_access.go:32
↓ 3 callersMethodItems
()
types/set.go:30
↓ 3 callersMethodJSONTextMember
JSONTextMember names the member of a hook result (a decoded requestBody, a request descriptor's body) that the host also takes as JSON text, for a plu
pkg/jsplugin/registry.go:311
↓ 3 callersFunctionLegacyAccessTokensRetired
(now int64)
model/user_access_token.go:326
↓ 3 callersFunctionListActiveUserSessions
(userID int, currentSID string, now int64)
model/user_session.go:417
↓ 3 callersFunctionListTaskPlugins
(c *gin.Context)
controller/task_plugin.go:294
↓ 3 callersFunctionListTaskPlugins
()
model/task_plugin.go:151
↓ 3 callersFunctionLoadCustomProviders
LoadCustomProviders replaces the custom OAuth providers with the ones in the database, all at once: a login never finds a provider missing mid-load. A
oauth/registry.go:112
↓ 3 callersFunctionLoadFromJsonString
(m *RWMap[K, V], jsonStr string)
types/rw_map.go:76
↓ 3 callersFunctionLoadPasswordEncryptionPrivateKey
LoadPasswordEncryptionPrivateKey validates a persisted key before replacing the active in-memory key used by request handlers.
common/password_crypto.go:50
↓ 3 callersFunctionLoadTaskArtifactAccessLimits
LoadTaskArtifactAccessLimits reads startup configuration. Invalid and non-positive values safely fall back to the documented defaults.
setting/system_setting/task_artifact.go:37
↓ 3 callersFunctionLogError
(message string)
relaykit/relayconvert/kitutil/log.go:45
↓ 3 callersFunctionLogQuotaData
(params QuotaDataLogParams)
model/usedata.go:84
↓ 3 callersFunctionLogTaskConsumption
LogTaskConsumption 记录任务消费日志和统计信息(仅记录,不涉及实际扣费)。 实际扣费已由 BillingSession(PreConsumeBilling + SettleBilling)完成。
service/task_billing.go:26
↓ 3 callersFunctionLookupRequestConverter
(converter string)
relaykit/relayconvert/request_registry.go:146
↓ 3 callersMethodMatchPath
MatchPath returns the first route whose IncomingPath matches requestPath. Matching mirrors the relay adaptor: exact match, {model} placeholder, and :g
relaykit/dto/channel_settings.go:266
↓ 3 callersMethodMatchesName
MatchesName applies a metadata rule to a concrete channel model name.
model/model_meta.go:64
↓ 3 callersMethodMergePublic
(values map[string]any)
model/log_other.go:73
↓ 3 callersFunctionMigrateSensitiveWords
MigrateSensitiveWords moves the words of the retired sensitive word check into one global request-filter instance and deletes the check's options. The
model/sensitive_word_migration.go:28
↓ 3 callersMethodModelListRoute
ModelListRoute returns the /v1/models relay route, with the converter as the manifest declares it.
pkg/jsplugin/registry.go:264
↓ 3 callersFunctionModelPriceHelperPerCall
ModelPriceHelperPerCall 按次/按量计费的 PriceHelper (MJ、Task)
relay/helper/price.go:213
↓ 3 callersFunctionNativeRouteCredential
NativeRouteCredential accepts, on the native routes of the built-in plugins listed here, the vendor's official API-key form as the gateway token and r
middleware/task_plugin.go:68
↓ 3 callersFunctionNewNotify
(t string, title string, content string, values []any)
relaykit/dto/notify.go:18
↓ 3 callersFunctionNewResponsesBufferedAccumulator
()
relaykit/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:672
↓ 3 callersFunctionNewSSRFProtectionFromFetchSetting
NewSSRFProtectionFromFetchSetting builds an SSRFProtection from persisted fetch_setting values.
common/ssrf_protection.go:34
↓ 3 callersFunctionNewTelegramProvider
NewTelegramProvider shares the HTTP client with a long-lived, cached JWKS verifier. Tests can exercise the real protocol using a local HTTP transport.
oauth/telegram.go:93
↓ 3 callersMethodNormalizeDefaults
()
model/subscription.go:216
↓ 3 callersFunctionNormalizeGeminiThinkingConfig
NormalizeGeminiThinkingConfig rewrites a provider-native thinkingConfig in place into the dialect the target model accepts: budgets become levels on G
relaykit/relayconvert/reasoning/gemini.go:251
↓ 3 callersFunctionNormalizeHTTPTransportPolicy
NormalizeHTTPTransportPolicy converts channel settings into a safe runtime policy. Invalid stored values never panic; they clamp to defaults and warn
service/http_transport_policy.go:33
↓ 3 callersFunctionNormalizeOrigin
NormalizeOrigin validates and canonicalizes a browser origin. Only an exact scheme/host/effective-port match is meaningful; paths and wildcards are no
common/session_cookie.go:14
↓ 3 callersFunctionNormalizeViolationFeeError
NormalizeViolationFeeError ensures: - if the CSAM marker is present, error.code is set to a stable violation-fee code and skip-retry is enabled. - if
service/violation_fee.go:56
↓ 3 callersFunctionNotifyUser
(userId int, userEmail string, userSetting dto.UserSetting, data dto.Notify)
service/user_notify.go:68
↓ 3 callersFunctionOaiChatToResponsesStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/openai/responses_via_chat.go:66
↓ 3 callersFunctionOaiResponsesCompactionHandler
(c *gin.Context, resp *http.Response)
relay/channel/openai/relay_responses_compact.go:15
↓ 3 callersFunctionOaiResponsesToChatBufferedStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/openai/chat_via_responses.go:58
↓ 3 callersFunctionOaiResponsesToChatStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/openai/chat_via_responses.go:172
↓ 3 callersMethodObserve
Observe records one completed final image output when billable. outputIndex may be nil; when set and nonnegative it participates in dedup.
relay/common/tool_usage.go:145
↓ 3 callersFunctionObserveResponsesOutcome
ObserveResponsesOutcome records the protocol outcome of one Responses event on the stream status for health classification. Only codes and types are k
service/responses_usage.go:121
↓ 3 callersFunctionOpenAIChatRequestToClaudeMessages
(c context.Context, info convmeta.Meta, textRequest dto.GeneralOpenAIRequest)
relaykit/relayconvert/internal/oai_chat/to_claude_messages_req.go:19
↓ 3 callersMethodOutcomeSnapshot
()
relay/common/stream_status.go:173
↓ 3 callersFunctionOverBodyLimit
OverBodyLimit reports whether a body is larger than MAX_REQUEST_BODY_MB, the limit a client body is read with.
relay/requestplugin/relay.go:282
↓ 3 callersFunctionParseAcceptLanguage
ParseAcceptLanguage returns the first language of an Accept-Language header, or "" when the header is absent or states no preference ("*").
i18n/i18n.go:179
↓ 3 callersMethodParseContent
()
relaykit/dto/openai_request.go:742
↓ 3 callersFunctionParseModelModifiers
ParseModelModifiers removes only a contiguous trailing chain of @key:value segments. Other @ characters remain part of the opaque model name.
relaykit/relayconvert/reasoning/suffix.go:41
↓ 3 callersFunctionParseProxyURLRuntime
ParseProxyURLRuntime validates and normalizes a proxy URL for runtime use. The boolean result reports whether a legacy path, query, or fragment was re
common/proxy_url.go:19
↓ 3 callersFunctionPasswordEncryptionPublicKey
PasswordEncryptionPublicKey returns the active key identifier and SPKI PEM public key exposed to browser clients.
common/password_crypto.go:92
↓ 3 callersMethodPendingResponse
PendingResponse is the host-synthesized non-terminal Responses snapshot. Callers must pass a non-terminal task status; completed/failed/incomplete inp
relay/plugin_protocol.go:404
↓ 3 callersFunctionPingData
(c *gin.Context)
relay/helper/common.go:269
↓ 3 callersFunctionPluginLoginNeededStatus
PluginLoginNeededStatus marks a new task plugin channel that has no credential yet as disabled until a login stores one.
service/provider_plugin_login.go:743
↓ 3 callersFunctionPostConsumeQuota
(relayInfo *relaycommon.RelayInfo, quota int, preConsumedQuota int, sendEmail bool)
service/quota.go:435
↓ 3 callersFunctionPrepareImageBillingForRequest
PrepareImageBillingForRequest reserves the effective outbound image quantity before each attempt, including channel retries and parameter overrides. T
service/image_billing.go:19
↓ 3 callersFunctionPreviewModelPricing
PreviewModelPricing resolves a complete editable draft using the same defaults as the saved-price display and conversion. It has no write side effects
model/model_pricing_config.go:227
↓ 3 callersFunctionProcessChannelError
(c *gin.Context, channelError types.ChannelError, err *types.NewAPIError, relayInfo *relaycommon.RelayInfo)
service/relay_error.go:63
↓ 3 callersFunctionPublishCloseChannels
(ctx context.Context, channelIDs []int, reason string)
pkg/wsmanager/wsmanager.go:130
← previousnext →2,201–2,300 of 15,409, ranked by callers