Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QuantumNous/new-api
/ functions
Functions
15,409 in github.com/QuantumNous/new-api
⨍
Functions
15,409
◇
Types & classes
2,241
↓ 2 callers
Function
buildTestRequest
(model string, endpointType string, channel *model.Channel, isStream bool)
controller/channel-test.go:745
↓ 2 callers
Function
buildTimeRangeParams
* Build time range parameters with default values * Shared logic for all log types
web/src/features/usage-logs/lib/utils.ts:100
↓ 2 callers
Function
buildUpstreamModelUpdateTaskNotificationContent
( lang string, checkedChannels int, changedChannels int, detectedAddModels int, detectedRemoveModels int,
controller/channel_upstream_update.go:679
↓ 2 callers
Function
buildUserFilterOptions
( rows: FlowQuotaDataItem[], metric: FlowMetric = 'quota', palette?: readonly string[] )
web/src/features/dashboard/lib/flow.ts:841
↓ 2 callers
Function
buildUserOAuthBindingsResponse
(userId int)
controller/custom_oauth.go:436
↓ 2 callers
Function
buildVendorOperationPreview
(db *gorm.DB, operation VendorOperation)
model/vendor_management.go:109
↓ 2 callers
Function
builtInKlingProtocolSDKFixture
(t *testing.T, taskID string)
controller/plugin_protocol_sdk_test.go:224
↓ 2 callers
Function
bulkFailedTasks
bulkFailedTasks are the tasks of upstream ids a bulk update failed.
service/task_polling.go:718
↓ 2 callers
Function
bytesToBase64
(bytes: Uint8Array)
web/src/features/task-plugins/lib/plugin-icon-file.ts:48
↓ 2 callers
Function
cacheDecrUserQuota
(userId int, delta int64)
model/user_cache.go:167
↓ 2 callers
Function
cacheSetTokenForTest
cacheSetTokenForTest 以测试身份写入完整 token 缓存(含额度字段), 模拟“已水合”的缓存状态。
model/token_auto_groups_cache_test.go:78
↓ 2 callers
Function
cacheTryReserveTokenQuota
(id int, key string, amount int64)
model/quota_reserve.go:93
↓ 2 callers
Function
cacheWriteTokensTotal
(summary textQuotaSummary)
service/text_quota.go:83
↓ 2 callers
Function
cachedLoginSessionKey
(t *testing.T, server *miniredis.Miniredis)
service/auth_session_test.go:87
↓ 2 callers
Function
calcViolationFeeQuota
(amount, groupRatio float64)
service/violation_fee.go:84
↓ 2 callers
Function
calculateUserPermissions
计算用户权限的辅助函数
controller/user.go:529
↓ 2 callers
Method
call
call runs login while the flow is claimed and stores its result.
service/provider_plugin_login.go:483
↓ 2 callers
Method
callID
()
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:918
↓ 2 callers
Function
callLogHandler
callLogHandler runs a log handler as the given user and returns the JSON lines of the response.
controller/log_export_test.go:28
↓ 2 callers
Function
callLogTaskConsumption
(t *testing.T, info *relaycommon.RelayInfo, task *model.Task)
service/task_billing_test.go:293
↓ 2 callers
Function
callMemoryLimit
callMemoryLimit is the memory, in bytes, the JavaScript of one hook call may keep before the runtime stops it; 0 means no limit. When the call's alloc
pkg/jsplugin/engine.go:36
↓ 2 callers
Function
callName
(node, sourceCode)
web/scripts/oxlint/intl-locale.mjs:54
↓ 2 callers
Function
callXAI
(t *testing.T, plugin *jsplugin.LoadedPlugin, path []string, args ...any)
plugins/xai_responses_test.go:36
↓ 2 callers
Method
callbackInput
callbackInput checks callback parameters against the flow and returns the plugin input for them.
service/provider_plugin_login.go:399
↓ 2 callers
Function
cancel
(notify: boolean)
web/src/features/playground/hooks/use-stream-request.ts:169
↓ 2 callers
Function
cancelResultTimeout
()
web/src/routes/oauth/$provider.tsx:139
↓ 2 callers
Function
canonicalHost
(value *url.URL)
pkg/jsplugin/request.go:79
↓ 2 callers
Function
canonicalUsageLimit
(key string)
relay/channel/task/jsplugin/adaptor.go:2131
↓ 2 callers
Function
categorizeModels
( models: readonly string[] )
web/src/features/channels/lib/model-categories.ts:26
↓ 2 callers
Function
channel
(id: number)
web/src/features/channels/lib/__tests__/channel-table-row-id.test.ts:24
↓ 2 callers
Function
channelAddress
channelAddress normalizes a url value of meta.channelConfig as the plugin's meta.baseUrl is: an absolute http(s) URL with an ASCII host and no credent
pkg/jsplugin/config_schema.go:326
↓ 2 callers
Function
channelAffinityUsageCacheEntryKey
(ruleName, usingGroup, keyFp string)
service/channel_affinity.go:922
↓ 2 callers
Function
channelHasSensitiveChanges
(channel *PatchChannel, origin *model.Channel, requestData map[string]any)
controller/channel_authz.go:5
↓ 2 callers
Function
channelMatchesFilter
(ch *Channel, modelName string, filter dto.ChannelFilter)
model/channel_constraint.go:92
↓ 2 callers
Function
channelOwnerName
(channelType int)
controller/model.go:123
↓ 2 callers
Function
channelPriorityRevision
(items []ChannelPriority)
model/channel_priority.go:53
↓ 2 callers
Function
channelRelayConfig
channelRelayConfig returns the relay routes of a task plugin channel's plugin, nil for any other channel. It reads the setting without GetSetting, whi
model/channel_plugin_credential.go:222
↓ 2 callers
Function
channelSelectChannelTypesField
(channelType int)
service/channel_select_test.go:126
↓ 2 callers
Function
channelSelectEndpointPluginSource
(key string, channelType int)
service/channel_select_test.go:101
↓ 2 callers
Function
channelSelectTaskPluginSource
(key string, channelType int)
service/channel_select_test.go:82
↓ 2 callers
Method
channelSetting
channelSetting is the executing channel's settings when the adaptor runs with channel metadata; zero otherwise.
relay/channel/task/jsplugin/adaptor.go:1533
↓ 2 callers
Function
chatAnnotationsToClaude
(raw json.RawMessage, text string)
relaykit/relayconvert/internal/oai_chat/citations.go:11
↓ 2 callers
Function
chatAnnotationsToResponses
(raw []byte)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_resp.go:121
↓ 2 callers
Function
chatArgumentsRawMessage
(arguments string)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_resp.go:280
↓ 2 callers
Function
chatLinkRequiresApiKey
(url: string)
web/src/features/chat/lib/chat-links.ts:87
↓ 2 callers
Function
chatStreamChunk
(raw string)
relaykit/relayconvert/golden_test.go:436
↓ 2 callers
Function
chatText
chatText joins the delta text of a Chat Completions stream.
relay/requestplugin/requestplugin_test.go:1046
↓ 2 callers
Function
chatToGeminiStreamState
(info *relaycommon.RelayInfo, streamResponse *dto.ChatCompletionsStreamResponse)
relay/channel/openai/helper.go:80
↓ 2 callers
Function
checkAccessTokenIdentity
checkAccessTokenIdentity locks users before user_access_tokens, matching CreateUserAccessToken, and reports every mismatch as an inactive session.
model/user_access_token.go:267
↓ 2 callers
Function
checkAndSendQuotaNotify
(relayInfo *relaycommon.RelayInfo, quota int, preConsumedQuota int)
service/quota.go:488
↓ 2 callers
Function
checkClusterNameAvailability
(name: string)
web/src/features/models/api.ts:625
↓ 2 callers
Function
checkConditions
(doc *ojson.Doc, contextJSON string, conditions []ConditionOperation, logic string)
relay/common/override.go:651
↓ 2 callers
Function
checkDangerousContent
(content string, index int, messages itemMessages)
setting/console_setting/validation.go:69
↓ 2 callers
Function
checkGolden
(t *testing.T, name string, got []byte)
relaykit/relayconvert/golden_test.go:62
↓ 2 callers
Function
checkKling4Body
(body)
plugins/tasks/kling/plugin.js:307
↓ 2 callers
Function
checkMySQLChineseSupport
checkMySQLChineseSupport ensures the MySQL connection and current schema default charset/collation can store Chinese characters. It allows common Chin
model/main.go:722
↓ 2 callers
Function
checkPluginChannelKeys
checkPluginChannelKeys runs the checkKey of a task plugin channel's plugin on the key lines an administrator typed in: those of key that storedKey doe
controller/channel.go:1648
↓ 2 callers
Function
checkRedisRateLimit
检查Redis中的请求限制
middleware/model-rate-limit.go:29
↓ 2 callers
Function
checkResponsesWSModelAccess
checkResponsesWSModelAccess applies the token model limit with the same name matching as the HTTP distributor. Unlike HTTP, it also runs for requests
relay/responses_websocket.go:1067
↓ 2 callers
Function
checkSampleString
checkSampleString refuses a string that is or looks like media or a link.
pkg/jsplugin/sample.go:174
↓ 2 callers
Method
checkValue
checkValue validates a value a field declares itself: its default or an example.
pkg/jsplugin/config_schema.go:719
↓ 2 callers
Function
checkVerificationMethods
( scope: SecurityProofScope, signal?: AbortSignal )
web/src/features/auth/secure-verification/api.ts:52
↓ 2 callers
Method
claimAndCall
claimAndCall takes the current step for this submit, so a repeated or concurrent submit of it cannot call the plugin again, and calls login.
service/provider_plugin_login.go:455
↓ 2 callers
Method
claimed
claimed reports a submit that is still running on the current step.
service/provider_plugin_login.go:478
↓ 2 callers
Function
clampGeminiBudget
(budget int, capabilities geminiCapabilities)
relaykit/relayconvert/reasoning/gemini.go:533
↓ 2 callers
Function
classifyDashboardCredential
(c *gin.Context)
middleware/auth.go:205
↓ 2 callers
Function
classifyPollHTTP
(statusCode int)
service/task_polling.go:814
↓ 2 callers
Function
classifyValue
(run: FadeRun, value: string)
web/src/components/ai-elements/response-fade.ts:189
↓ 2 callers
Function
claudeBillingUsageFromSemanticUsage
(usage *dto.Usage)
relaykit/relayconvert/internal/claude_messages/to_oai_chat_resp.go:399
↓ 2 callers
Function
claudeCitationsToChat
(raw json.RawMessage, text string, textOffset int)
relaykit/relayconvert/internal/claude_messages/citations.go:12
↓ 2 callers
Function
claudeImageSourceURL
claudeImageSourceURL is the Chat image_url for a Claude image source: a data URL for base64 data or the URL of a url source. Other sources, such as Fi
relaykit/relayconvert/internal/claude_messages/to_oai_chat_req.go:327
↓ 2 callers
Function
claudeReasoningDiagnostic
(code string, message string)
relaykit/relayconvert/reasoning/claude.go:380
↓ 2 callers
Function
claudeRequestReasoningIntent
(ctx context.Context, claudeRequest *dto.ClaudeRequest, info convmeta.Meta)
relaykit/relayconvert/internal/claude_messages/to_oai_responses_req.go:87
↓ 2 callers
Function
claudeResultTypeFromHostedKind
(kind Kind)
relaykit/relayconvert/internal/toolconv/response_artifacts.go:810
↓ 2 callers
Function
claudeSourceURL
(source *dto.ClaudeMessageSource)
relaykit/relayconvert/internal/claude_messages/to_oai_responses_req.go:321
↓ 2 callers
Function
claudeStreamChunk
(raw string)
relaykit/relayconvert/golden_test.go:442
↓ 2 callers
Function
claudeToGeminiStreamState
(info *relaycommon.RelayInfo)
relay/channel/claude/relay-claude.go:187
↓ 2 callers
Function
claudeWebSearchSupportsResponseInclusion
(toolType string)
relaykit/relayconvert/internal/toolconv/decode.go:855
↓ 2 callers
Function
clearChannelReadOnlyFields
(channel *PatchChannel, requestData map[string]any)
controller/channel_authz.go:94
↓ 2 callers
Method
clearExpiredItems
clearExpiredItems periodically removes expired entries from the LRU tail.
common/rate-limit.go:100
↓ 2 callers
Function
clearPendingTimer
()
web/src/features/channels/lib/channel-field-update.ts:39
↓ 2 callers
Function
clickHouseCreateTableHasTTL
(createTableSQL string)
model/main.go:498
↓ 2 callers
Function
clickHouseLogCreateTableSQL
(ttlDays int)
model/main.go:445
↓ 2 callers
Function
clickHouseLogTTLClause
(ttlDays int)
model/main.go:437
↓ 2 callers
Function
clientVisibleClaudeStreamUsage
(state *convmeta.ClaudeConvertInfo, incoming *dto.Usage)
relaykit/relayconvert/internal/oai_chat/to_claude_messages_resp.go:93
↓ 2 callers
Function
cloneMeta
(meta Meta)
pkg/jsplugin/registry.go:1217
↓ 2 callers
Function
cloneRelayRoutes
(routes []dto.AdvancedCustomRoute)
pkg/jsplugin/registry.go:269
↓ 2 callers
Function
cloneResponseConverterSpec
(spec ResponseConverterSpec)
relaykit/relayconvert/response_registry.go:806
↓ 2 callers
Function
cloneStringSet
(source map[string]struct{})
pkg/jsplugin/routing.go:772
↓ 2 callers
Function
cloneTextConverterSpec
(spec TextConverterSpec)
relaykit/relayconvert/text_converter_registry.go:366
↓ 2 callers
Function
cloneTextConverterStrings
(values []string)
relaykit/relayconvert/text_converter_registry.go:373
↓ 2 callers
Function
closeActiveSource
(target: StreamEventSource)
web/src/features/playground/hooks/use-stream-request.ts:65
↓ 2 callers
Function
codexResponsesToolsRequest
(t *testing.T, toolChoice any, extraTools ...map[string]any)
relaykit/relayconvert/internal/toolconv/policy_test.go:105
↓ 2 callers
Function
collectContent
(texts, content, inToolResult)
plugins/tasks/request-filter/plugin.js:148
↓ 2 callers
Function
collectPendingApplyUpstreamModelChanges
(settings dto.ChannelOtherSettings)
controller/channel_upstream_update.go:1109
↓ 2 callers
Function
collectTexts
(body)
plugins/tasks/request-redact/plugin.js:270
↓ 2 callers
Function
collectUserIDs
(users []*User)
model/user_pagination_test.go:30
↓ 2 callers
Function
commitRun
(state: FadeState)
web/src/components/ai-elements/response-fade.ts:160
↓ 2 callers
Function
commonFields
(source, body)
plugins/tasks/xai/plugin.js:182
↓ 2 callers
Function
compactFlowSelectionLabel
(count: number)
web/src/features/dashboard/lib/flow-selection.ts:56
← previous
next →
3,701–3,800 of 15,409, ranked by callers