MCPcopy Create free account

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

Functions10,602 in github.com/QuantumNous/new-api

↓ 2 callersFunctionHandleStreamFormat
辅助函数
relay/channel/openai/helper.go:23
↓ 2 callersFunctionHandleStreamResponseData
(c *gin.Context, info *relaycommon.RelayInfo, claudeInfo *ClaudeResponseInfo, data string)
relay/channel/claude/relay-claude.go:86
↓ 2 callersFunctionHasCSAMViolationMarker
(err *types.NewAPIError)
service/violation_fee.go:30
↓ 2 callersMethodHasCache
()
types/file_source.go:21
↓ 2 callersFunctionHasCheckedInToday
HasCheckedInToday 检查用户今天是否已签到
model/checkin.go:43
↓ 2 callersMethodHasImageGenerationCall
()
dto/openai_response.go:323
↓ 2 callersFunctionHasModelBillingConfig
(modelName string)
relay/helper/price.go:254
↓ 2 callersMethodIncreaseRetry
()
service/channel_select.go:34
↓ 2 callersMethodIncrementFailedAttempts
IncrementFailedAttempts 增加失败尝试次数
model/twofa.go:122
↓ 2 callersFunctionInitDB
()
model/main.go:181
↓ 2 callersFunctionInitOptionMap
()
model/option.go:30
↓ 2 callersFunctionInputItems
(raw []byte)
service/relayconvert/internal/oai_responses/req_helpers.go:57
↓ 2 callersMethodInsert
()
model/midjourney.go:161
↓ 2 callersMethodInsert
()
model/model_meta.go:47
↓ 2 callersMethodInsert
()
model/task.go:376
↓ 2 callersMethodInsert
()
model/token.go:286
↓ 2 callersMethodInsertWithTx
InsertWithTx inserts a new user within an existing transaction. This is used for OAuth registration where user creation and binding need to be atomic.
model/user.go:598
↓ 2 callersFunctionInvalidateCache
InvalidateCache clears the compiled-expression cache. Called when billing rules are updated.
pkg/billingexpr/compile.go:171
↓ 2 callersFunctionInvalidateUserCache
InvalidateUserCache is the exported version of invalidateUserCache. 供 controller 等上层包在用户状态变更(如禁用、删除、角色变更)后主动清理缓存。
model/user_cache.go:62
↓ 2 callersFunctionIsAdmin
(userId int)
model/user.go:920
↓ 2 callersFunctionIsAdvancedCustomConverterAllowed
(converter string)
dto/channel_settings.go:285
↓ 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 callersFunctionIsExposeRatioEnabled
()
setting/ratio_setting/expose_ratio.go:15
↓ 2 callersFunctionIsGeminiModelSupportImagine
(model string)
setting/model_setting/gemini.go:69
↓ 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:884
↓ 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 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 callersFunctionNewPasskeyCredentialFromWebAuthn
(userID int, credential *webauthn.Credential)
model/passkey.go:102
↓ 2 callersFunctionNewResponsesBufferedAccumulator
()
service/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:556
↓ 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/default/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 callersFunctionPaymentReturnURL
(suffix string)
service/return_path.go:10
↓ 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 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 callersFunctionRebuildToolPriceIndex
RebuildToolPriceIndex rebuilds the lookup index from the current config. Called on init and after config updates. Not on the billing hot path.
setting/operation_setting/tools.go:77
↓ 2 callersFunctionRechargeWaffoPancake
(tradeNo string)
model/topup.go:530
↓ 2 callersFunctionRecordExist
(err error)
model/utils.go:115
↓ 2 callersFunctionRedisDelKey
(key string)
common/redis.go:99
↓ 2 callersFunctionRedisHGetObj
(key string, obj interface{})
common/redis.go:161
↓ 2 callersFunctionRedisHIncrBy
(key, field string, delta int64)
common/redis.go:275
↓ 2 callersFunctionRedisHSetObj
(key string, obj interface{}, expiration time.Duration)
common/redis.go:107
↓ 2 callersFunctionRedisKeyCacheSeconds
()
common/redis.go:19
↓ 2 callersFunctionRefreshCodexChannelCredential
(ctx context.Context, channelID int, opts CodexCredentialRefreshOptions)
service/codex_credential_refresh.go:42
↓ 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:68
↓ 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
← previousnext →1,401–1,500 of 10,602, ranked by callers