MCPcopy Create free account

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

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

↓ 3 callersFunctionFromGemini
FromGemini reads a native thinkingConfig. A config carrying both a budget and a level is rejected here because the intent alone cannot tell which one
relaykit/relayconvert/reasoning/intent.go:626
↓ 3 callersFunctionGeminiChatStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/gemini/relay-gemini.go:411
↓ 3 callersFunctionGeminiResponsesHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/gemini/relay_responses.go:22
↓ 3 callersFunctionGenerateHMAC
(data string)
common/crypto.go:18
↓ 3 callersFunctionGeneratePasswordEncryptionPrivateKey
GeneratePasswordEncryptionPrivateKey creates the server key used to decrypt browser login passwords. The caller is responsible for persisting the PEM.
common/password_crypto.go:33
↓ 3 callersFunctionGenerateStopResponse
(id string, createAt int64, model string, finishReason string)
relay/helper/common.go:361
↓ 3 callersFunctionGenerateTaskID
GenerateTaskID 生成对外暴露的 task_xxxx 格式 ID
model/task.go:225
↓ 3 callersFunctionGetAllChannels
(startIdx int, num int, selectAll bool, idSort bool, sortOptions ...ChannelSortOptions)
model/channel.go:426
↓ 3 callersFunctionGetAndValidateClaudeRequest
(c *gin.Context)
relay/helper/valid_request.go:315
↓ 3 callersFunctionGetAndValidateResponsesRequest
(c *gin.Context)
relay/helper/valid_request.go:137
↓ 3 callersFunctionGetAndValidateTextRequest
(c *gin.Context, relayMode int)
relay/helper/valid_request.go:338
↓ 3 callersMethodGetAutoGroups
()
model/token.go:39
↓ 3 callersFunctionGetBase64Data
GetBase64Data 获取 base64 编码的数据
service/file_service.go:418
↓ 3 callersMethodGetBase64Data
()
relaykit/types/file_source.go:180
↓ 3 callersMethodGetBillingChannelId
()
model/midjourney.go:182
↓ 3 callersFunctionGetByMJId
(userId int, mjId string)
model/midjourney.go:130
↓ 3 callersFunctionGetByTaskIdsForPlatforms
(userID int, platforms []constant.TaskPlatform, taskIDs []string)
model/task.go:487
↓ 3 callersMethodGetCache
()
relaykit/types/file_source.go:20
↓ 3 callersFunctionGetCacheRatio
GetCacheRatio returns the cache ratio for a model
setting/ratio_setting/cache_ratio.go:164
↓ 3 callersFunctionGetCallbackAddress
()
service/epay.go:8
↓ 3 callersFunctionGetChannelsByTag
(tag string, idSort bool, selectAll bool, sortOptions ...ChannelSortOptions)
model/channel.go:438
↓ 3 callersMethodGetClaudeError
GetClaudeError 从动态错误类型中提取ClaudeError结构
relaykit/dto/claude.go:645
↓ 3 callersFunctionGetCreateCacheRatio
(name string)
setting/ratio_setting/cache_ratio.go:172
↓ 3 callersFunctionGetEffectiveHeaderOverride
(info *RelayInfo)
relay/common/override.go:585
↓ 3 callersMethodGetEfforts
()
relaykit/dto/claude.go:482
↓ 3 callersMethodGetFile
()
relaykit/dto/openai_request.go:560
↓ 3 callersFunctionGetFlowQuotaData
(startTime int64, endTime int64, username string, userID int, role int)
model/usedata_flow.go:25
↓ 3 callersFunctionGetImageRatio
(name string)
setting/ratio_setting/model_ratio.go:660
↓ 3 callersMethodGetIndex
get index
relaykit/dto/claude.go:637
↓ 3 callersMethodGetIsStream
()
relaykit/relayconvert/convmeta/meta.go:28
↓ 3 callersFunctionGetLatestSystemTask
GetLatestSystemTask returns the most recent task row of the given type (any status) so the scheduler can decide whether enough time has elapsed since
model/system_task.go:256
↓ 3 callersFunctionGetLegalSettings
()
setting/system_setting/legal.go:19
↓ 3 callersFunctionGetMimeTypeByExtension
(ext string)
service/file_decoder.go:159
↓ 3 callersMethodGetModelMapping
()
model/channel.go:594
↓ 3 callersFunctionGetModelSquareSetting
()
setting/operation_setting/model_square_setting.go:40
↓ 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:42
↓ 3 callersMethodGetStringContent
()
relaykit/dto/claude.go:152
↓ 3 callersFunctionGetStringIfEmpty
(str string, defaultValue string)
common/str.go:27
↓ 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:401
↓ 3 callersFunctionGetTaskPluginUsage
(key string)
model/task_plugin.go:25
↓ 3 callersMethodGetThinkingTokens
GetThinkingTokens returns the reported reasoning tokens, bounded by output_tokens so the OpenAI reasoning_tokens never exceeds completion_tokens.
relaykit/dto/claude.go:721
↓ 3 callersFunctionGetUserLogs
(userId int, filter LogFilter, startIdx int, num int)
model/log.go:596
↓ 3 callersFunctionGetUserUsedQuota
(id int)
model/user.go:1280
↓ 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.
pluginkit/provider.go:623
↓ 3 callersFunctionHasOpenAIUsageTokens
(usage *Usage)
relaykit/dto/billing_usage.go:77
↓ 3 callersFunctionHasUnfinishedSyncTasks
HasUnfinishedSyncTasks reports whether at least one async (Suno/video) task is still in progress. It is a cheap existence check (LIMIT 1) used to deci
model/task.go:430
↓ 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 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:264
↓ 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 callersMethodJSValueFor
JSValueFor is JSValue for the decode hooks of the plugin meta describes. A plugin that preserves JSON order receives a JSON body as its text, which th
pluginkit/routing.go:294
↓ 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:295
↓ 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:272
↓ 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 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
← previousnext →2,201–2,300 of 15,592, ranked by callers