MCPcopy Create free account

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

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

↓ 3 callersFunctionbuildResponsesWSCreatePayload
(c *gin.Context, info *relaycommon.RelayInfo, req dto.OpenAIResponsesRequest, generate common.RawMessage, stre
relay/responses_websocket.go:767
↓ 3 callersFunctionbuildRoutingGeneration
(factory, override map[string]*LoadedPlugin, number uint64)
pkg/jsplugin/routing.go:417
↓ 3 callersFunctionbuildRoutingGenerationFromPlugins
(effective map[string]*LoadedPlugin, number uint64)
pkg/jsplugin/routing.go:502
↓ 3 callersFunctionbuildSelfUserData
buildSelfUserData is the single safe dashboard-user DTO used by GetSelf, login and refresh. It intentionally excludes password, management PAT and adm
controller/user.go:494
↓ 3 callersFunctionbuildUsageFromGeminiResponse
(c *gin.Context, info *relaycommon.RelayInfo, response *dto.GeminiChatResponse)
relay/channel/gemini/relay-gemini.go:161
↓ 3 callersFunctionbumpSyncTopic
bumpSyncTopic adds the sync task on tx, inside the transaction of a write: the write and its task commit or fail together. It first locks the newest t
model/system_sync_task.go:58
↓ 3 callersFunctioncacheApplyUserQuotaDelta
(userID int, delta int64)
model/quota_reserve.go:87
↓ 3 callersMethodcacheKeyPart
()
service/http_transport_policy.go:88
↓ 3 callersFunctioncalculateAudioQuota
(info QuotaInfo)
service/quota.go:49
↓ 3 callersFunctioncalculateTokenPrice
( model: PricingModel, type: PriceType, ratio: number )
web/src/features/pricing/lib/price.ts:63
↓ 3 callersMethodcall
(node: Extract<ExpressionNode, { kind: 'call' }>)
web/src/features/pricing/lib/billing-expression/runtime.ts:422
↓ 3 callersFunctioncallKeywords
(t *testing.T, plugin *LoadedPlugin, config []byte, body string)
pluginkit/keywords_test.go:31
↓ 3 callersFunctioncapSyncMessage
(message string)
service/node_sync.go:210
↓ 3 callersFunctionchannelCloseTopic
(database int)
pkg/wsmanager/wsmanager.go:150
↓ 3 callersFunctionchannelsRevision
channelsRevision is the id of the newest channels sync task, 0 without one.
model/channel_status_test.go:119
↓ 3 callersFunctionchargedFailure
(data)
plugins/tasks/xai/plugin.js:328
↓ 3 callersFunctionchartRecordValue
(value: unknown)
web/src/features/dashboard/components/flow/flow-charts.tsx:179
↓ 3 callersFunctionchatStreamChunk
(raw string)
relaykit/relayconvert/golden_test.go:436
↓ 3 callersFunctioncheck
(ctx, req, attachments)
plugins/tasks/request-filter/plugin.js:384
↓ 3 callersMethodcheck
check refuses a patched view whose fields are not those of before, each a string or an array of as many strings, or whose values hold the form boundar
relay/requestplugin/form.go:161
↓ 3 callersFunctioncheckAndPersistChannelUpstreamModelUpdates
( channel *model.Channel, settings *dto.ChannelOtherSettings, force bool, allowAutoApply bool, )
controller/channel_upstream_update.go:594
↓ 3 callersFunctioncheckPDF
checkPDF returns "" for a file the library may read, otherwise the unchecked reason: too_large past a bound, unreadable when the file is not a PDF, is
relay/requestplugin/pdf.go:900
↓ 3 callersFunctionchoiceFromString
(value string)
relaykit/relayconvert/internal/toolconv/decode.go:832
↓ 3 callersFunctionchoiceIndex
(choice gjson.Result, position int)
relay/requestplugin/reply.go:656
↓ 3 callersFunctionclamp
(v: number)
web/src/features/channels/components/numeric-spinner-input.tsx:59
↓ 3 callersFunctionclampSize
( size: FloatingWindowSize, limits: { minWidth: number; minHeight: number } )
web/src/components/floating-window.tsx:151
↓ 3 callersMethodclassify
classify sets the class of a failed hook call from its error.
pluginkit/transform.go:404
↓ 3 callersFunctionclaudeHostedResultFailure
(blockType string, content json.RawMessage, explicitError *bool, explicitCode string)
relaykit/relayconvert/internal/toolconv/hosted_values.go:142
↓ 3 callersFunctionclaudeMCPContentFromResponsesString
(raw json.RawMessage)
relaykit/relayconvert/internal/toolconv/hosted_values.go:131
↓ 3 callersFunctionclaudeMCPInputFromResponses
claudeMCPInputFromResponses decodes the outer Responses JSON string and validates that its contents satisfy Claude's JSON-object input contract.
relaykit/relayconvert/internal/toolconv/hosted_values.go:70
↓ 3 callersFunctionclaudeMessageContentParts
(content any)
relaykit/relayconvert/internal/oai_responses/to_claude_messages_req.go:314
↓ 3 callersFunctionclaudeNameFromHostedKind
(kind Kind)
relaykit/relayconvert/internal/toolconv/response_artifacts.go:752
↓ 3 callersFunctionclaudeStreamChunk
(raw string)
relaykit/relayconvert/golden_test.go:442
↓ 3 callersFunctionclaudeWebSearchInputFromResponses
claudeWebSearchInputFromResponses narrows the richer Responses action union to the only operation exposed by Claude's web-search server tool: one quer
relaykit/relayconvert/internal/toolconv/hosted_values.go:14
↓ 3 callersFunctioncleanPDFText
cleanPDFText keeps valid, printable text and line breaks.
relay/requestplugin/pdf.go:370
↓ 3 callersFunctionclearPasswordEncryptionCache
()
web/src/features/auth/lib/password-encryption.ts:38
↓ 3 callersFunctionclickHouseLogTTLExpression
(ttlDays int)
model/main.go:430
↓ 3 callersFunctioncloneClaudeUsage
(usage *ClaudeUsage)
relaykit/dto/billing_usage.go:400
↓ 3 callersFunctioncloneGeminiUsageMetadata
(metadata GeminiUsageMetadata)
relaykit/dto/billing_usage.go:421
↓ 3 callersFunctioncloneRequestConverterSpec
(spec RequestConverterSpec)
relaykit/relayconvert/request_registry.go:394
↓ 3 callersFunctioncloneStringAnyMap
(src map[string]any)
service/channel_affinity.go:439
↓ 3 callersFunctioncloneStringMap
(src map[string]string)
relay/helper/billing_expr_request.go:123
↓ 3 callersFunctioncodexResponsesToolsRequest
(t *testing.T, toolChoice any, extraTools ...map[string]any)
relaykit/relayconvert/internal/toolconv/policy_test.go:105
↓ 3 callersFunctioncollectPendingUpstreamModelChangesFromModels
( localModels []string, upstreamModels []string, ignoredModels []string, modelMapping map[string]string, )
controller/channel_upstream_update.go:182
↓ 3 callersFunctioncommit
()
web/src/features/channels/components/model-mapping-editor.tsx:205
↓ 3 callersFunctioncommonPointer
(value T)
relay/channel/claude/relay_claude_test.go:23
↓ 3 callersFunctioncompareAny
(left any, right any)
oauth/generic.go:534
↓ 3 callersFunctioncompareSystemVersions
( left: string | null | undefined, right: string | null | undefined )
web/src/features/system-update/releases.ts:68
↓ 3 callersFunctioncompilePluginProtocolTestEndpointWithOptions
( t *testing.T, key string, source string, options pluginruntime.Options, )
controller/plugin_protocol_test.go:1453
↓ 3 callersFunctioncompileRules
(config)
plugins/tasks/request-filter/plugin.js:328
↓ 3 callersMethodcomplete
()
relay/plugin_protocol.go:940
↓ 3 callersFunctioncomputeTimeRange
( days: number, startDate?: Date, endDate?: Date, useStartOfDay = false )
web/src/lib/time.ts:108
↓ 3 callersFunctionconfigureRequestAutoGroupsTest
(t *testing.T)
service/group_auto_groups_test.go:17
↓ 3 callersFunctionconfigureSSRFTestFetchSetting
(t *testing.T)
service/protected_fetch_client_test.go:42
↓ 3 callersFunctionconvertChatCompatibilityRequest
(t *testing.T, request *dto.GeneralOpenAIRequest, channelType int, mapping map[string]string)
controller/channel_test_request_test.go:28
↓ 3 callersMethodconvertCrossProtocolChatRequest
convertCrossProtocolChatRequest converts a Claude, Gemini, or Responses request into an OpenAI chat completions request for an OpenAI-compatible upstr
relay/channel/advancedcustom/adaptor.go:587
↓ 3 callersFunctionconvertImage
(ctx)
plugins/tasks/doubao/plugin.js:547
↓ 3 callersFunctionconvertRowsToJson
(updatedRows: EditorRow[])
web/src/components/json-editor.tsx:99
↓ 3 callersFunctionconvertedReqKey
(reqKey, imageCount)
plugins/tasks/jimeng/plugin.js:185
↓ 3 callersMethodcpuSaturation
cpuSaturation 返回相对容器可用 CPU 的使用率(百分比)。 可用 CPU 取 cgroup 配额与可调度 CPU 的较小者:配额大于 cpuset 或节点核数时, 按配额计算会让容器打满也无法触发保护。 ok=false 表示当前环境没有可用的 cgroup CPU 数据,调用方应回
common/container_usage.go:43
↓ 3 callersFunctioncreateAdvancedCustomRoute
()
web/src/features/channels/lib/advanced-custom.ts:422
↓ 3 callersFunctioncreateAuthFlowWithTx
(tx *gorm.DB, input AuthFlowCreate)
model/auth_flow.go:152
↓ 3 callersFunctioncreateDefaultTaskMatrixConfig
( schema: BillingUsageSchema )
web/src/features/pricing/lib/task-expr.ts:121
↓ 3 callersFunctioncreateEmptyCondition
()
web/src/features/pricing/lib/billing-expr.ts:666
↓ 3 callersFunctioncreateEmptyTimeCondition
()
web/src/features/pricing/lib/billing-expr.ts:670
↓ 3 callersFunctioncreateInitialLaneState
(data?: ModelRatioData | null)
web/src/features/system-settings/models/model-pricing-core.ts:227
↓ 3 callersFunctioncreateRenderChildren
(fadeRun?: FadeRun)
web/src/components/ai-elements/response-renderer.tsx:58
↓ 3 callersFunctioncreateRouteKey
()
web/src/features/channels/components/dialogs/advanced-custom-editor-dialog.tsx:376
↓ 3 callersFunctioncreateRouteKeys
(count: number)
web/src/features/channels/components/dialogs/advanced-custom-editor-dialog.tsx:381
↓ 3 callersFunctioncreateRowId
()
web/src/features/channels/components/model-mapping-editor.tsx:133
↓ 3 callersFunctioncreateTestUserAccessToken
(t *testing.T, userID int, raw string, expiresAt int64)
model/user_update_test.go:484
↓ 3 callersFunctioncreateUserBindTestUser
(t *testing.T)
model/user_update_test.go:36
↓ 3 callersFunctioncredentialIndex
(info *relaycommon.RelayInfo)
relay/channel/providerplugin/adaptor.go:579
↓ 3 callersFunctiondecodeConvertedRequest
decodeConvertedRequest reads a request a hook returns: body, form, file or, for the first request, websocket; contentType, path or url, method, header
pluginkit/provider.go:702
↓ 3 callersFunctiondecodeFlowQuotaResponse
(t *testing.T, recorder *httptest.ResponseRecorder)
controller/usedata_flow_test.go:55
↓ 3 callersFunctiondecodeListModelsResponse
(t *testing.T, recorder *httptest.ResponseRecorder)
controller/model_list_test.go:157
↓ 3 callersFunctiondecodeSecurityEnrollmentResponse
(t *testing.T, response *httptest.ResponseRecorder)
controller/security_enrollment_test.go:413
↓ 3 callersFunctiondecodeWithFlexibleTimes
decodeWithFlexibleTimes unmarshals API responses while tolerating timestamp strings that omit timezone information by normalizing them to RFC3339Nano.
pkg/ionet/jsonutil.go:13
↓ 3 callersFunctiondeepCopyFixture
deepCopyFixture guards against converters mutating shared fixture state between subtests (JSON round-trip through the concrete type).
relaykit/relayconvert/golden_test.go:385
↓ 3 callersFunctiondeepSeekRunEffort
deepSeekRunEffort is the effort DeepSeek runs: none with thinking off, its default high when no effort is sent, and the levels it does not implement m
relay/channel/deepseek/adaptor.go:272
↓ 3 callersFunctiondeepSeekThinking
deepSeekThinking returns the model name to send with DeepSeek's thinking switch and effort. An explicit @ modifier (the reasoning state) wins over a -
relay/channel/deepseek/adaptor.go:247
↓ 3 callersFunctiondefaultPluginProtocolBridgeDeps
()
controller/plugin_protocol.go:58
↓ 3 callersFunctiondefaultPricingMaps
()
model/model_pricing_config.go:86
↓ 3 callersFunctiondefaultResolution
(model)
plugins/tasks/hailuo/plugin.js:228
↓ 3 callersFunctiondeleteEmptyStrings
(value map[string]any)
relaykit/relayconvert/internal/toolconv/encode.go:1704
↓ 3 callersFunctionderiveInstallState
( plugin: MarketplacePlugin, installed: TaskPluginListItem[] )
web/src/features/task-plugins/lib/marketplace.ts:390
↓ 3 callersFunctionderiveLaneRatio
( lane: LaneKey, price: string, nextPromptPrice = promptPrice, nextLanePrices = lanePrices )
web/src/features/system-settings/models/model-pricing-sheet.tsx:448
↓ 3 callersFunctionderiveModelMappingPairs
( models: readonly string[], direction: ModelMappingDirection, rule: ModelMappingRule )
web/src/features/channels/lib/model-mapping-rules.ts:51
↓ 3 callersMethoddispatch
(c *gin.Context)
router/plugin-router.go:434
↓ 3 callersMethoddoFetchDescriptor
(baseURL, key, proxy string, descriptor requestDescriptor)
relay/channel/task/jsplugin/adaptor.go:716
↓ 3 callersFunctiondoTaskMediaRequest
(client *http.Client, request *http.Request, responseHeaderTimeout time.Duration)
controller/video_proxy.go:447
↓ 3 callersMethoddoneDeltaEvents
()
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:610
↓ 3 callersFunctiondowngradeUserGroupForSubscriptionTx
(tx *gorm.DB, sub *UserSubscription, now int64)
model/subscription.go:452
↓ 3 callersMethoddrain
drain writes the ready events in order; all writes every event.
relay/requestplugin/reply.go:1371
↓ 3 callersFunctioneditTagChannels
( params: TagOperationParams )
web/src/features/channels/api.ts:704
↓ 3 callersFunctioneffectivePlugins
(factory, override map[string]*LoadedPlugin)
pkg/jsplugin/routing.go:495
↓ 3 callersFunctionemailQuery
(tx *gorm.DB, email string)
model/user.go:315
↓ 3 callersFunctionencryptPassword
( password: string )
web/src/features/auth/lib/password-encryption.ts:43
↓ 3 callersFunctionendpointIndexKey
(method, path, model string)
pkg/jsplugin/routing.go:619
↓ 3 callersFunctionenrichModels
enrichModels keeps configured endpoints intact and derives connections from enabled routes, including hidden or unpriced models absent from the catalo
controller/model_meta.go:248
← previousnext →2,501–2,600 of 15,592, ranked by callers