MCPcopy Create free account

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

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

↓ 4 callersMethodAddPolicy
(_ string, ptype string, rule []string)
service/authz/adapter.go:79
↓ 4 callersFunctionAddToken
(c *gin.Context)
controller/token.go:299
↓ 4 callersFunctionAdminResetUserSubscriptionsByPlan
(userId int, planId int, advanceResetTime bool)
model/subscription.go:1109
↓ 4 callersMethodAppendRequestConversion
AppendRequestConversion records a hop in the request format chain.
relaykit/relayconvert/convmeta/meta.go:60
↓ 4 callersFunctionAppendUsedChannel
AppendUsedChannel records an attempted channel in the request's channel trail, which the retry log and the consume log's admin_info both read.
service/channel_select.go:415
↓ 4 callersMethodApply
Apply accepts a bounded batch of set, append and appendText operations. Failure invalidates the stream: callers must discard the state rather than con
pkg/jsplugin/json_state.go:259
↓ 4 callersFunctionApplyToOpenAIResponses
ApplyToOpenAIResponses writes the portable portion of an intent directly to a Responses request. The JSON-excluded state retains exact provider-native
relaykit/relayconvert/reasoning/intent.go:480
↓ 4 callersFunctionBodyStorageCleanup
BodyStorageCleanup 请求体存储清理中间件 在请求处理完成后自动清理磁盘/内存缓存
middleware/body_cleanup.go:11
↓ 4 callersFunctionBuildTaskArtifactContentURL
BuildTaskArtifactContentURL returns an absolute, long-lived capability URL. TaskPublicAddress wins when configured; ServerAddress is the only fallback
service/task_artifact_access.go:98
↓ 4 callersFunctionCacheUpdateChannelKey
CacheUpdateChannelKey publishes a new key for a cached channel. The cached channel is replaced by a copy, so a request holding the previous one keeps
model/channel_plugin_credential.go:201
↓ 4 callersMethodCacheWrite12hTokens
CacheWrite12hTokens returns the 12-hour subset of the cache writes, bounded by CacheCreationTokensTotal so it never bills more writes than reported.
relaykit/dto/openai_response.go:348
↓ 4 callersMethodCallConvertRequest
CallConvertRequest runs convertRequest(ctx, {body, model, stream}), or convertRequest(ctx, {form, model, stream}) for a multipart client request.
pkg/jsplugin/provider.go:666
↓ 4 callersMethodCallConvertStreamEvent
CallConvertStreamEvent runs convertStreamEvent(ctx, {event?, data}) on the stream of the route at hookCtx.Path, {dataBase64} for a binary frame, or wi
pkg/jsplugin/provider.go:1274
↓ 4 callersFunctionCallID
(item map[string]any)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_req.go:589
↓ 4 callersMethodCallPrepareRequest
CallPrepareRequest runs prepareRequest(ctx, req).
pkg/jsplugin/provider.go:497
↓ 4 callersMethodCallReply
CallReply runs the reply hook with tctx.Stage "reply" on outputs and checks the result: each mask names an output of the call and lies within its text
pkg/jsplugin/transform.go:470
↓ 4 callersMethodCallScheduled
CallScheduled runs scheduled(ctx). The caller checks the stored credential line's size and applies the result while holding the channel lock.
pkg/jsplugin/provider.go:370
↓ 4 callersFunctionCatalog
Catalog returns a copy of the registered resource definitions.
service/authz/registry.go:29
↓ 4 callersFunctionClassifyRelayOutcome
ClassifyRelayOutcome decides whether one finished relay counts as a health sample. Business rejections and cancellations during generation are not sam
pkg/perf_metrics/outcome.go:26
↓ 4 callersFunctionClaudeData
(c *gin.Context, resp dto.ClaudeResponse)
relay/helper/common.go:214
↓ 4 callersFunctionCleanupBodyStorage
CleanupBodyStorage 清理请求体存储(应在请求结束时调用)
common/gin.go:110
↓ 4 callersFunctionClearRefreshCookie
(c *gin.Context)
service/auth_session.go:346
↓ 4 callersFunctionCloseActiveWebSocketsForChannel
(channelID int, reason string)
service/ws_close.go:7
↓ 4 callersFunctionCloseChannel
(channelID int, reason string)
pkg/wsmanager/wsmanager.go:89
↓ 4 callersFunctionContentPartToFileSource
(part map[string]any)
relaykit/relayconvert/internal/oai_responses/req_helpers.go:241
↓ 4 callersFunctionCountUserSubscriptionsByPlan
(userId int, planId int)
model/subscription.go:425
↓ 4 callersFunctionCovertMjpActionToModelName
(mjAction string)
service/midjourney.go:25
↓ 4 callersFunctionCreateUserSubscriptionFromPlanTx
(tx *gorm.DB, userId int, plan *SubscriptionPlan, source string)
model/subscription.go:496
↓ 4 callersFunctionDecodeIconDataURI
DecodeIconDataURI parses a plugin logo shipped as a sidecar icon.svg or icon.png file and re-encoded by the uploader as data:image/png;base64,... or d
pkg/jsplugin/icon.go:28
↓ 4 callersFunctionDecreaseTokenQuota
(id int, key string, quota int)
model/token.go:413
↓ 4 callersFunctionDecrementDiskFiles
DecrementDiskFiles 减少磁盘文件计数
common/disk_cache_config.go:115
↓ 4 callersFunctionDeleteJSONMember
DeleteJSONMember removes every copy of the member at path. A client body may repeat a key, and most upstream parsers read the last copy, so a survivin
relay/common/relay_info.go:1165
↓ 4 callersFunctionDeleteModelMetadata
DeleteModelMetadata optionally removes exact model names from every channel. Channel removal requires exact-match metadata records. Pricing removal cl
model/model_meta.go:285
↓ 4 callersFunctionDoDownloadRequest
(originUrl string, reason ...string)
service/download.go:52
↓ 4 callersMethodDoRequest
(c *gin.Context, info *relaycommon.RelayInfo, requestBody io.Reader)
relay/channel/aws/adaptor.go:139
↓ 4 callersMethodDoResponse
(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo)
relay/channel/advancedcustom/adaptor.go:315
↓ 4 callersFunctionDoWorkerRequest
DoWorkerRequest 通过Worker发送请求
service/download.go:24
↓ 4 callersMethodEffectiveRPID
EffectiveRPID preserves the existing default and port handling for settings created before explicit Passkey domains were introduced.
setting/system_setting/passkey.go:41
↓ 4 callersMethodEnabled
()
service/task_artifact_store.go:27
↓ 4 callersFunctionEnqueueSystemTask
EnqueueSystemTask creates an on-demand task of the given type. The returned bool is true only when a new pending row was created; false means an activ
service/system_task.go:202
↓ 4 callersFunctionExprVersion
ExprVersion returns the version of a cached expression. Returns DefaultExprVersion if the expression hasn't been compiled yet or is empty.
pkg/billingexpr/compile.go:242
↓ 4 callersMethodFinalize
(state *ResponseStreamState)
relaykit/relayconvert/response_compat.go:73
↓ 4 callersFunctionFindUserAccessTokenByHash
(hash string)
model/user_access_token.go:85
↓ 4 callersFunctionFinishEmailBinding
(identity AuthIdentity, token, newCode, oldCode string)
service/email_binding.go:129
↓ 4 callersFunctionFinishTwoFASetup
(identity AuthIdentity, flowToken, code string)
service/twofa.go:43
↓ 4 callersMethodFlush
()
router/plugin-router.go:560
↓ 4 callersMethodFullKey
(key string)
pkg/cachex/hybrid_cache.go:55
↓ 4 callersFunctionGenerateSystemTaskID
()
model/system_task.go:94
↓ 4 callersFunctionGetAdvancedCustomPreset
GetAdvancedCustomPreset returns fresh defaults.
common/advanced_custom_presets.go:9
↓ 4 callersFunctionGetChannel
( group string, model string, retry int, filters []dto.ChannelFilter, )
model/ability.go:108
↓ 4 callersFunctionGetChannelAffinityUsageCacheStats
(ruleName, usingGroup, keyFp string)
service/channel_affinity.go:809
↓ 4 callersMethodGetChannelType
()
relaykit/relayconvert/convmeta/meta.go:27
↓ 4 callersFunctionGetCheckinSetting
GetCheckinSetting 获取签到配置
setting/operation_setting/checkin_setting.go:25
↓ 4 callersFunctionGetCustomOAuthProviderById
GetCustomOAuthProviderById returns a custom OAuth provider by ID
model/custom_oauth_provider.go:90
↓ 4 callersFunctionGetDiscordSettings
()
setting/system_setting/discord.go:19
↓ 4 callersFunctionGetDiskCacheThresholdBytes
GetDiskCacheThresholdBytes 获取磁盘缓存阈值(字节)
common/disk_cache_config.go:51
↓ 4 callersMethodGetEffectiveDisplayName
GetEffectiveDisplayName returns the admin-configured display name, or the literal "OIDC" when none has been set. Centralizing this fallback keeps the
setting/system_setting/oidc.go:36
↓ 4 callersFunctionGetEnabledModels
()
model/ability.go:50
↓ 4 callersFunctionGetEnvOrDefaultBool
(env string, defaultValue bool)
common/env.go:27
↓ 4 callersMethodGetFullKey
()
model/token.go:80
↓ 4 callersFunctionGetGroupRatio
(name string)
setting/ratio_setting/group_ratio.go:79
↓ 4 callersFunctionGetLatestSyncRevisions
GetLatestSyncRevisions returns the id of the newest sync task of every topic that has one. A node reads it before its startup loads, before it knows w
model/system_sync_task.go:83
↓ 4 callersFunctionGetLogSetting
()
setting/operation_setting/log_setting.go:31
↓ 4 callersFunctionGetOpenAIError
GetOpenAIError 从动态错误类型中提取OpenAIError结构
relaykit/dto/openai_response.go:636
↓ 4 callersFunctionGetOptions
(c *gin.Context)
controller/option.go:84
↓ 4 callersMethodGetPage
()
common/page_info.go:29
↓ 4 callersMethodGetPreConsumedQuota
GetPreConsumedQuota 返回实际预扣的额度值(信任用户可能为 0)。
relay/common/billing.go:20
↓ 4 callersFunctionGetProvider
GetProvider returns the OAuth provider for the given name
oauth/registry.go:63
↓ 4 callersMethodGetProviderId
GetProviderId returns the provider ID for binding purposes
oauth/generic.go:316
↓ 4 callersMethodGetSetting
()
model/user_cache.go:50
↓ 4 callersFunctionGetTimestamp
()
relaykit/relayconvert/kitutil/value.go:50
↓ 4 callersFunctionGetToolPrice
GetToolPrice is a convenience wrapper when no model name is needed.
setting/operation_setting/tools.go:279
↓ 4 callersFunctionGetUnusedBackupCodeCount
GetUnusedBackupCodeCount 获取未使用的备用码数量
model/twofa.go:231
↓ 4 callersFunctionGetUserAutoGroup
GetUserAutoGroup 根据用户分组获取自动分组设置
service/group.go:57
↓ 4 callersFunctionGetUserSetting
GetUserSetting gets setting from Redis first, falls back to DB if needed
model/user.go:1303
↓ 4 callersFunctionHandleStreamResponseData
(c *gin.Context, info *relaycommon.RelayInfo, claudeInfo *ClaudeResponseInfo, data string)
relay/channel/claude/relay-claude.go:89
↓ 4 callersMethodHasIcon
HasIcon reports whether this version ships a logo.
model/task_plugin.go:103
↓ 4 callersMethodHasOtherRatio
(key string)
types/price_data.go:62
↓ 4 callersMethodImageCount
ImageCount resolves the validated request quantity. Top-level zero retains its legacy default of one; an explicit provider count must be positive.
relaykit/dto/openai_image.go:60
↓ 4 callersMethodIncrSendResponseCount
()
relaykit/relayconvert/convmeta/meta.go:57
↓ 4 callersFunctionIncrementDiskFiles
IncrementDiskFiles 增加磁盘文件计数
common/disk_cache_config.go:109
↓ 4 callersMethodInit
(info *relaycommon.RelayInfo)
relay/channel/aws/adaptor.go:83
↓ 4 callersFunctionInitTask
(platform constant.TaskPlatform, relayInfo *commonRelay.RelayInfo)
model/task.go:269
↓ 4 callersFunctionInjectTieredBillingInfo
InjectTieredBillingInfo overlays tiered billing fields onto an existing module-specific other map. Call this after GenerateTextOtherInfo / GenerateCla
service/log_info_generate.go:350
↓ 4 callersMethodInsert
()
model/model_meta.go:236
↓ 4 callersMethodInsert
(inviterId int)
model/user.go:675
↓ 4 callersMethodInsert
()
model/token.go:307
↓ 4 callersFunctionInvalidateSubscriptionPlanCache
InvalidateSubscriptionPlanCache drops a plan written on this node from the cache and tells the other nodes to drop their copies.
model/subscription.go:137
↓ 4 callersFunctionIsAlwaysSkipRetryStatusCode
(code int)
setting/operation_setting/status_code_ranges.go:70
↓ 4 callersMethodIsCustomTool
IsCustomTool reports whether name was encoded from a Responses custom tool.
relaykit/relayconvert/convmeta/meta.go:126
↓ 4 callersFunctionIsDiskCacheEnabled
IsDiskCacheEnabled 是否启用磁盘缓存
common/disk_cache_config.go:44
↓ 4 callersMethodIsEnabled
IsEnabled returns whether this OAuth provider is enabled
oauth/provider.go:16
↓ 4 callersFunctionIsQwenThinkingBudgetModel
(modelName string)
relaykit/dto/openai_request.go:395
↓ 4 callersFunctionIsRequestBodyTooLargeError
(err error)
common/gin.go:29
↓ 4 callersMethodIsStream
(c *http.Request)
relaykit/dto/request_common.go:10
↓ 4 callersMethodIsToolCall
()
relaykit/dto/openai_response.go:164
↓ 4 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
pkg/jsplugin/routing.go:375
↓ 4 callersFunctionLegacyAccessTokenRetireAt
()
model/user_access_token.go:322
↓ 4 callersFunctionListSystemInstances
()
model/system_instance.go:72
↓ 4 callersFunctionLocalLogPreview
LocalLogPreview limits log-only content unless debug logging is enabled.
common/str.go:20
← previousnext →1,601–1,700 of 15,409, ranked by callers