MCPcopy Create free account

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

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

↓ 5 callersMethodApply
(query *gorm.DB)
model/channel.go:114
↓ 5 callersFunctionApplyHeaderOverride
ApplyHeaderOverride applies the request plugins' header changes, then the channel overrides, after the adaptor's headers. Without a client request, on
relay/channel/api_request.go:303
↓ 5 callersMethodApplyOtherRatiosToFloat
(value float64)
types/price_data.go:93
↓ 5 callersMethodArgumentsString
ArgumentsString returns function call arguments in the string form expected by Chat Completions.
relaykit/dto/openai_response.go:564
↓ 5 callersMethodBindsTaskPlugin
BindsTaskPlugin reports whether the channel is bound to the task plugin, either through the single binding or the New API extension list.
relaykit/dto/channel_settings.go:46
↓ 5 callersFunctionCacheGetRandomSatisfiedChannel
CacheGetRandomSatisfiedChannel tries to get a random channel that satisfies the requirements. 尝试获取一个满足要求的随机渠道。 For "auto" tokenGroup with cross-group
service/channel_select.go:119
↓ 5 callersMethodCallConvertResponse
CallConvertResponse runs convertResponse(ctx, {status, headers, body}) on an upstream response of the route at hookCtx.Path, with bodyBase64 in place
pluginkit/provider.go:1076
↓ 5 callersMethodCallLogin
CallLogin runs login(ctx, input). credential is the wrapper data when the administrator logs in again on an existing credential.
pluginkit/provider.go:297
↓ 5 callersMethodCallMember
CallMember invokes a function stored on an exported object, such as a renderer in the renderers export.
pluginkit/engine.go:355
↓ 5 callersMethodCanonicalModel
CanonicalModel returns the declared spelling for model. An exact byModel hit wins and returns the input unchanged; otherwise the ASCII-folded index is
pkg/jsplugin/routing.go:178
↓ 5 callersFunctionCapabilities
Capabilities returns the full resource/action matrix the subject is allowed.
service/authz/resolver.go:38
↓ 5 callersMethodChannelRelayRoute
ChannelRelayRoute is RelayRoute among the routes that serve a channel whose plugin_routes are toggles. Another route of the same path still matches wh
pluginkit/meta.go:308
↓ 5 callersFunctionChatCompletionsResponseToResponsesResponse
(resp *dto.OpenAITextResponse, id string)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_resp.go:42
↓ 5 callersFunctionClearCurrentChannelAffinityCache
(c *gin.Context)
service/channel_affinity.go:651
↓ 5 callersMethodConvert
(response *dto.ClaudeResponse, state *ResponseStreamState)
relaykit/relayconvert/response_compat.go:85
↓ 5 callersMethodConvertChunk
ConvertChunk accumulates OpenAI tool-call deltas until their choice ends. Gemini functionCall parts are atomic, so emitting each OpenAI arguments frag
relaykit/relayconvert/internal/oai_chat/to_gemini_chat_resp.go:234
↓ 5 callersMethodConvertEmbeddingRequest
(c *gin.Context, info *relaycommon.RelayInfo, request dto.EmbeddingRequest)
relay/channel/adapter.go:25
↓ 5 callersFunctionConvertRequestByID
(c *gin.Context, info *relaycommon.RelayInfo, converter string, request any)
service/request_converter.go:34
↓ 5 callersFunctionCurrentRequestPolicy
()
model/request_policy.go:72
↓ 5 callersMethodDatabaseTypeName
()
model/migration_dialector.go:112
↓ 5 callersFunctionDecodeEffects
DecodeEffects reads the effects array of prepareRequest from its JSON text: json.patch and header.patch. Unknown members are rejected.
pkg/requestpatch/patch.go:78
↓ 5 callersMethodDecodePayload
(v any)
model/system_task.go:564
↓ 5 callersMethodDefinedModes
DefinedModes returns each distinct mode on the protocol in host-table order.
pluginkit/routing.go:134
↓ 5 callersFunctionDeleteUserAccessToken
DeleteUserAccessToken hard-deletes one token owned by userID and returns the deleted row for auditing.
model/user_access_token.go:169
↓ 5 callersMethodDiagnostics
Diagnostics returns every conversion-loss diagnostic observed so far. This remains available even when a source event produces no target stream chunk.
relaykit/relayconvert/response_registry.go:468
↓ 5 callersFunctionDispatchPlatformUpdate
DispatchPlatformUpdate 按平台分发轮询更新
service/task_polling.go:238
↓ 5 callersFunctionDoRequest
(c *gin.Context, req *http.Request, info *common.RelayInfo)
relay/channel/api_request.go:528
↓ 5 callersMethodDoResponse
(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo)
relay/channel/advancedcustom/adaptor.go:325
↓ 5 callersFunctionEnableWorker
()
setting/system_setting/system_setting_old.go:9
↓ 5 callersFunctionErrOptionWithNoRecordErrorLog
()
relaykit/types/error.go:395
↓ 5 callersFunctionFinalizeChatCompletionsStreamToResponses
(state *ChatToResponsesStreamState)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:387
↓ 5 callersFunctionFormatRootLogs
FormatRootLogs normalizes legacy metadata into the current scoped shape without removing root-only diagnostics.
model/log.go:133
↓ 5 callersFunctionFreshPluginCredentialLine
FreshPluginCredentialLine returns the line a request about to use the credential line at keyIndex sends: the line, or its refresh when it expires with
service/provider_plugin.go:383
↓ 5 callersFunctionFromOpenAIResponses
(req *dto.OpenAIResponsesRequest)
relaykit/relayconvert/reasoning/intent.go:513
↓ 5 callersFunctionGeminiTextGenerationHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/gemini/relay-gemini-native.go:21
↓ 5 callersFunctionGenRelayInfo
(c *gin.Context, relayFormat types.RelayFormat, request dto.Request, ws *websocket.Conn)
relay/common/relay_info.go:712
↓ 5 callersFunctionGetAudioCompletionRatio
(name string)
setting/ratio_setting/model_ratio.go:619
↓ 5 callersFunctionGetAudioRatio
(name string)
setting/ratio_setting/model_ratio.go:611
↓ 5 callersFunctionGetBuiltinBillingExpr
(model string)
setting/billing_setting/tiered_billing.go:81
↓ 5 callersFunctionGetChannel
( group string, model string, retry int, filters []dto.ChannelFilter, )
model/ability.go:120
↓ 5 callersFunctionGetChannelPollingLock
GetChannelPollingLock returns or creates a mutex for the given channel ID
model/channel.go:704
↓ 5 callersFunctionGetConsoleSetting
GetConsoleSetting 获取 ConsoleSetting 配置实例
setting/console_setting/config.go:37
↓ 5 callersFunctionGetDiskCacheDir
GetDiskCacheDir 获取统一的磁盘缓存目录 注意:每次调用都会重新计算,以响应配置变化
common/disk_cache.go:25
↓ 5 callersFunctionGetEmailBinding
(identity AuthSessionIdentity, token string)
model/email_binding.go:59
↓ 5 callersFunctionGetEndpointTypesByChannelType
GetEndpointTypesByChannelType 获取渠道最优先端点类型(所有的渠道都支持 OpenAI 端点)
common/endpoint_type.go:6
↓ 5 callersMethodGetErrorType
()
relaykit/types/error.go:119
↓ 5 callersFunctionGetGroupGroupRatio
(userGroup, usingGroup string)
setting/ratio_setting/group_ratio.go:88
↓ 5 callersFunctionGetJsonType
(data RawMessage)
common/json.go:106
↓ 5 callersFunctionGetLatestSystemTasks
(taskTypes []string)
model/system_task.go:308
↓ 5 callersMethodGetMaskedKey
()
model/token.go:84
↓ 5 callersFunctionGetModelPricingIssues
GetModelPricingIssues reads the provider variants of the pricing snapshot for every model a live plugin declares and an enabled channel serves, and ev
model/model_pricing_config.go:382
↓ 5 callersMethodGetName
GetName returns the display name of the provider (e.g., "GitHub", "Discord")
oauth/provider.go:13
↓ 5 callersMethodGetOpenAIError
GetOpenAIError 从动态错误类型中提取OpenAIError结构
relaykit/dto/openai_response.go:22
↓ 5 callersFunctionGetSelfUserById
GetSelfUserById reads dashboard profile data and password existence in one query. The password hash and management access token are never selected.
model/user.go:523
↓ 5 callersMethodGetStringSystem
()
relaykit/dto/claude.go:593
↓ 5 callersFunctionGetTokenById
(id int)
model/token.go:274
↓ 5 callersFunctionGetTokenByIds
(id int, userId int)
model/token.go:264
↓ 5 callersFunctionGetUserOAuthBindingsByUserId
GetUserOAuthBindingsByUserId returns all OAuth bindings for a user
model/user_oauth_binding.go:24
↓ 5 callersFunctionGetUserVerificationState
(userID int)
model/login_verification.go:23
↓ 5 callersFunctionHandleGroupRatio
HandleGroupRatio checks for "auto_group" in the context and updates the group ratio and relayInfo.UsingGroup if present
relay/helper/price.go:37
↓ 5 callersFunctionHandleStreamFinalResponse
(c *gin.Context, info *relaycommon.RelayInfo, claudeInfo *ClaudeResponseInfo)
relay/channel/claude/relay-claude.go:275
↓ 5 callersMethodHasCallablePath
HasCallablePath reports whether an exported value, or a nested member below it, exists and is callable.
pluginkit/engine.go:281
↓ 5 callersFunctionHashBackupCode
HashBackupCode 对备用码进行哈希
common/totp.go:110
↓ 5 callersFunctionHostProtocol
(name string)
pluginkit/routing.go:107
↓ 5 callersFunctionIcon
Icon returns the embedded sidecar logo for a factory plugin, if the plugin directory ships an icon.svg or icon.png next to plugin.js.
plugins/embed.go:51
↓ 5 callersMethodIncreaseRetry
()
service/channel_select.go:69
↓ 5 callersMethodIncrementFailedAttempts
IncrementFailedAttempts 增加失败尝试次数
model/twofa.go:84
↓ 5 callersMethodInfo
(context.Context, string, ...any)
model/user_session_migration_test.go:37
↓ 5 callersMethodInit
Init initializes the limiter once. Repeated calls leave the first configuration unchanged.
common/rate-limit.go:82
↓ 5 callersFunctionInitializeExternalIdentityClaims
InitializeExternalIdentityClaims imports legacy Telegram bindings after the claim table is migrated. Existing duplicate ownership fails migration rath
model/external_identity_claim.go:121
↓ 5 callersMethodInsert
()
model/subscription.go:242
↓ 5 callersFunctionIntentFromState
IntentFromState reconstructs a portable intent from host- or pivot-carried conversion state. A nil state is an empty intent.
relaykit/relayconvert/reasoning/intent.go:96
↓ 5 callersMethodIsLocked
IsLocked 检查账户是否被锁定
model/twofa.go:137
↓ 5 callersFunctionIsPasskeyDomainOption
ServerAddress and origins participate because either can change an implicit RP ID.
model/passkey_option.go:46
↓ 5 callersFunctionIsRequestPolicyOption
(key string)
model/request_policy.go:61
↓ 5 callersFunctionJsonRawMessageToString
JsonRawMessageToString returns JSON strings as their decoded value and other JSON values as raw text.
relaykit/relayconvert/kitutil/json.go:112
↓ 5 callersMethodKeywordFields
KeywordFields returns the names of the keywords format properties.
pluginkit/config_schema.go:455
↓ 5 callersFunctionListModels
(c *gin.Context, modelType int)
controller/model.go:233
↓ 5 callersFunctionListUserAccessTokens
(userID int)
model/user_access_token.go:112
↓ 5 callersFunctionLoadFileSource
LoadFileSource 加载文件源数据 这是统一的入口,会自动处理缓存和不同的来源类型
service/file_service.go:47
↓ 5 callersFunctionLoadOptionsFromDatabase
LoadOptionsFromDatabase applies every stored option. A failed read keeps the options in memory as they are.
model/option.go:200
↓ 5 callersFunctionMaskSensitiveInfo
MaskSensitiveInfo masks the upstream addresses in str and leaves every other URL and domain readable. upstreamURLs are the channel base URL and the UR
relaykit/relayconvert/kitutil/mask.go:102
↓ 5 callersFunctionMergeClaudeUsageNonZero
(current *ClaudeUsage, incoming *ClaudeUsage)
relaykit/dto/usage_merge.go:151
↓ 5 callersFunctionMergeExplicitAndSuffix
MergeExplicitAndSuffix combines structured request fields with a model-name alias or @ modifier. The model name wins wherever the two disagree: it is
relaykit/relayconvert/reasoning/intent.go:217
↓ 5 callersFunctionMergeGeminiUsageMetadataNonZero
MergeGeminiUsageMetadataNonZero overlays Gemini's cumulative usage snapshots: a later non-zero field overwrites the current value without dropping fie
relaykit/dto/usage_merge.go:224
↓ 5 callersFunctionMessageWithRequestId
(message string, id string)
common/utils.go:268
↓ 5 callersFunctionMigrateAuditLogs
MigrateAuditLogs also supports independently configured ClickHouse log stores. No TTL clause or usage-log cleanup integration is intentional.
model/audit_log.go:251
↓ 5 callersFunctionModelFamily
ModelFamily classifies a model name, case-insensitively. Vendor prefixes and date suffixes are allowed (for example us.anthropic.claude-opus-4-7-v1:0)
tokenkit/tokenkit.go:31
↓ 5 callersFunctionNamespacedToolName
NamespacedToolName is the upstream function name of a tool declared in a Responses tool namespace: "<namespace>__<name>", or the bare name for the def
relaykit/relayconvert/convmeta/meta.go:118
↓ 5 callersFunctionNewChatToResponsesStreamState
(id string, model string)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:112
↓ 5 callersFunctionNewEstimatedGeminiChatBillingUsage
(usage *Usage)
relaykit/dto/billing_usage.go:124
↓ 5 callersFunctionNewFileSourceFromData
(data string, mimeType string)
relaykit/types/file_source.go:134
↓ 5 callersFunctionNewGenericOAuthProvider
NewGenericOAuthProvider creates a new generic OAuth provider from config
oauth/generic.go:73
↓ 5 callersFunctionNewRWMap
()
types/rw_map.go:27
↓ 5 callersFunctionNewRequestId
()
common/utils.go:256
↓ 5 callersFunctionNewSystemTaskProgressReporter
NewSystemTaskProgressReporter returns a throttled progress callback bound to a running task. Handlers call it with (processed, total) as they iterate
service/system_task.go:479
↓ 5 callersFunctionNewUserSortOptions
(sortBy string, sortOrder string)
model/user.go:36
↓ 5 callersFunctionNormalizeResponsesWebSearchAction
NormalizeResponsesWebSearchAction validates and canonicalizes the current Responses web_search_call action union. Claude emits {"query": ...}; the Res
relaykit/dto/openai_response.go:495
↓ 5 callersFunctionNotifyChannelWatchers
NotifyChannelWatchers sends a channel notice (a channel disabled or enabled automatically, or a test of all channels finished) to every administrator
service/user_notify.go:21
↓ 5 callersFunctionOaiStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/openai/relay-openai.go:105
← previousnext →1,301–1,400 of 15,592, ranked by callers