MCPcopy Create free account

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

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

↓ 2 callersFunctionbuildDashboardFlowData
( rows: FlowQuotaDataItem[], metric: FlowMetric = 'quota', options: FlowBuildOptions = {} )
web/src/features/dashboard/lib/flow.ts:972
↓ 2 callersFunctionbuildDiscordOAuthUrl
(clientId: string, state: string)
web/src/lib/oauth.ts:33
↓ 2 callersFunctionbuildFlowSankeySpec
( flow: DashboardFlowGraph, title: string, valueFormatter: (value: number) => string = formatNumber, l
web/src/features/dashboard/lib/flow.ts:1118
↓ 2 callersFunctionbuildFormDefaults
(defaults: FlatPerfDefaults)
web/src/features/system-settings/maintenance/performance-section.tsx:100
↓ 2 callersFunctionbuildFormDefaults
( defaults: FlatPasskeyDefaults )
web/src/features/system-settings/auth/passkey-section.tsx:97
↓ 2 callersFunctionbuildFormDefaults
(defaults: FlatGrokDefaults)
web/src/features/system-settings/models/grok-settings-card.tsx:72
↓ 2 callersFunctionbuildGitHubOAuthUrl
(clientId: string, state: string)
web/src/lib/oauth.ts:26
↓ 2 callersFunctionbuildGroupPerformance
(model: PricingModel)
web/src/features/pricing/lib/mock-stats.ts:311
↓ 2 callersFunctionbuildLegacyParamOverride
(paramOverride map[string]interface{})
relay/common/override.go:164
↓ 2 callersFunctionbuildLinuxDOOAuthUrl
(clientId: string, state: string)
web/src/lib/oauth.ts:66
↓ 2 callersFunctionbuildLogEndpoint
buildLogEndpoint constructs the request path for fetching logs
pkg/ionet/container.go:83
↓ 2 callersFunctionbuildMaskedTokenResponses
(tokens []*model.Token)
controller/token.go:26
↓ 2 callersFunctionbuildNodeFilterOptions
( rows: FlowQuotaDataItem[], metric: FlowMetric, role: FlowRole, visibleStages: FlowNodeKind[] | undef
web/src/features/dashboard/lib/flow.ts:880
↓ 2 callersFunctionbuildOIDCOAuthUrl
( authUrl: string, clientId: string, state: string )
web/src/lib/oauth.ts:49
↓ 2 callersFunctionbuildOpField
buildOpField 构建语言无关的操作描述(写入 Other.op)。 前端依据 action(稳定操作标识) + params(结构化参数) 在渲染期用 i18n 本地化展示, 因此不在数据库中存储自然语言句子。
model/log.go:189
↓ 2 callersFunctionbuildQueryParams
( params: Record<string, unknown> )
web/src/features/usage-logs/lib/utils.ts:97
↓ 2 callersFunctionbuildQueryParams
( timeRange: { start_timestamp: number; end_timestamp: number }, filters?: { time_granularity?: TimeGranul
web/src/features/dashboard/lib/filters.ts:155
↓ 2 callersFunctionbuildRouteURL
(route dto.AdvancedCustomRoute, converter string, info *relaycommon.RelayInfo)
relay/channel/advancedcustom/adaptor.go:394
↓ 2 callersFunctionbuildSearchParams
( filters: LogFilters, logCategory: LogCategory )
web/src/features/usage-logs/lib/filter.ts:38
↓ 2 callersFunctionbuildSettingJSON
* Build the setting JSON string from form extra settings
web/src/features/channels/lib/channel-form.ts:539
↓ 2 callersFunctionbuildSettingsJSON
* Build the settings JSON string (for type-specific config like vertex_key_type)
web/src/features/channels/lib/channel-form.ts:554
↓ 2 callersFunctionbuildSubscriptionResetResult
(plan *SubscriptionPlan, subs []UserSubscription, advanceResetTime bool)
model/subscription.go:1019
↓ 2 callersFunctionbuildSubscriptionSummaries
(subs []UserSubscription)
model/subscription.go:902
↓ 2 callersFunctionbuildSyntaxError
( error: unknown, jsonString: string )
web/src/features/system-settings/models/utils.ts:92
↓ 2 callersFunctionbuildTestLogOther
(c *gin.Context, info *relaycommon.RelayInfo, priceData types.PriceData, usage *dto.Usage, tieredResult *billi
controller/channel-test.go:556
↓ 2 callersFunctionbuildTimeRangeParams
* Build time range parameters with default values * Shared logic for all log types
web/src/features/usage-logs/lib/utils.ts:116
↓ 2 callersFunctionbuildUpstreamModelUpdateTaskNotificationContent
( checkedChannels int, changedChannels int, detectedAddModels int, detectedRemoveModels int, autoAddedMod
controller/channel_upstream_update.go:557
↓ 2 callersFunctionbuildUsageFromGeminiMetadata
(metadata *dto.GeminiUsageMetadata, fallbackPromptTokens int)
relay/channel/gemini/relay-gemini.go:25
↓ 2 callersFunctionbuildUserFilterOptions
( rows: FlowQuotaDataItem[], metric: FlowMetric = 'quota', palette?: readonly string[] )
web/src/features/dashboard/lib/flow.ts:837
↓ 2 callersFunctionbuildUserOAuthBindingsResponse
(userId int)
controller/custom_oauth.go:444
↓ 2 callersFunctioncacheDecrUserQuota
(userId int, delta int64)
model/user_cache.go:154
↓ 2 callersFunctioncacheIncrTokenQuota
(key string, increment int64)
model/token_cache.go:30
↓ 2 callersFunctioncacheWriteTokensTotal
(summary textQuotaSummary)
service/text_quota.go:79
↓ 2 callersFunctioncachedLoginSessionKey
(t *testing.T, server *miniredis.Miniredis)
service/auth_session_test.go:87
↓ 2 callersFunctioncalculateTokenPrice
* Calculate token price in USD. * * Returns NaN when the required ratio field is missing/null so callers can * skip rendering that price type.
web/src/features/pricing/lib/price.ts:63
↓ 2 callersFunctioncalculateUserPermissions
计算用户权限的辅助函数
controller/user.go:549
↓ 2 callersFunctioncancelResultTimeout
()
web/src/routes/oauth/$provider.tsx:111
↓ 2 callersFunctionchannelAffinityUsageCacheEntryKey
(ruleName, usingGroup, keyFp string)
service/channel_affinity.go:903
↓ 2 callersFunctionchannelHasSensitiveChanges
(channel *PatchChannel, origin *model.Channel, requestData map[string]any)
controller/channel_authz.go:5
↓ 2 callersFunctionchannelOwnerName
(channelType int)
controller/model.go:113
↓ 2 callersFunctionchatArgumentsRawMessage
(arguments string)
service/relayconvert/internal/oai_chat/to_oai_responses_resp.go:196
↓ 2 callersFunctionchatCompletionsViaResponses
(c *gin.Context, info *relaycommon.RelayInfo, adaptor channel.Adaptor, request *dto.GeneralOpenAIRequest)
relay/chat_completions_via_responses.go:73
↓ 2 callersFunctionchatLinkRequiresApiKey
(url: string)
web/src/features/chat/lib/chat-links.ts:87
↓ 2 callersFunctioncheckAndSendQuotaNotify
(relayInfo *relaycommon.RelayInfo, quota int, preConsumedQuota int)
service/quota.go:457
↓ 2 callersFunctioncheckClusterNameAvailability
(name: string)
web/src/features/models/api.ts:624
↓ 2 callersFunctioncheckConditions
(data []byte, contextJSON string, conditions []ConditionOperation, logic string)
relay/common/override.go:512
↓ 2 callersFunctioncheckDangerousContent
(content string, index int, itemType string)
setting/console_setting/validation.go:43
↓ 2 callersFunctioncheckMySQLChineseSupport
checkMySQLChineseSupport ensures the MySQL connection and current schema default charset/collation can store Chinese characters. It allows common Chin
model/main.go:724
↓ 2 callersFunctioncheckRedisRateLimit
检查Redis中的请求限制
middleware/model-rate-limit.go:26
↓ 2 callersFunctionclampThinkingBudget
(modelName string, budget int)
service/relayconvert/internal/shared/gemini/request.go:215
↓ 2 callersFunctionclassifyDashboardCredential
(c *gin.Context)
middleware/auth.go:150
↓ 2 callersFunctionclaudeMessageContentParts
(content any)
service/relayconvert/internal/oai_responses/to_claude_messages_req.go:277
↓ 2 callersFunctionclearChannelReadOnlyFields
(channel *PatchChannel, requestData map[string]any)
controller/channel_authz.go:93
↓ 2 callersFunctionclearPendingTimer
()
web/src/features/channels/lib/channel-field-update.ts:39
↓ 2 callersFunctionclickHouseCreateTableHasTTL
(createTableSQL string)
model/main.go:500
↓ 2 callersFunctionclickHouseLogCreateTableSQL
(ttlDays int)
model/main.go:447
↓ 2 callersFunctionclickHouseLogTTLClause
(ttlDays int)
model/main.go:439
↓ 2 callersFunctioncloneClaudeUsage
(usage *ClaudeUsage)
dto/billing_usage.go:165
↓ 2 callersFunctioncloneGeminiUsageMetadata
(metadata GeminiUsageMetadata)
dto/billing_usage.go:182
↓ 2 callersFunctioncloneOpenAIUsage
(usage *Usage)
dto/billing_usage.go:152
↓ 2 callersFunctioncloneResponseConverterSpec
(spec ResponseConverterSpec)
service/relayconvert/response_registry.go:695
↓ 2 callersFunctioncloneStringAnyMap
(src map[string]interface{})
service/channel_affinity.go:437
↓ 2 callersFunctioncloneTextConverterSpec
(spec TextConverterSpec)
service/relayconvert/text_converter_registry.go:360
↓ 2 callersFunctioncloneTextConverterStrings
(values []string)
service/relayconvert/text_converter_registry.go:367
↓ 2 callersFunctioncloseActiveSource
(target: StreamEventSource)
web/src/features/playground/hooks/use-stream-request.ts:65
↓ 2 callersFunctioncollectPendingApplyUpstreamModelChanges
(settings dto.ChannelOtherSettings)
controller/channel_upstream_update.go:969
↓ 2 callersFunctioncollectStreamFunctionCallNames
(data string, seen map[string]struct{}, names *[]string)
relay/channel/openai/relay-openai.go:197
↓ 2 callersFunctioncollectUserIDs
(users []*User)
model/user_pagination_test.go:30
↓ 2 callersFunctioncommonPointer
(value T)
relay/channel/claude/relay_claude_test.go:13
↓ 2 callersFunctioncompactFlowSelectionLabel
(count: number)
web/src/features/dashboard/lib/flow-selection.ts:55
↓ 2 callersFunctioncompleteReasoningTiming
( message: Message, completedAt: number = Date.now() )
web/src/features/playground/lib/message/message-timing-utils.ts:53
↓ 2 callersFunctioncomputeBuildRevision
()
web/src/lib/build-metadata.ts:76
↓ 2 callersFunctionconfigToMap
辅助函数:将配置对象转换为map
setting/config/config.go:93
↓ 2 callersFunctionconvertAliStatus
(aliStatus string)
relay/channel/task/ali/adaptor.go:624
↓ 2 callersFunctionconvertRowsToJson
(updatedRows: MappingRow[])
web/src/features/channels/components/model-mapping-editor.tsx:136
↓ 2 callersFunctioncopyHeaderInContext
(context map[string]interface{}, fromHeader, toHeader string, keepOrigin bool)
relay/common/override.go:1236
↓ 2 callersFunctioncopyRequest
(req *dto.ClaudeRequest, version string)
relay/channel/vertex/dto.go:26
↓ 2 callersFunctioncopyToClipboard
()
web/src/components/ai-elements/code-block.tsx:623
↓ 2 callersFunctioncountClaudeStreamBillableTools
(c *gin.Context, info *relaycommon.RelayInfo, claudeResponse *dto.ClaudeResponse)
relay/channel/claude/relay-claude.go:136
↓ 2 callersFunctioncountSystemTasks
(t *testing.T, taskType string)
service/system_task_test.go:58
↓ 2 callersFunctioncreateChannelColumn
(config: { accessorKey?: string headerLabel: string })
web/src/features/usage-logs/components/columns/column-helpers.tsx:166
↓ 2 callersFunctioncreateChannelFieldUpdateScheduler
( onUpdate: (value: number) => void, timers: ChannelFieldUpdateTimers = browserTimers )
web/src/features/channels/lib/channel-field-update.ts:32
↓ 2 callersFunctioncreateChannelTestCachePatch
( responseTime?: number, completedAt = Date.now() )
web/src/features/channels/components/dialogs/channel-test-dialog.tsx:145
↓ 2 callersFunctioncreateDefaultOperation
()
web/src/features/channels/components/dialogs/param-override-editor-dialog.tsx:521
↓ 2 callersFunctioncreateDefaultVisualConfig
()
web/src/features/pricing/lib/tier-expr.ts:81
↓ 2 callersFunctioncreateDurationColumn
(config: { submitTimeKey: string finishTimeKey: string unit?: 'seconds' | 'milliseconds' headerLabel:
web/src/features/usage-logs/components/columns/column-helpers.tsx:105
↓ 2 callersFunctioncreateGroupPricingId
()
web/src/features/system-settings/models/group-ratio-visual-editor.tsx:102
↓ 2 callersMethodcreateJWTTokenWithKey
(apiKey string)
relay/channel/task/kling/adaptor.go:313
↓ 2 callersFunctioncreateJsonStringField
( t: Translate, options?: Parameters<typeof validateJsonString>[1] )
web/src/features/system-settings/models/ratio-settings-card.tsx:91
↓ 2 callersFunctioncreateKeySourceRow
(source?: Partial<KeySource>)
web/src/features/system-settings/general/channel-affinity/rule-editor-dialog.tsx:114
↓ 2 callersFunctioncreateLegacyPendingSystemTask
(t *testing.T, taskType string)
model/system_task_test.go:24
↓ 2 callersFunctioncreateLoginSession
(userID int, expectedAuthVersion int64, loginMethod, ip, userAgent string)
service/auth_session.go:56
↓ 2 callersFunctioncreateMessageVersion
(content: string)
web/src/features/playground/lib/message/message-utils.ts:32
↓ 2 callersFunctioncreateProgressColumn
(config: { accessorKey?: string headerLabel: string })
web/src/features/usage-logs/components/columns/column-helpers.tsx:247
↓ 2 callersFunctioncreateRefreshRunner
( runtime: AuthRefreshRuntime )
web/src/lib/auth-session.ts:209
↓ 2 callersFunctioncreateRouteKeys
(count: number)
web/src/features/channels/components/dialogs/advanced-custom-editor-dialog.tsx:243
↓ 2 callersFunctioncreateRowId
()
web/src/features/channels/components/model-mapping-editor.tsx:73
↓ 2 callersFunctioncreateScrollLayerSynchronizer
( source: ScrollSource, layers: ScrollLayers, requestFrame: RequestFrame = window.requestAnimationFrame
web/src/components/json-code-editor/json-code-editor-utils.ts:103
↓ 2 callersFunctioncreateSignedJWT
(email, privateKeyPEM string)
relay/channel/vertex/service_account.go:66
↓ 2 callersFunctioncreateStreamRequestController
( runtime: StreamRequestControllerRuntime )
web/src/features/playground/hooks/use-stream-request.ts:59
← previousnext →1,601–1,700 of 9,195, ranked by callers