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
↓ 4 callers
Function
asOAIChatStreamResponse
(response any)
relaykit/relayconvert/response_registry.go:1269
↓ 4 callers
Function
assertBilledAlike
assertBilledAlike checks that a plugin channel billed a request as the Advanced Custom channel did.
router/provider_plugin_relay_test.go:1496
↓ 4 callers
Function
assertChannelRoutePermission
(t *testing.T, method string, path string, permission authz.Permission, handler any)
router/channel_router_test.go:63
↓ 4 callers
Method
attachments
Stage hooks only: the request's files in body order, then the file parts of a form body. The host never downloads a file the request only names.
docs/plugin-api/v1.d.ts:31
↓ 4 callers
Function
auditFieldLabel
(key: string, t: TFunction)
web/src/features/usage-logs/audit/lib/audit-details.ts:83
↓ 4 callers
Function
awaitH2ServerResult
(t *testing.T, resultCh <-chan h2ServerResult)
relay/channel/api_request_getbody_test.go:329
↓ 4 callers
Function
baseAutoTokenRequest
(name string)
controller/token_auto_groups_test.go:56
↓ 4 callers
Function
batchUpdate
()
model/utils.go:64
↓ 4 callers
Function
bearerHeaderAuth
()
web/src/features/channels/lib/advanced-custom.ts:220
↓ 4 callers
Function
beginSecurityLoginPasskey
(t *testing.T, parentToken string)
controller/auth_flow_test.go:47
↓ 4 callers
Function
benchmarkAlibaba
(b *testing.B)
relay/channel/task/jsplugin/performance_test.go:22
↓ 4 callers
Function
body
(parts: string)
web/src/features/task-plugins/__tests__/request-plugin-samples.test.ts:71
↓ 4 callers
Function
bucketStart
(ts int64)
pkg/perf_metrics/metrics.go:425
↓ 4 callers
Function
buildChannelAffinityCacheKeySuffix
(rule operation_setting.ChannelAffinityRule, modelName string, usingGroup string, affinityValue string)
service/channel_affinity.go:339
↓ 4 callers
Function
buildClaudeUsageFromOpenAIUsage
(oaiUsage *dto.Usage)
relaykit/relayconvert/internal/oai_chat/to_claude_messages_resp.go:89
↓ 4 callers
Function
buildDefaultDashboardFilters
( preferences: DashboardChartPreferences = getSavedChartPreferences() )
web/src/features/dashboard/lib/filters.ts:143
↓ 4 callers
Function
buildMaskedTokenResponse
(token *model.Token)
controller/token.go:57
↓ 4 callers
Function
buildResponsesWSErrorPayload
(eventID, streamID string, apiErr *types.NewAPIError, upstreamURLs ...string)
relay/responses_websocket.go:1045
↓ 4 callers
Function
buildSettingJSON
(formData: ChannelFormValues)
web/src/features/channels/lib/channel-form.ts:688
↓ 4 callers
Function
buildUsageFromGeminiMetadata
(metadata *dto.GeminiUsageMetadata, fallbackPromptTokens int)
relay/channel/gemini/relay-gemini.go:27
↓ 4 callers
Function
cacheApplyTokenQuotaDelta
(id int, key string, delta int64)
model/quota_reserve.go:99
↓ 4 callers
Function
cacheInitToken
cacheInitToken publishes database metadata when the hash is cold or fails verification. Existing quota counters survive repairs because pre-consume ca
model/token_cache.go:73
↓ 4 callers
Method
cacheMAC
()
model/token_cache.go:12
↓ 4 callers
Function
calcNextResetTime
(base time.Time, plan *SubscriptionPlan, endUnix int64)
model/subscription.go:356
↓ 4 callers
Method
capture
capture starts keeping what the client gets for Report once an instance that may report the request is in scope: at the request's ingress, or at a cha
relay/requestplugin/report.go:108
↓ 4 callers
Function
capturePointer
( event: ReactPointerEvent<HTMLElement>, capture: boolean )
web/src/components/floating-window.tsx:264
↓ 4 callers
Function
ceilDiv
(a, b int)
tokenkit/image.go:288
↓ 4 callers
Method
channelType
channelType is the executing channel's type when polling or content fetches run with channel metadata; zero otherwise, which is a vendor upstream.
relay/channel/task/jsplugin/adaptor.go:1524
↓ 4 callers
Function
chatAnswer
(content string)
relay/requestplugin/requestplugin_test.go:1019
↓ 4 callers
Function
chatChunk
(content string, finish string)
relay/requestplugin/requestplugin_test.go:1025
↓ 4 callers
Function
checkIsActive
( href: string, item: NavItem, mainNav = false )
web/src/components/layout/lib/url-utils.ts:57
↓ 4 callers
Function
chooseDB
(envName string, isLog bool)
model/main.go:140
↓ 4 callers
Function
clampPosition
( position: FloatingWindowPosition, width: number )
web/src/components/floating-window.tsx:133
↓ 4 callers
Function
cleanupAuthArtifacts
()
service/auth_cleanup.go:29
↓ 4 callers
Function
clearAuthenticatedClientState
( queryClient: QueryClient, synchronizeTabs = true )
web/src/lib/auth-session.ts:199
↓ 4 callers
Function
clearChannelInfo
(channel *model.Channel)
controller/channel.go:72
↓ 4 callers
Function
clientCacheKey
(proxyCacheKey string, policy HTTPTransportPolicy)
service/http_client.go:143
↓ 4 callers
Method
clone
()
pkg/requestpatch/patch.go:459
↓ 4 callers
Function
cloneHostedOutput
(output *dto.ResponsesOutput)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:982
↓ 4 callers
Function
cloneOpenAIUsage
(usage *Usage)
relaykit/dto/billing_usage.go:386
↓ 4 callers
Function
clonePluginMap
(source map[string]*LoadedPlugin)
pkg/jsplugin/registry.go:1318
↓ 4 callers
Function
compileEntryFromCacheByHash
(exprStr, hash string)
pkg/billingexpr/compile.go:189
↓ 4 callers
Function
compileFromCacheByHash
(exprStr, hash string)
pkg/billingexpr/compile.go:181
↓ 4 callers
Function
compileProtocolPlugin
(t *testing.T, key, models, protocols, exports string)
pkg/jsplugin/protocol_supports_test.go:226
↓ 4 callers
Function
composeTieredTextQuota
(relayInfo *relaycommon.RelayInfo, summary textQuotaSummary, tieredQuota int, tieredResult *billingexpr.Tiered
service/text_quota.go:201
↓ 4 callers
Function
conditionRange
( node: VisualCondition )
web/src/features/system-settings/models/visual-condition-tree.tsx:64
↓ 4 callers
Function
confirmUserSessionActiveSnapshot
(session *UserSession)
model/user_session.go:380
↓ 4 callers
Function
convertImage
(ctx)
plugins/tasks/alibaba/plugin.js:511
↓ 4 callers
Function
countGeminiBillableFunctionCalls
(info *relaycommon.RelayInfo, response *dto.GeminiChatResponse)
relay/channel/gemini/relay-gemini.go:131
↓ 4 callers
Function
createAccessTokenTestSession
createAccessTokenTestSession returns a browser session identity and the dashboard JWT that carries it.
controller/access_token_audit_test.go:125
↓ 4 callers
Function
createAccessTokenTestUser
(t *testing.T, username string)
model/user_update_test.go:410
↓ 4 callers
Function
createDefaultTaskVisualConfig
( schema: BillingUsageSchema )
web/src/features/pricing/lib/task-expr.ts:104
↓ 4 callers
Function
createLoadingAssistantMessage
( startedAt: number = Date.now() )
web/src/features/playground/lib/message/message-utils.ts:92
↓ 4 callers
Function
createMiddlewareScopedToken
(t *testing.T, userID int, expiresAt int64, scopes ...string)
middleware/auth_test.go:369
↓ 4 callers
Function
createOAuthAuthorization
( provider: string, intent: 'login' | 'bind' | 'verify', operation?: VerificationOperation, signal?: A
web/src/features/auth/api.ts:173
↓ 4 callers
Function
createReserveTestToken
(t *testing.T, remainQuota int)
model/quota_reserve_test.go:30
↓ 4 callers
Function
createTaskError
(err error, code string, statusCode int, localError bool)
relay/common/relay_utils.go:110
↓ 4 callers
Function
customToolInputFromArguments
customToolInputFromArguments unwraps the raw custom tool input from the {"input": ...} arguments a Chat function call carries. Arguments of any other
relaykit/relayconvert/internal/oai_chat/to_oai_responses_resp.go:261
↓ 4 callers
Function
decideTaskRetry
decideTaskRetry is the single retry decision for task submissions. The reason is recorded in the request policy decision events of the log details.
controller/relay.go:995
↓ 4 callers
Function
decodeDataWithFlexibleTimes
(data []byte, target *T)
pkg/ionet/jsonutil.go:39
↓ 4 callers
Function
decodeImageConfig
decodeImageConfig 从字节数据解码图片配置
service/file_service.go:465
↓ 4 callers
Method
deleteExpiredEntries
deleteExpiredEntries walks only the oldest LRU entries and stops at the first active key.
common/rate-limit.go:107
↓ 4 callers
Function
detectHEIF
detectHEIF checks ISOBMFF magic bytes to detect HEIC/HEIF files. Returns "image/heic", "image/heif", or "" if not recognized.
service/file_service.go:496
↓ 4 callers
Method
disconnect
()
web/src/test-setup.ts:93
↓ 4 callers
Function
distributorEndpointPluginSource
(key string, channelType int)
middleware/distributor_test.go:209
↓ 4 callers
Function
doAwsClientRequest
(c *gin.Context, info *relaycommon.RelayInfo, a *Adaptor, requestBody io.Reader)
relay/channel/aws/relay-aws.go:97
↓ 4 callers
Function
encode
(writer io.Writer, event CustomEvent)
common/custom-event.go:59
↓ 4 callers
Method
endStream
endStream ends the outputs of a stream: the instances read the rest of the text, and every event waiting goes out.
relay/requestplugin/reply.go:1503
↓ 4 callers
Function
ensureEmailAvailableWithTx
(tx *gorm.DB, email string, excludeUserID int)
model/user.go:656
↓ 4 callers
Function
ensureMapKeyInContext
(context map[string]any, key string)
relay/common/override.go:1612
↓ 4 callers
Method
event
(event dto.PluginResponsesStreamEvent)
relay/plugin_protocol.go:996
↓ 4 callers
Method
event
event passes one event of a response through its check.
relay/requestplugin/socket.go:570
↓ 4 callers
Function
exceedsMaxCharacters
(s string, max int)
setting/console_setting/validation.go:34
↓ 4 callers
Function
expressionDependencies
(node: ExpressionNode)
web/src/features/pricing/lib/billing-expression/types.ts:202
↓ 4 callers
Function
fetchFromPluginSite
( input: RequestInfo | URL, init?: RequestInit )
web/src/features/task-plugins/lib/plugin-site.ts:40
↓ 4 callers
Function
finalizeMessage
( message: Message, apiReasoningContent?: string | null )
web/src/features/playground/lib/message/message-streaming-utils.ts:121
↓ 4 callers
Method
finish
finish ends the checks of the attempt: an answer still waiting is checked and written, a stream's outputs end and its events go out. After a stop the
relay/requestplugin/reply.go:1527
↓ 4 callers
Function
firstImage
(req)
plugins/tasks/alibaba/plugin.js:436
↓ 4 callers
Function
firstValues
(header http.Header)
relay/channel/providerplugin/adaptor.go:777
↓ 4 callers
Function
flowPathForStages
( row: FlowQuotaDataItem, stages: FlowNodeKind[], ctx: FlowPathContext = EMPTY_FLOW_PATH_CONTEXT )
web/src/features/dashboard/lib/flow.ts:275
↓ 4 callers
Function
formatChannelBalanceSummary
( result: ChannelBalanceResult | null | undefined, usdBalance: number, options: CurrencyFormatOptions =
web/src/features/channels/lib/channel-balance.ts:77
↓ 4 callers
Function
formatDateTimeObject
(date: Date)
web/src/lib/time.ts:152
↓ 4 callers
Function
formatJsonForTextarea
(value: string)
web/src/features/system-settings/models/utils.ts:19
↓ 4 callers
Function
fromRequestPluginConfigDraft
( schema: RequestPluginConfigShape | undefined, draft: RequestPluginConfigDraft, prefix = '' )
web/src/features/task-plugins/lib/request-plugins.ts:324
↓ 4 callers
Function
geminiCapabilitiesFor
(model string)
relaykit/relayconvert/reasoning/gemini.go:35
↓ 4 callers
Function
getCookie
(name: string)
web/src/lib/cookies.ts:29
↓ 4 callers
Function
getDefaultAdvancedCustomIncomingPath
( converter: AdvancedCustomConverter )
web/src/features/channels/lib/advanced-custom.ts:518
↓ 4 callers
Function
getDefaultDays
(granularity?: TimeGranularity)
web/src/features/dashboard/lib/filters.ts:138
↓ 4 callers
Function
getDefaultTimeRange
()
web/src/features/usage-logs/lib/utils.ts:80
↓ 4 callers
Function
getJSONList
(jsonStr string)
setting/console_setting/validation.go:79
↓ 4 callers
Function
getLogTypeConfig
(type: number)
web/src/features/usage-logs/lib/utils.ts:66
↓ 4 callers
Function
getMinTopupAmount
(topupInfo: TopupInfo | null)
web/src/features/wallet/lib/payment.ts:171
↓ 4 callers
Function
getModelListGroups
(c *gin.Context)
controller/model.go:188
↓ 4 callers
Function
getModuleAccessForGuard
( queryClient: QueryClient, module: HeaderNavModule )
web/src/lib/nav-modules.ts:184
↓ 4 callers
Function
getNameRuleConfig
( t: TFunction )
web/src/features/models/constants.ts:42
↓ 4 callers
Function
getRollingDateRange
( days: number, fromDate: Date = new Date() )
web/src/lib/time.ts:90
↓ 4 callers
Function
getSuccessRateDotClass
(rate: number)
web/src/features/performance-metrics/lib/format.ts:92
↓ 4 callers
Function
getSyncExpressionPricing
( expression: string, t: (key: string) => string, currency = USD_PRICING_CURRENCY )
web/src/features/system-settings/models/upstream-ratio-sync-helpers.ts:161
↓ 4 callers
Function
getSyncPriceKind
( values?: PricingSyncValues )
web/src/features/system-settings/models/upstream-ratio-sync-helpers.ts:67
↓ 4 callers
Function
getSyncPriceLines
( values: PricingSyncValues, t: (key: string) => string, currency = USD_PRICING_CURRENCY )
web/src/features/system-settings/models/upstream-ratio-sync-helpers.ts:111
← previous
next →
1,801–1,900 of 15,409, ranked by callers