MCPcopy Create free account

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

Functions9,195 in github.com/QuantumNous/new-api

↓ 2 callersFunctionIsChannelEnabledForGroupModel
(group string, modelName string, channelID int)
model/channel_satisfy.go:8
↓ 2 callersFunctionIsChannelError
(err *NewAPIError)
types/error.go:366
↓ 2 callersFunctionIsCustomProvider
IsCustomProvider checks if a provider is a custom provider
oauth/registry.go:83
↓ 2 callersMethodIsDisk
IsDisk 是否是磁盘存储
common/body_storage.go:22
↓ 2 callersMethodIsEnabled
IsEnabled returns whether this OAuth provider is enabled
oauth/provider.go:16
↓ 2 callersFunctionIsExposeRatioEnabled
()
setting/ratio_setting/expose_ratio.go:15
↓ 2 callersFunctionIsGeminiModelSupportImagine
(model string)
setting/model_setting/gemini.go:71
↓ 2 callersMethodIsIPAccessAllowed
IsIPAccessAllowed 检查IP是否允许访问
common/ssrf_protection.go:255
↓ 2 callersFunctionIsIpInCIDRList
(ip net.IP, cidrList []string)
common/ip.go:33
↓ 2 callersFunctionIsModelNameDuplicated
(id int, name string)
model/model_meta.go:68
↓ 2 callersFunctionIsOpenAIGPT5Model
(modelName string)
dto/openai_request.go:222
↓ 2 callersFunctionIsPrefillGroupNameDuplicated
IsPrefillGroupNameDuplicated 检查组名称是否重复(排除自身 ID)
model/prefill_group.go:96
↓ 2 callersFunctionIsProviderRegistered
IsProviderRegistered checks if a provider is registered
oauth/registry.go:75
↓ 2 callersFunctionIsProviderUserIdTaken
IsProviderUserIdTaken checks if a provider user ID is already bound to any user
model/user_oauth_binding.go:57
↓ 2 callersFunctionIsRunningInContainer
IsRunningInContainer detects if the application is running inside a container
common/utils.go:97
↓ 2 callersFunctionIsSlugTaken
IsSlugTaken checks if a slug is already taken by another provider Returns true on DB errors (fail-closed) to prevent slug conflicts
model/custom_oauth_provider.go:134
↓ 2 callersFunctionIsSupported
IsSupported checks if a language code is supported
i18n/i18n.go:223
↓ 2 callersMethodIsURL
()
types/file_source.go:14
↓ 2 callersMethodIsUserIDTaken
IsUserIDTaken checks if the provider user ID is already associated with an account
oauth/provider.go:26
↓ 2 callersFunctionIsVendorNameDuplicated
IsVendorNameDuplicated 检查供应商名称是否重复(排除自身 ID)
model/vendor_meta.go:35
↓ 2 callersFunctionIsWeChatIdAlreadyTaken
(wechatId string)
model/user.go:1052
↓ 2 callersFunctionJSONString
(raw json.RawMessage)
service/relayconvert/internal/oai_responses/to_oai_chat_req.go:547
↓ 2 callersFunctionJsonRawMessageToString
JsonRawMessageToString returns JSON strings as their decoded value and other JSON values as raw text.
common/json.go:48
↓ 2 callersMethodListDeployments
ListDeployments retrieves a list of deployments with optional filtering
pkg/ionet/deployment.go:56
↓ 2 callersFunctionListWaffoPancakeCatalog
ListWaffoPancakeCatalog queries Pancake's GraphQL `stores` for the merchant's stores + onetime products. A successful call also proves the supplied cr
service/waffo_pancake.go:436
↓ 2 callersFunctionLoadCustomProviders
LoadCustomProviders loads all custom OAuth providers from the database
oauth/registry.go:90
↓ 2 callersFunctionLoadToolPricesFromJSONString
LoadToolPricesFromJSONString replaces the complete operator price map. Invalid legacy entries are ignored individually so valid sibling overrides surv
setting/operation_setting/tools.go:137
↓ 2 callersFunctionMarkSystemTaskLeaseExpired
(taskID string)
model/system_task.go:348
↓ 2 callersMethodMatchPattern
()
pkg/cachex/namespace.go:32
↓ 2 callersFunctionModelPrice2JSONString
()
setting/ratio_setting/model_ratio.go:351
↓ 2 callersFunctionModelRatio2JSONString
()
setting/ratio_setting/model_ratio.go:651
↓ 2 callersFunctionNewClientWithConfig
NewClientWithConfig creates a new IO.NET API client with custom configuration
pkg/ionet/client.go:84
↓ 2 callersFunctionNewDiskCachedData
(diskPath string, mimeType string, size int64)
types/file_source.go:171
↓ 2 callersFunctionNewEnterpriseClient
NewEnterpriseClient creates a new IO.NET API client targeting the enterprise API base URL.
pkg/ionet/client.go:74
↓ 2 callersFunctionNewGenericOAuthProvider
NewGenericOAuthProvider creates a new generic OAuth provider from config
oauth/generic.go:74
↓ 2 callersFunctionNewMemoryCachedData
(base64Data string, mimeType string, size int64)
types/file_source.go:162
↓ 2 callersFunctionNewMessage
(msgType MsgType, flag MsgTypeFlagBits)
relay/channel/volcengine/protocols.go:245
↓ 2 callersFunctionNewProxyHttpClient
NewProxyHttpClient is kept for compatibility. Deprecated: use GetHttpClientWithProxy.
service/http_client.go:308
↓ 2 callersFunctionNewResponsesBufferedAccumulator
()
service/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:573
↓ 2 callersFunctionNormalizeBackupCode
NormalizeBackupCode 标准化备用码格式
common/totp.go:100
↓ 2 callersFunctionNormalizeBillingPreference
NormalizeBillingPreference clamps the billing preference to valid values.
common/str.go:121
↓ 2 callersFunctionNormalizeCacheCreationSplit
(totalTokens int, tokens5m int, tokens1h int)
service/relayconvert/internal/oai_chat/to_claude_messages_resp.go:70
↓ 2 callersFunctionNormalizeChannelGroupFilter
(group string)
model/channel.go:132
↓ 2 callersFunctionOaiChatToResponsesStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/openai/responses_via_chat.go:65
↓ 2 callersFunctionOaiResponsesCompactionHandler
(c *gin.Context, resp *http.Response)
relay/channel/openai/relay_responses_compact.go:15
↓ 2 callersFunctionOaiResponsesToChatStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/openai/chat_via_responses.go:188
↓ 2 callersFunctionObjectValue
(value any, fallbackKey string)
service/relayconvert/internal/oai_responses/req_helpers.go:165
↓ 2 callersFunctionOpenAIChatRequestToClaudeMessages
(c *gin.Context, textRequest dto.GeneralOpenAIRequest)
service/relayconvert/request_compat.go:19
↓ 2 callersFunctionOpenAIResponsesRequestFromAny
(request any)
service/relayconvert/internal/oai_responses/req_helpers.go:25
↓ 2 callersFunctionPROFILE_BY_NAME
(name: string)
web/src/features/pricing/lib/mock-stats.ts:229
↓ 2 callersFunctionParseAcceptLanguage
ParseAcceptLanguage parses the Accept-Language header and returns the preferred language
i18n/i18n.go:180
↓ 2 callersFunctionParseDeepSeekV4ThinkingSuffix
(modelName string)
setting/reasoning/suffix.go:38
↓ 2 callersFunctionParseExprVersion
ParseExprVersion extracts the version tag and body from an expression string. Format: "v1:tier(...)" → version=1, body="tier(...)". No prefix defaults
pkg/billingexpr/compile.go:22
↓ 2 callersFunctionParseMultipartFormReusable
(c *gin.Context)
common/gin.go:255
↓ 2 callersFunctionParseOAuthKey
(raw string)
relay/channel/codex/oauth_key.go:21
↓ 2 callersFunctionParseProxyURLStrict
ParseProxyURLStrict validates and normalizes a proxy URL for persistence.
common/proxy_url.go:12
↓ 2 callersFunctionPermissionsForRole
PermissionsForRole returns the permissions whose DefaultRoles include roleKey.
service/authz/registry.go:54
↓ 2 callersFunctionPingData
(c *gin.Context)
relay/helper/common.go:110
↓ 2 callersFunctionPreConsumeTokenQuota
(relayInfo *relaycommon.RelayInfo, quota int)
service/quota.go:387
↓ 2 callersFunctionProcessStreamResponse
(streamResponse dto.ChatCompletionsStreamResponse, responseTextBuilder *strings.Builder, toolCount *int)
relay/channel/openai/helper.go:93
↓ 2 callersFunctionQuotaFromDecimalChecked
QuotaFromDecimalChecked is QuotaFromDecimal but also returns a non-nil *QuotaClamp when the value was clamped, so billing callers can audit it.
common/quota_math.go:145
↓ 2 callersFunctionQuotaRound
QuotaRound converts a float64 quota value to int using half-away-from-zero rounding, with saturation. Every tiered billing path (pre-consume, settleme
common/quota_math.go:119
↓ 2 callersFunctionRawJSONPresent
(raw json.RawMessage)
service/relayconvert/internal/oai_responses/to_oai_chat_req.go:551
↓ 2 callersFunctionReasoningEffort
(req *dto.OpenAIResponsesRequest)
service/relayconvert/internal/oai_responses/req_helpers.go:138
↓ 2 callersFunctionRechargeWaffoPancake
(tradeNo string)
model/topup.go:530
↓ 2 callersFunctionRedisHIncrBy
(key, field string, delta int64)
common/redis.go:275
↓ 2 callersFunctionRedisHSetField
(key, field string, value interface{})
common/redis.go:302
↓ 2 callersFunctionRedisKeyCacheSeconds
()
common/redis.go:19
↓ 2 callersFunctionRefreshLoginSession
(rawRefreshToken, expectedSID, ip, userAgent string)
service/auth_session.go:201
↓ 2 callersFunctionRefreshTokenSID
(rawRefreshToken string)
service/auth_session.go:275
↓ 2 callersMethodRefund
Refund 退还所有预扣费额度(资金来源 + 令牌),幂等安全。 通过 gopool 异步执行。如果已经结算或退款则不做任何操作。
relay/common/billing.go:14
↓ 2 callersFunctionRegisterOrUpdateCustomProvider
RegisterOrUpdateCustomProvider registers or updates a single custom provider
oauth/registry.go:123
↓ 2 callersFunctionRegisterSystemTaskHandler
RegisterSystemTaskHandler registers a handler keyed by its Type(). It must be called before StartSystemTaskRunner (or any time, since the runner snaps
service/system_task.go:57
↓ 2 callersFunctionRegisterVerificationCodeWithKey
(key string, code string, purpose string)
common/verification.go:35
↓ 2 callersFunctionRelay
(c *gin.Context, relayFormat types.RelayFormat)
controller/relay.go:70
↓ 2 callersFunctionReleaseExternalIdentityWithTx
(tx *gorm.DB, provider string, userId int)
model/external_identity_claim.go:70
↓ 2 callersFunctionReleaseSystemTaskLock
(taskID string, lockedBy string)
model/system_task.go:378
↓ 2 callersMethodRemoveFilteredPolicy
(_ string, ptype string, fieldIndex int, fieldValues ...string)
service/authz/adapter.go:73
↓ 2 callersMethodRemoveOtherRatiosFromFloat
(value float64)
types/price_data.go:97
↓ 2 callersFunctionRenewSystemTaskLock
(taskID string, lockedBy string, lockUntil int64)
model/system_task.go:331
↓ 2 callersFunctionReplaceBackupCodesWithAuthVersion
ReplaceBackupCodesWithAuthVersion atomically replaces the factor's recovery credentials and advances the user's authentication version.
model/twofa.go:217
↓ 2 callersFunctionRequestFunctionDeclarations
(raw []byte)
service/relayconvert/internal/oai_responses/req_helpers.go:127
↓ 2 callersFunctionRequestToolChoiceToChat
(raw json.RawMessage)
service/relayconvert/internal/oai_responses/to_oai_chat_req.go:388
↓ 2 callersFunctionRerankHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/common_handler/rerank.go:19
↓ 2 callersFunctionResetDiskCacheStats
ResetDiskCacheStats 重置命中统计信息(不重置当前使用量)
common/disk_cache_config.go:147
↓ 2 callersFunctionResolveIncomingBillingExprRequestInput
(c *gin.Context, info *relaycommon.RelayInfo)
relay/helper/billing_expr_request.go:13
↓ 2 callersFunctionResponseClaude2OpenAI
(claudeResponse *dto.ClaudeResponse)
service/relayconvert/response_compat.go:39
↓ 2 callersFunctionResponseGeminiChat2OpenAI
(id string, created int64, response *dto.GeminiChatResponse)
service/relayconvert/response_compat.go:75
↓ 2 callersFunctionResponseOpenAI2Claude
(openAIResponse *dto.OpenAITextResponse, info *relaycommon.RelayInfo)
service/relayconvert/internal/oai_chat/to_claude_messages_resp.go:435
↓ 2 callersFunctionResponseOpenAI2Gemini
(openAIResponse *dto.OpenAITextResponse, info *relaycommon.RelayInfo)
service/relayconvert/response_compat.go:63
↓ 2 callersFunctionResponsesResponseToChatCompletionsResponse
(resp *dto.OpenAIResponsesResponse, id string)
service/relayconvert/response_compat.go:111
↓ 2 callersFunctionResponsesStatusFromChatFinishReason
(finishReason string)
service/relayconvert/internal/oai_chat/to_oai_responses_resp.go:100
↓ 2 callersFunctionRootAuth
()
middleware/auth.go:104
↓ 2 callersFunctionRunExprByHashWithRequest
(exprStr, hash string, params TokenParams, request RequestInput)
pkg/billingexpr/run.go:43
↓ 2 callersFunctionRunTaskPollingOnce
RunTaskPollingOnce performs one async-task (Suno/video) polling pass synchronously. It honors ctx cancellation (the system-task runner cancels it when
service/task_polling.go:107
↓ 2 callersFunctionSearchRedemptions
(keyword string, status string, startIdx int, num int)
model/redemption.go:63
↓ 2 callersFunctionSearchUsers
(keyword string, group string, role *int, status *int, startIdx int, num int, sortOptions ...UserSortOptions)
model/user.go:384
↓ 2 callersFunctionSensitiveWordContains
SensitiveWordContains 是否包含敏感词,返回是否包含敏感词和敏感词列表
service/sensitive.go:40
↓ 2 callersMethodSetAccessToken
(token string)
model/user.go:138
↓ 2 callersFunctionSetApiRouter
(router *gin.Engine)
router/api-router.go:14
← previousnext →1,401–1,500 of 9,195, ranked by callers