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
↓ 3 callers
Function
claudeMCPInputFromResponses
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 callers
Function
claudeMessageContentParts
(content any)
relaykit/relayconvert/internal/oai_responses/to_claude_messages_req.go:314
↓ 3 callers
Function
claudeNameFromHostedKind
(kind Kind)
relaykit/relayconvert/internal/toolconv/response_artifacts.go:752
↓ 3 callers
Function
claudeWebSearchInputFromResponses
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 callers
Function
cleanPDFText
cleanPDFText keeps valid, printable text and line breaks.
relay/requestplugin/pdf.go:370
↓ 3 callers
Function
clearPasswordEncryptionCache
()
web/src/features/auth/lib/password-encryption.ts:38
↓ 3 callers
Function
clickHouseLogTTLExpression
(ttlDays int)
model/main.go:430
↓ 3 callers
Function
cloneClaudeUsage
(usage *ClaudeUsage)
relaykit/dto/billing_usage.go:400
↓ 3 callers
Function
cloneGeminiUsageMetadata
(metadata GeminiUsageMetadata)
relaykit/dto/billing_usage.go:417
↓ 3 callers
Function
cloneRequestConverterSpec
(spec RequestConverterSpec)
relaykit/relayconvert/request_registry.go:394
↓ 3 callers
Function
cloneStringAnyMap
(src map[string]any)
service/channel_affinity.go:439
↓ 3 callers
Function
cloneStringMap
(src map[string]string)
relay/helper/billing_expr_request.go:123
↓ 3 callers
Function
collectPendingUpstreamModelChangesFromModels
( localModels []string, upstreamModels []string, ignoredModels []string, modelMapping map[string]string, )
controller/channel_upstream_update.go:182
↓ 3 callers
Function
commit
()
web/src/features/channels/components/model-mapping-editor.tsx:205
↓ 3 callers
Function
commonPointer
(value T)
relay/channel/claude/relay_claude_test.go:23
↓ 3 callers
Function
compareAny
(left any, right any)
oauth/generic.go:534
↓ 3 callers
Function
compareSystemVersions
( left: string | null | undefined, right: string | null | undefined )
web/src/features/system-update/releases.ts:68
↓ 3 callers
Function
compilePluginProtocolTestEndpointWithOptions
( t *testing.T, key string, source string, options pluginruntime.Options, )
controller/plugin_protocol_test.go:1449
↓ 3 callers
Function
compileRules
(config)
plugins/tasks/request-filter/plugin.js:328
↓ 3 callers
Method
complete
()
relay/plugin_protocol.go:940
↓ 3 callers
Function
computeTimeRange
( days: number, startDate?: Date, endDate?: Date, useStartOfDay = false )
web/src/lib/time.ts:108
↓ 3 callers
Function
configureRequestAutoGroupsTest
(t *testing.T)
service/group_auto_groups_test.go:17
↓ 3 callers
Function
configureSSRFTestFetchSetting
(t *testing.T)
service/protected_fetch_client_test.go:42
↓ 3 callers
Function
convert
(value any, target any)
relay/channel/task/jsplugin/adaptor.go:2151
↓ 3 callers
Function
convertChatCompatibilityRequest
(t *testing.T, request *dto.GeneralOpenAIRequest, channelType int, mapping map[string]string)
controller/channel_test_request_test.go:28
↓ 3 callers
Method
convertCrossProtocolChatRequest
convertCrossProtocolChatRequest converts a Claude, Gemini, or Responses request into an OpenAI chat completions request for an OpenAI-compatible upstr
relay/channel/advancedcustom/adaptor.go:575
↓ 3 callers
Function
convertImage
(ctx)
plugins/tasks/doubao/plugin.js:525
↓ 3 callers
Function
convertRowsToJson
(updatedRows: EditorRow[])
web/src/components/json-editor.tsx:99
↓ 3 callers
Function
convertedReqKey
(reqKey, imageCount)
plugins/tasks/jimeng/plugin.js:185
↓ 3 callers
Method
cpuSaturation
cpuSaturation 返回相对容器可用 CPU 的使用率(百分比)。 可用 CPU 取 cgroup 配额与可调度 CPU 的较小者:配额大于 cpuset 或节点核数时, 按配额计算会让容器打满也无法触发保护。 ok=false 表示当前环境没有可用的 cgroup CPU 数据,调用方应回
common/container_usage.go:43
↓ 3 callers
Function
createAdvancedCustomRoute
()
web/src/features/channels/lib/advanced-custom.ts:417
↓ 3 callers
Function
createAuthFlowWithTx
(tx *gorm.DB, input AuthFlowCreate)
model/auth_flow.go:152
↓ 3 callers
Function
createDefaultTaskMatrixConfig
( schema: BillingUsageSchema )
web/src/features/pricing/lib/task-expr.ts:121
↓ 3 callers
Function
createEmptyCondition
()
web/src/features/pricing/lib/billing-expr.ts:666
↓ 3 callers
Function
createEmptyTimeCondition
()
web/src/features/pricing/lib/billing-expr.ts:670
↓ 3 callers
Function
createInitialLaneState
(data?: ModelRatioData | null)
web/src/features/system-settings/models/model-pricing-core.ts:227
↓ 3 callers
Function
createRenderChildren
(fadeRun?: FadeRun)
web/src/components/ai-elements/response-renderer.tsx:58
↓ 3 callers
Function
createRouteKey
()
web/src/features/channels/components/dialogs/advanced-custom-editor-dialog.tsx:376
↓ 3 callers
Function
createRouteKeys
(count: number)
web/src/features/channels/components/dialogs/advanced-custom-editor-dialog.tsx:381
↓ 3 callers
Function
createRowId
()
web/src/features/channels/components/model-mapping-editor.tsx:133
↓ 3 callers
Function
createTestUserAccessToken
(t *testing.T, userID int, raw string, expiresAt int64)
model/user_update_test.go:425
↓ 3 callers
Function
createUserBindTestUser
(t *testing.T)
model/user_update_test.go:32
↓ 3 callers
Function
credentialIndex
(info *relaycommon.RelayInfo)
relay/channel/providerplugin/adaptor.go:579
↓ 3 callers
Function
decodeBillingExprB64
(exprB64: string | undefined)
web/src/features/usage-logs/lib/format.ts:264
↓ 3 callers
Function
decodeConvertedRequest
decodeConvertedRequest reads a request a hook returns: body, form, file or, for the first request, websocket; contentType, path or url, method, header
pkg/jsplugin/provider.go:704
↓ 3 callers
Function
decodeFlowQuotaResponse
(t *testing.T, recorder *httptest.ResponseRecorder)
controller/usedata_flow_test.go:55
↓ 3 callers
Function
decodeListModelsResponse
(t *testing.T, recorder *httptest.ResponseRecorder)
controller/model_list_test.go:155
↓ 3 callers
Function
decodeSecurityEnrollmentResponse
(t *testing.T, response *httptest.ResponseRecorder)
controller/security_enrollment_test.go:413
↓ 3 callers
Function
decodeWithFlexibleTimes
decodeWithFlexibleTimes unmarshals API responses while tolerating timestamp strings that omit timezone information by normalizing them to RFC3339Nano.
pkg/ionet/jsonutil.go:13
↓ 3 callers
Function
deepCopyFixture
deepCopyFixture guards against converters mutating shared fixture state between subtests (JSON round-trip through the concrete type).
relaykit/relayconvert/golden_test.go:385
↓ 3 callers
Function
deepSeekRunEffort
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 callers
Function
deepSeekThinking
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 callers
Function
defaultPluginProtocolBridgeDeps
()
controller/plugin_protocol.go:58
↓ 3 callers
Function
defaultPricingMaps
()
model/model_pricing_config.go:86
↓ 3 callers
Function
defaultResolution
(model)
plugins/tasks/hailuo/plugin.js:203
↓ 3 callers
Function
deleteEmptyStrings
(value map[string]any)
relaykit/relayconvert/internal/toolconv/encode.go:1697
↓ 3 callers
Function
deriveInstallState
( plugin: MarketplacePlugin, installed: TaskPluginListItem[] )
web/src/features/task-plugins/lib/marketplace.ts:390
↓ 3 callers
Function
deriveLaneRatio
( lane: LaneKey, price: string, nextPromptPrice = promptPrice, nextLanePrices = lanePrices )
web/src/features/system-settings/models/model-pricing-sheet.tsx:448
↓ 3 callers
Function
deriveModelMappingPairs
( models: readonly string[], direction: ModelMappingDirection, rule: ModelMappingRule )
web/src/features/channels/lib/model-mapping-rules.ts:51
↓ 3 callers
Method
dispatch
(c *gin.Context)
router/plugin-router.go:434
↓ 3 callers
Method
doFetchDescriptor
(baseURL, key, proxy string, descriptor requestDescriptor)
relay/channel/task/jsplugin/adaptor.go:888
↓ 3 callers
Function
doTaskMediaRequest
(client *http.Client, request *http.Request, responseHeaderTimeout time.Duration)
controller/video_proxy.go:432
↓ 3 callers
Method
doneDeltaEvents
()
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:610
↓ 3 callers
Function
downgradeUserGroupForSubscriptionTx
(tx *gorm.DB, sub *UserSubscription, now int64)
model/subscription.go:452
↓ 3 callers
Method
drain
drain writes the ready events in order; all writes every event.
relay/requestplugin/reply.go:1367
↓ 3 callers
Function
editTagChannels
( params: TagOperationParams )
web/src/features/channels/api.ts:688
↓ 3 callers
Function
effectivePlugins
(factory, override map[string]*LoadedPlugin)
pkg/jsplugin/routing.go:1105
↓ 3 callers
Function
emailQuery
(tx *gorm.DB, email string)
model/user.go:315
↓ 3 callers
Function
encryptPassword
( password: string )
web/src/features/auth/lib/password-encryption.ts:43
↓ 3 callers
Function
endpointIndexKey
(method, path, model string)
pkg/jsplugin/routing.go:861
↓ 3 callers
Function
enrichModels
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
↓ 3 callers
Method
ensureBuiltInTools
()
relay/common/tool_usage.go:106
↓ 3 callers
Method
ensureCreated
()
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:376
↓ 3 callers
Method
ensureMessageStart
(estimatedInputTokens int)
relaykit/relayconvert/internal/oai_responses/to_claude_messages_stream_resp.go:197
↓ 3 callers
Function
escapeHtml
(value: string)
web/src/components/ui/markdown.tsx:167
↓ 3 callers
Function
evaluatePasswordStrength
( password: string )
web/src/components/password-strength-utils.ts:151
↓ 3 callers
Function
execCustomToolState
()
relaykit/relayconvert/internal/oai_chat/to_oai_responses_resp_test.go:363
↓ 3 callers
Function
expandResponseConverterSteps
(spec ResponseConverterSpec)
relaykit/relayconvert/response_registry.go:756
↓ 3 callers
Function
extractChannelAffinityValue
(c *gin.Context, src operation_setting.ChannelAffinityKeySource)
service/channel_affinity.go:291
↓ 3 callers
Function
failTaskFromPoll
(ctx context.Context, adaptor TaskPollingAdaptor, task *model.Task, fromStatus model.TaskStatus, reason string
service/task_polling.go:898
↓ 3 callers
Function
fallbackPromptTokens
(info convmeta.Meta)
relaykit/relayconvert/response_registry.go:1251
↓ 3 callers
Function
fetchCodexChannelWhamData
( c *gin.Context, fetch codexWhamFetchFunc, logPrefix string, userMessage string, )
controller/codex_usage.go:55
↓ 3 callers
Method
fetchCount
()
service/task_polling_test.go:127
↓ 3 callers
Function
fetchMarketplaceIndex
( indexUrl: string )
web/src/features/task-plugins/lib/marketplace.ts:481
↓ 3 callers
Function
fetchPluginChangelog
(options: { indexUrl: string plugin: MarketplacePlugin version: string language: string signal: Abor
web/src/features/task-plugins/lib/plugin-changelog.ts:316
↓ 3 callers
Function
fetchPluginIconDataUri
( url: string, options: FetchPluginIconOptions = {} )
web/src/features/task-plugins/lib/plugin-icon-file.ts:113
↓ 3 callers
Function
fetchPluginSourceText
( url: string, fetchImpl: typeof fetch = fetchFromPluginSite )
web/src/features/task-plugins/lib/plugin-url.ts:99
↓ 3 callers
Function
fetchStatus
* The single `/api/status` request. * * Owns both side effects of a successful read — syncing the system-config store * and writing the localStorag
web/src/lib/status-query.ts:134
↓ 3 callers
Function
fetchTokenKey
( id: number )
web/src/features/keys/api.ts:112
↓ 3 callers
Function
fetchUpstreamModels
( id: number )
web/src/features/channels/api.ts:355
↓ 3 callers
Method
fetchedTaskIDs
()
service/task_polling_test.go:133
↓ 3 callers
Function
fileAttachment
(filename, mime string, data []byte)
plugins/request_plugins_test.go:1144
↓ 3 callers
Function
fileInput
()
web/src/features/task-plugins/__tests__/upload-dialog.test.tsx:67
↓ 3 callers
Function
filterCandidateIDs
filterCandidateIDs applies filters to a cached candidate id list. Caller must hold channelSyncLock (read lock). The input slice is never mutated. A mi
model/channel_constraint.go:42
↓ 3 callers
Function
finalizeTerminalTask
finalizeTerminalTask 终态统一收尾(状态 CAS 赢家调用,恰好一次):采样 + 结算 + 失败兜底退款。
service/task_polling.go:708
↓ 3 callers
Method
finish
(startxref int)
relay/requestplugin/pdf_test.go:78
↓ 3 callers
Function
finishAccessTokenAudit
(c *gin.Context)
middleware/audit.go:307
↓ 3 callers
Function
finishPluginLogin
finishPluginLogin answers a login call; a done step stored a credential, so the channel cache is reloaded and the change is audited.
controller/provider_plugin.go:53
↓ 3 callers
Function
firstVideo
(operation)
plugins/tasks/vertex-ai/plugin.js:348
↓ 3 callers
Function
flateBytes
(data []byte)
relay/requestplugin/pdf_test.go:122
← previous
next →
2,501–2,600 of 15,409, ranked by callers