MCPcopy Create free account

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

Functions11,560 in github.com/QuantumNous/new-api

↓ 16 callersFunctionpluginProtocolTestOutcome
( info *relaycommon.RelayInfo, pluginKey string, taskID string, _ ...any, )
controller/plugin_protocol_test.go:1498
↓ 16 callersFunctionsetupStreamTest
(t *testing.T, body io.Reader)
relay/helper/stream_scanner_test.go:31
↓ 16 callersFunctionsideDrawerContentClassName
(className?: string)
web/src/components/drawer-layout.ts:24
↓ 16 callersFunctionuseCopyToClipboard
(options?: UseCopyToClipboardOptions)
web/src/hooks/use-copy-to-clipboard.ts:36
↓ 15 callersFunctionCacheGetChannel
(id int)
model/channel_cache.go:219
↓ 15 callersFunctionClaimSystemTask
(id int64, taskType string, runnerID string, lockUntil int64)
model/system_task.go:225
↓ 15 callersMethodClose
()
common/body_storage.go:214
↓ 15 callersMethodDoResponse
(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo)
relay/channel/adapter.go:29
↓ 15 callersFunctionGetSessionAuthIdentity
GetSessionAuthIdentity returns only identities backed by a live dashboard session. PAT-authenticated requests intentionally fail this check.
middleware/auth.go:125
↓ 15 callersFunctionModelMappedHelper
(c *gin.Context, info *relaycommon.RelayInfo, request dto.Request)
relay/helper/model_mapped.go:14
↓ 15 callersFunctionModelPriceHelper
(c *gin.Context, info *relaycommon.RelayInfo, promptTokens int, meta *types.TokenCountMeta)
relay/helper/price.go:75
↓ 15 callersFunctionNewPluginResponsesMachine
(taskID, model string, createdAt int64, limits PluginProtocolLimits)
relay/plugin_protocol.go:378
↓ 15 callersFunctionNormalizeEmail
(email string)
model/user.go:304
↓ 15 callersMethodOtherRatios
()
types/price_data.go:58
↓ 15 callersFunctionRunExprWithRequest
(exprStr string, params TokenParams, request RequestInput)
pkg/billingexpr/run.go:28
↓ 15 callersMethodSeek
(offset int64, whence int)
common/body_storage.go:205
↓ 15 callersFunctionSetEventStreamHeaders
(c *gin.Context)
relay/helper/common.go:45
↓ 15 callersMethodUpdate
(updatePassword bool)
model/user.go:749
↓ 15 callersFunctionnewTestUserSession
(sid string, userID int, now int64)
model/user_session_test.go:82
↓ 15 callersFunctionstreamValuesFromAny
(value any)
relaykit/relayconvert/response_registry.go:731
↓ 15 callersFunctionuseDataTable
(options: UseDataTableOptions<TData>)
web/src/components/data-table/hooks/use-data-table.ts:278
↓ 14 callersFunctionApplyReasoningModelSuffix
ApplyReasoningModelSuffix parses host-private reasoning suffixes from the origin and mapped model names, attaches the resulting intent to RelayInfo, a
relay/helper/reasoning_suffix.go:25
↓ 14 callersFunctionCan
Can reports whether the subject may perform the permission. A superuser role short-circuits to allow. Otherwise a per-user override wins, then the uni
service/authz/resolver.go:8
↓ 14 callersFunctionGetAdaptor
(apiType int)
relay/relay_adaptor.go:50
↓ 14 callersFunctionGetGeminiSettings
GetGeminiSettings 获取Gemini配置
setting/model_setting/gemini.go:65
↓ 14 callersFunctionGetHttpClient
GetHttpClient returns the general outbound client used by relay/provider integrations. Do not attach the SSRF-protected dialer here: provider base URL
service/http_client.go:153
↓ 14 callersFunctionGetHttpClientWithProxy
GetHttpClientWithProxy returns the default client or a cached proxy-enabled client.
service/http_client.go:382
↓ 14 callersFunctionInitHttpClient
()
service/http_client.go:139
↓ 14 callersFunctionNewClaudeMessagesBillingUsage
(usage *ClaudeUsage)
relaykit/dto/billing_usage.go:25
↓ 14 callersFunctionResetStatusCode
(newApiErr *types.NewAPIError, statusCodeMappingStr string)
service/error.go:140
↓ 14 callersMethodRoutes
()
pkg/jsplugin/routing.go:490
↓ 14 callersFunctionUpdateModelRatioByJSONString
(jsonStr string)
setting/ratio_setting/model_ratio.go:372
↓ 14 callersFunctiongetChannelUsedQuota
(t *testing.T, id int)
service/task_billing_test.go:468
↓ 14 callersFunctiongetIoEnterpriseClient
(c *gin.Context)
controller/deployment.go:50
↓ 14 callersFunctiongetTaskNumberFields
( schema: BillingUsageSchema | null | undefined )
web/src/features/pricing/lib/task-expr.ts:69
↓ 14 callersFunctiongetUserUsageAccounting
(t *testing.T, id int)
service/task_billing_test.go:461
↓ 14 callersFunctionnormalizeModelNames
(models []string)
controller/channel_upstream_update.go:101
↓ 14 callersFunctionsideDrawerFormClassName
(className?: string)
web/src/components/drawer-layout.ts:36
↓ 14 callersFunctionsideDrawerHeaderClassName
(className?: string)
web/src/components/drawer-layout.ts:30
↓ 14 callersFunctiontrimmed
(value)
plugins/tasks/hailuo/plugin.js:70
↓ 13 callersFunctionComputeTieredQuota
ComputeTieredQuota runs the Expr from a frozen BillingSnapshot against actual token counts and returns the settlement result.
pkg/billingexpr/settle.go:20
↓ 13 callersFunctionCreateAuthFlow
(input AuthFlowCreate)
model/auth_flow.go:96
↓ 13 callersFunctionDecodePluginProtocolEventResult
DecodePluginProtocolEventResult converts an exported JS value into the deliberately small semantic event contract. Unknown fields are rejected so plug
relay/plugin_protocol.go:131
↓ 13 callersMethodError
Error records a soft error. The stream continues processing. Can be called multiple times per chunk.
relay/helper/stream_result.go:21
↓ 13 callersFunctionFormatMatchingModelName
转换模型名,减少渠道必须配置各种带参数模型
setting/ratio_setting/model_ratio.go:713
↓ 13 callersFunctionGetAuthFlow
GetAuthFlow validates a flow without consuming it. Callers must still use ConsumeAuthFlow with all identity-bound fields before performing the action.
model/auth_flow.go:161
↓ 13 callersMethodGetBillingModelName
GetBillingModelName returns the effective pricing identity without changing either the client-visible model or the model sent to the selected channel.
relay/common/relay_info.go:781
↓ 13 callersMethodGetContentString
()
relaykit/dto/openai_response.go:105
↓ 13 callersFunctionGetGeneralSetting
()
setting/operation_setting/general_setting.go:40
↓ 13 callersFunctionGetPricing
()
model/pricing.go:70
↓ 13 callersFunctionIncrementUserAuthVersionWithTx
IncrementUserAuthVersionWithTx locks the user, publishes the next deny fence, then persists the version in the caller's transaction. Unscoped is inten
model/user_auth_cache.go:180
↓ 13 callersMethodLookupEndpoint
(method, path, model string)
pkg/jsplugin/routing.go:453
↓ 13 callersFunctionModelRatio2JSONString
()
setting/ratio_setting/model_ratio.go:630
↓ 13 callersMethodcacheEntry
()
model/user_session.go:87
↓ 13 callersFunctiongetLobeIcon
( iconName: string | undefined | null, size: number = 20 )
web/src/lib/lobe-icon.tsx:82
↓ 13 callersFunctionrequireSuccess
(response: ApiResponse<T>)
web/src/features/task-plugins/api.ts:57
↓ 13 callersFunctionseedChargedAccounting
(t *testing.T, userID, channelID, tokenID, quota, requestCount int)
service/task_billing_test.go:125
↓ 13 callersFunctionwriteUserSessionCache
writeUserSessionCache writes a bounded Session snapshot. Active snapshots must carry a deadline captured immediately before their authoritative databa
model/user_session.go:276
↓ 12 callersFunctionApplyUpstreamBodyMetadata
ApplyUpstreamBodyMetadata restores metadata that net/http cannot infer from a ReplayableBody. Callers must pass the original body because NewRequest h
relay/channel/api_request.go:31
↓ 12 callersMethodCallPath
CallPath invokes a function nested below an exported object. It is used for protocol hooks such as protocols.openai_responses.renderEvents.
pkg/jsplugin/engine.go:313
↓ 12 callersMethodError
Error implements the error interface
pkg/ionet/types.go:274
↓ 12 callersFunctionFormatQuota
(quota int)
logger/logger.go:152
↓ 12 callersMethodGetErrorCode
()
relaykit/types/error.go:109
↓ 12 callersFunctionGetRandomString
(length int)
common/str.go:32
↓ 12 callersMethodHasStrength
()
relaykit/relayconvert/reasoning/intent.go:85
↓ 12 callersFunctionIncreaseUserQuota
(id int, quota int, db bool)
model/user.go:1270
↓ 12 callersFunctionInit
(db *gorm.DB)
service/authz/enforcer.go:33
↓ 12 callersMethodIsEmpty
()
relaykit/relayconvert/reasoning/intent.go:89
↓ 12 callersFunctionNewResponseStreamState
(from types.RelayFormat, target types.RelayFormat, options ResponseStreamOptions)
relaykit/relayconvert/response_registry.go:297
↓ 12 callersFunctionOptionsOf
OptionsOf returns m's conversion options, or empty defaults when m is nil.
relaykit/relayconvert/convmeta/meta.go:236
↓ 12 callersFunctionRecordLog
(userId int, logType int, content string)
model/log.go:150
↓ 12 callersMethodSetContentString
(s string)
relaykit/dto/openai_response.go:101
↓ 12 callersMethodSetOtherSettings
(setting dto.ChannelOtherSettings)
model/channel.go:1048
↓ 12 callersMethodSetToolCalls
(toolCalls any)
relaykit/dto/openai_request.go:501
↓ 12 callersMethodUpdateWithStatus
UpdateWithStatus performs a conditional UPDATE guarded by fromStatus (CAS). Returns (true, nil) if this caller won the update, (false, nil) if another
model/task.go:533
↓ 12 callersMethodValidateRequestAndSetAction
(c *gin.Context, info *relaycommon.RelayInfo)
relay/channel/adapter.go:39
↓ 12 callersFunctionWalletQuotaFromDecimalStrict
WalletQuotaFromDecimalStrict converts wallet and top-up values within the JavaScript-safe integer range, which is also exactly representable by float6
common/quota_math.go:172
↓ 12 callersFunctionbuildSSEBody
(n int)
relay/helper/stream_scanner_test.go:49
↓ 12 callersFunctiongenBaseRelayInfo
(c *gin.Context, request dto.Request)
relay/common/relay_info.go:509
↓ 12 callersFunctionmakeRelayInfo
(expr string, groupRatio float64, estPrompt, estCompletion int)
service/tiered_settle_test.go:45
↓ 12 callersFunctionsafeJsonParse
( value: string | undefined | null, options: SafeJsonParseOptions<T> = {} )
web/src/features/system-settings/utils/json-parser.ts:113
↓ 12 callersFunctionsettleTaskBillingOnComplete
settleTaskBillingOnComplete 任务完成时的统一计费调整。 返回 true 表示用量结算路径已接管最终计费;失败任务仅在返回 false 时补做全额退款。 优先级:1. tiered snapshot → 2. adaptor 调整 → 3. token 重算。 表达式求值
service/task_polling.go:666
↓ 12 callersFunctionsetupGenericTaskTest
(t *testing.T)
controller/task_generic_test.go:27
↓ 12 callersFunctionsplitBillingExprAndRequestRules
(expr: string)
web/src/features/pricing/lib/billing-expr.ts:901
↓ 12 callersFunctiontrimmed
(value)
plugins/tasks/doubao/plugin.js:65
↓ 12 callersFunctionuseMediaQuery
(query: string)
web/src/hooks/use-media-query.ts:26
↓ 12 callersFunctionuseTestSessionSecret
(t *testing.T)
service/auth_token_test.go:14
↓ 11 callersFunctionAsClientError
(err error)
relaykit/relayconvert/reasoning/intent.go:38
↓ 11 callersFunctionCompile
Compile performs upload-time syntax checks and compiles an ESM plugin once. All Sobek-specific module and runtime handling is intentionally kept here.
pkg/jsplugin/engine.go:135
↓ 11 callersMethodConversionDiagnostics
()
relay/common/conversion_diagnostics.go:62
↓ 11 callersFunctionConvertResponse
(c context.Context, info convmeta.Meta, target types.RelayFormat, response any)
relaykit/relayconvert/response_registry.go:231
↓ 11 callersMethodCountBillableToolCall
CountBillableToolCall is the single entry point for per-call tool billing counts. Built-in call types always count; custom function/tool_use names onl
relay/common/tool_usage.go:24
↓ 11 callersFunctionDeleteToolPriceForTest
DeleteToolPriceForTest removes an injected tool price and rebuilds the index. Tests only.
setting/operation_setting/tools.go:231
↓ 11 callersMethodError
()
pkg/jsplugin/engine.go:35
↓ 11 callersFunctionGetChannelBaseURL
(channelType int)
constant/channel.go:131
↓ 11 callersFunctionGetDBTimestamp
GetDBTimestamp returns a UNIX timestamp from database time. Falls back to application time on error.
model/db_time.go:7
↓ 11 callersFunctionGetFetchSetting
()
setting/system_setting/fetch_setting.go:32
↓ 11 callersFunctionGetHttpClientWithProxySettings
GetHttpClientWithProxySettings returns a cached HTTP client for the proxy URL and channel transport settings. Default auto + 1 shard shares the same c
service/http_client.go:389
↓ 11 callersFunctionGetMaxTokenAutoGroups
()
setting/auto_group.go:51
↓ 11 callersMethodGetReasoningContent
()
relaykit/dto/openai_request.go:469
← previousnext →201–300 of 11,560, ranked by callers