Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QuantumNous/new-api
/ functions
Functions
15,592 in github.com/QuantumNous/new-api
⨍
Functions
15,592
◇
Types & classes
2,267
↓ 6 callers
Function
hashStringToSeed
(input: string)
web/src/features/pricing/lib/seed.ts:30
↓ 6 callers
Method
hookFetcher
hookFetcher sends a driver hook's utils.fetch requests to the hosts its request descriptors may use, through the channel's proxy like poll requests.
relay/channel/task/jsplugin/adaptor.go:712
↓ 6 callers
Function
insertOriginTaskChannel
(t *testing.T, status int)
middleware/task_plugin_origin_task_test.go:41
↓ 6 callers
Function
insertTask
(t *testing.T, task *Task)
model/task_cas_test.go:102
↓ 6 callers
Function
insertTaskPluginRouteTask
(t *testing.T, task *model.Task)
middleware/task_plugin_test.go:2047
↓ 6 callers
Function
isApiSuccess
(response: ApiResponse)
web/src/features/wallet/api.ts:51
↓ 6 callers
Function
isHttpUrl
(value: string)
web/src/lib/content-format.ts:19
↓ 6 callers
Function
isJsonObjectValue
(value: unknown)
web/src/features/channels/lib/channel-form.ts:118
↓ 6 callers
Function
isValidOtherRatio
(ratio float64)
types/price_data.go:115
↓ 6 callers
Function
isValidPricingCurrency
( currency: PricingCurrency | null )
web/src/features/model-pricing/currency.ts:51
↓ 6 callers
Method
makeChunk
(delta dto.ChatCompletionsStreamResponseChoiceDelta, finishReason *string)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:607
↓ 6 callers
Function
marshalSystemTaskJSON
(v any)
model/system_task.go:593
↓ 6 callers
Function
moderationResult
moderationResult is a moderation API reply with one result per categories map; a result is flagged when any of its categories is true.
plugins/request_plugins_test.go:591
↓ 6 callers
Function
mustAdvancedCustomRawMessage
(t *testing.T, value any)
relay/channel/advancedcustom/adaptor_test.go:1246
↓ 6 callers
Function
mustRawMessage
(t *testing.T, value any)
relaykit/relayconvert/request_registry_test.go:1061
↓ 6 callers
Function
mustStreamChunks
(t *testing.T, state *ResponsesToChatStreamState, event *dto.ResponsesStreamResponse)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_resp_test.go:585
↓ 6 callers
Function
mustUnmarshalFixture
(raw string, out any)
relaykit/relayconvert/golden_test.go:460
↓ 6 callers
Function
newAdvancedCustomModelListChannel
(baseURL string, key string, upstreamPath string, auth *dto.AdvancedCustomRouteAuth)
controller/channel_upstream_update_test.go:21
↓ 6 callers
Function
newClientIPRouter
()
middleware/trusted_proxies_test.go:24
↓ 6 callers
Function
newFakeSMTPServerWithSTARTTLSAdvertisement
(t *testing.T, advertiseSTARTTLS bool)
common/email_test.go:39
↓ 6 callers
Function
newHTTPClientWithPolicyAndTLS
newHTTPClientWithPolicyAndTLS is a test seam that builds a never-used transport stack with the given policy and TLS config (for httptest certificate t
service/http_client.go:384
↓ 6 callers
Function
newImageProtocolTestContext
(responseFormat string)
controller/plugin_protocol_test.go:1639
↓ 6 callers
Function
newResponsesChatTestContext
(t *testing.T, body string, isStream bool)
relay/channel/openai/chat_via_responses_test.go:22
↓ 6 callers
Function
newResponsesWSInvalidRequestError
(err error)
relay/responses_websocket.go:965
↓ 6 callers
Function
normalizeResponsesWSTestMessage
normalizeResponsesWSTestMessage runs the read-loop envelope parse followed by request normalization, exactly as the session does for one response.crea
relay/responses_websocket_test.go:35
↓ 6 callers
Function
noteQuotaClamp
noteQuotaClamp records the first quota saturation event onto relayInfo so it can later be attached to the consume/task log for admin auditing. First n
service/text_quota.go:192
↓ 6 callers
Function
openTaskDialectDatabase
Uses the real submit adaptor, expression evaluator, BillingSession, task row and consume log. Set TEST_TASK_DB_DIALECT plus TEST_MYSQL_DSN or TEST_POS
controller/relay_task_plugin_test.go:511
↓ 6 callers
Function
parseHttpStatusCodeRules
( input: unknown )
web/src/lib/http-status-code-rules.ts:32
↓ 6 callers
Function
parseLogOther
(other: string)
web/src/features/usage-logs/lib/format.ts:166
↓ 6 callers
Function
parseTags
(tagsString?: string)
web/src/features/pricing/lib/filters.ts:291
↓ 6 callers
Function
passkeyDomainRequest
(t *testing.T, path string, payload any, identity service.AuthIdentity, origin string, handler gin.HandlerFunc
controller/passkey_test.go:89
↓ 6 callers
Function
paymentReturnPath
(suffix string)
controller/return_path.go:9
↓ 6 callers
Function
performSharedRouteRequest
(router http.Handler, method, path, body string)
middleware/task_plugin_test.go:2424
↓ 6 callers
Function
persist
(reset = false)
web/src/features/model-pricing/model-pricing-panel.tsx:90
↓ 6 callers
Function
pluginErrorCategory
pluginErrorCategory names a plugin call failure for logs without its message, which may quote a vendor response.
service/provider_plugin.go:519
↓ 6 callers
Function
pluginMapKeys
(plugins map[string]*LoadedPlugin)
pkg/jsplugin/registry.go:528
↓ 6 callers
Method
prepareGeneration
( factory, override map[string]*LoadedPlugin, tolerateConflicts bool, retainCurrent map[string]struct{}, )
pkg/jsplugin/registry.go:321
↓ 6 callers
Function
pricingEndpointAdvancedCustomConfig
(routes ...dto.AdvancedCustomRoute)
model/pricing_endpoint_test.go:59
↓ 6 callers
Function
pricingFromDraft
(data: ModelRatioData)
web/src/features/model-pricing/pricing.ts:238
↓ 6 callers
Function
pricingRow
( name: string, values: PricingValues )
web/src/features/model-pricing/pricing.ts:199
↓ 6 callers
Function
ptr
(value T)
relaykit/relayconvert/internal/oai_chat/to_claude_messages_resp_test.go:428
↓ 6 callers
Method
publishGeneration
( generation *RoutingGeneration, routingErrors map[string]string, activeOverride map[string]*LoadedPlugin,
pkg/jsplugin/registry.go:372
↓ 6 callers
Method
queryContext
(task *model.Task, key, baseURL, proxy string)
relay/channel/task/jsplugin/adaptor.go:1291
↓ 6 callers
Function
quotaUnitsToDollars
(units: number)
web/src/lib/format.ts:122
↓ 6 callers
Method
recordRebuildFailure
(err error)
pkg/jsplugin/registry.go:433
↓ 6 callers
Function
redisFixedWindowTake
(ctx context.Context, key string, maxRequestNum int, duration int64)
middleware/rate-limit.go:66
↓ 6 callers
Function
refreshSubscriptionUserGroupCache
(userId int, operation string)
model/subscription.go:572
↓ 6 callers
Function
rejectInvalidTopUpQuota
(c *gin.Context, userId int, amount int64)
controller/topup.go:294
↓ 6 callers
Function
rememberOAuthLoginRedirect
( state: string, redirect?: string )
web/src/features/auth/lib/oauth-callback-mode.ts:22
↓ 6 callers
Function
resetRegistryForTest
()
pkg/wsmanager/wsmanager_test.go:18
↓ 6 callers
Function
resetSession
()
web/src/features/auth/hooks/use-oauth-login.ts:61
↓ 6 callers
Method
resolveActiveOverrides
( generation *RoutingGeneration, override map[string]*LoadedPlugin, )
pkg/jsplugin/registry.go:536
↓ 6 callers
Function
resolveModelProvider
(modelName: string)
web/src/lib/model-provider.ts:241
↓ 6 callers
Function
resolvePluginParts
( item: TaskPluginParts & { meta: Pick<TaskPluginMeta, 'relay'> } )
web/src/features/task-plugins/lib/plugin-parts.ts:26
↓ 6 callers
Function
respondWith
(status int, contentType, body string)
router/provider_plugin_relay_test.go:1121
↓ 6 callers
Function
responsePresentationLoss
(path string, code string, message string)
relaykit/relayconvert/internal/toolconv/response.go:513
↓ 6 callers
Function
runAttachments
runAttachments runs one rp-attachments instance at ingress on body.
relay/requestplugin/attachments_test.go:65
↓ 6 callers
Function
runReplyHook
runReplyHook validates config as the host does when an instance is saved and calls the reply hook of a built-in plugin on one output.
plugins/request_plugins_test.go:721
↓ 6 callers
Function
saveBillingConfig
(t *testing.T)
relay/relay_task_test.go:303
↓ 6 callers
Function
seededRandom
(seed: number)
web/src/features/pricing/lib/seed.ts:39
↓ 6 callers
Function
serveTaskPluginImageProtocol
serveTaskPluginImageProtocol answers an OpenAI Images API request that a task plugin claimed. The API is synchronous: the durable submission runs firs
controller/plugin_protocol_image.go:31
↓ 6 callers
Function
setupAdminUserTest
setupAdminUserTest promotes the enrolled operator to root and creates a managed common user for the administrative endpoints to act on.
controller/admin_user_verification_test.go:20
↓ 6 callers
Function
setupProviderPluginControllerTest
(t *testing.T, pluginKey string)
controller/provider_plugin_test.go:74
↓ 6 callers
Function
setupRelayRouterTestDB
(t *testing.T)
router/relay_router_test.go:149
↓ 6 callers
Function
setupTaskPluginFactoryDisableTest
(t *testing.T)
controller/task_plugin_test.go:152
↓ 6 callers
Function
sharedRouteTestPluginSource
sharedRouteTestPluginSource declares the probe routes two plugins share; decoder and presenter bodies name the plugin, and extra adds members to nativ
middleware/task_plugin_test.go:2379
↓ 6 callers
Function
sharedTaskPluginRouteRouter
sharedTaskPluginRouteRouter serves the plugins' route groups as the inner plugin router does, each pinned to its candidates, for caller 7.
middleware/task_plugin_test.go:2401
↓ 6 callers
Method
shutdown
shutdown ends the connection once. Each peer gets a close frame that says why, bounded to one second, and both sockets close even if a write failed. C
relay/responses_websocket.go:894
↓ 6 callers
Method
size
()
relay/requestplugin/attachments.go:190
↓ 6 callers
Function
startHTTP2TLSServer
(t *testing.T, handler http.Handler)
service/http_client_transport_test.go:108
↓ 6 callers
Function
strictStringSlice
(object map[string]any, name string)
pluginkit/meta.go:2228
↓ 6 callers
Function
stringValue
stringValue reads a host function's string parameter: undefined and null read as "", other values as JavaScript's String(value).
pluginkit/utils.go:358
↓ 6 callers
Function
submit
(values: EmailBindingValues)
web/src/features/security/components/dialogs/email-bind-dialog.tsx:127
↓ 6 callers
Function
syncTaskPluginsOnce
()
controller/task_plugin.go:1044
↓ 6 callers
Function
taskBillingOther
taskBillingOther 从 task 的 BillingContext 构建日志 Other 字段。
service/task_billing.go:152
↓ 6 callers
Function
taskCredentialLine
(t *testing.T, plugin, access, account string, expiresAt int64)
relay/channel/task/jsplugin/credential_test.go:123
↓ 6 callers
Function
taskEnumLabel
( definition: BillingUsageFieldSchema | undefined, value: string, language: string )
web/src/features/pricing/lib/task-price-display.ts:51
↓ 6 callers
Function
taskHasPluginExecution
(task *model.Task)
controller/task.go:248
↓ 6 callers
Function
testTLSClientConfig
(t *testing.T, server *httptest.Server)
service/http_client_transport_test.go:100
↓ 6 callers
Method
text
text reads the text of item once per request, under the request's budget.
relay/requestplugin/attachments.go:212
↓ 6 callers
Function
toNumberOrNull
(value: unknown)
web/src/features/system-settings/models/model-pricing-core.ts:204
↓ 6 callers
Function
trimmed
(value)
plugins/tasks/vidu/plugin.js:158
↓ 6 callers
Function
trimmed
(value)
plugins/tasks/sunoapi/plugin.js:41
↓ 6 callers
Function
tryParseTaskVisualConfig
( expression: string | null | undefined, schema: BillingUsageSchema )
web/src/features/pricing/lib/task-expr.ts:404
↓ 6 callers
Function
updateCurrentVersionContent
( message: Message, content: string )
web/src/features/playground/lib/message/message-utils.ts:63
↓ 6 callers
Function
useBillingTime
( expression: string | null | undefined, enabled = true )
web/src/features/pricing/hooks/use-billing-time.ts:64
↓ 6 callers
Function
useChartTheme
()
web/src/lib/use-chart-theme.ts:32
↓ 6 callers
Function
useDialogState
( initialState: T | null = null )
web/src/hooks/use-dialog.ts:97
↓ 6 callers
Function
useLogsViewScope
()
web/src/features/usage-logs/components/usage-logs-provider.tsx:104
↓ 6 callers
Function
useOpenInContext
()
web/src/components/ai-elements/open-in-chat.tsx:206
↓ 6 callers
Function
usePricingData
(enabled = true)
web/src/features/pricing/hooks/use-pricing-data.ts:27
↓ 6 callers
Function
useResetForm
( form: UseFormReturn<TFieldValues>, values: DefaultValues<TFieldValues> | undefined )
web/src/features/system-settings/hooks/use-reset-form.ts:27
↓ 6 callers
Function
withPluginPricing
( model: PricingModel, variant: BillingPluginVariant )
web/src/features/pricing/lib/plugin-pricing.ts:75
↓ 6 callers
Function
writeAnswer
writeAnswer writes a non-stream JSON answer the way the handlers do: its length, the status, then the body in parts.
relay/requestplugin/requestplugin_test.go:1092
↓ 6 callers
Function
writeTaskArtifactError
(c *gin.Context, status int, code, message string)
controller/task.go:299
↓ 5 callers
Function
AccessTokenSessionID
AccessTokenSessionID is the step-up session identifier bound to a token. Browser session IDs are UUIDs and can never carry this prefix.
model/user_access_token.go:235
↓ 5 callers
Function
ActivateTaskPlugin
(key, version string)
model/task_plugin.go:253
↓ 5 callers
Method
ActiveOverridePlugins
()
pkg/jsplugin/registry.go:266
↓ 5 callers
Function
AllOption
()
model/option.go:26
↓ 5 callers
Function
AppendRelayLogAdminInfo
AppendRelayLogAdminInfo records relay routing and conversion diagnostics in the admin-only scope shared by successful and failed request logs.
service/log_info_generate.go:70
← previous
next →
1,201–1,300 of 15,592, ranked by callers