Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QuantumNous/new-api
/ functions
Functions
9,514 in github.com/QuantumNous/new-api
⨍
Functions
9,514
◇
Types & classes
1,507
↓ 3 callers
Function
lookupResponseRoute
(from types.RelayFormat, to types.RelayFormat)
relaykit/relayconvert/response_registry.go:681
↓ 3 callers
Function
mapIoNetDeployment
(d ionet.Deployment)
controller/deployment.go:138
↓ 3 callers
Function
markGeminiGoogleSearchCall
(c *gin.Context, response *dto.GeminiChatResponse)
relay/channel/gemini/relay-gemini.go:79
↓ 3 callers
Function
marshalGolden
(t *testing.T, value any)
relaykit/relayconvert/golden_test.go:56
↓ 3 callers
Function
marshalSystemTaskJSON
(v any)
model/system_task.go:437
↓ 3 callers
Function
mergeOptions
( options?: CurrencyFormatOptions )
web/src/lib/currency.ts:231
↓ 3 callers
Method
messageID
()
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:370
↓ 3 callers
Function
mustAdvancedCustomRawMessage
(t *testing.T, value any)
relay/channel/advancedcustom/adaptor_test.go:815
↓ 3 callers
Function
mustParseURL
(t *testing.T, rawURL string)
service/protected_fetch_client_test.go:60
↓ 3 callers
Function
nearlyEqual
(a, b float64)
controller/ratio_sync.go:48
↓ 3 callers
Function
newAwsStreamInput
()
relay/channel/aws/relay_aws_test.go:104
↓ 3 callers
Function
newAwsTestClient
(httpClient bedrockruntime.HTTPClient)
relay/channel/aws/relay_aws_test.go:64
↓ 3 callers
Function
newAwsTestContext
(writer http.ResponseWriter, requestContext context.Context)
relay/channel/aws/relay_aws_test.go:76
↓ 3 callers
Function
newAwsTestRelayInfo
()
relay/channel/aws/relay_aws_test.go:82
↓ 3 callers
Function
newDirectHTTPClient
(policy HTTPTransportPolicy, tlsConfig *tls.Config)
service/http_client.go:337
↓ 3 callers
Function
newGeminiResponsesRelayInfo
(isStream bool)
relay/channel/gemini/relay_responses_test.go:170
↓ 3 callers
Function
newHTTPClientFromPolicy
(policy HTTPTransportPolicy, proxyURL *url.URL, tlsConfig *tls.Config)
service/http_client.go:312
↓ 3 callers
Function
newProxyURLConfig
(parsedURL *url.URL)
service/http_client.go:143
↓ 3 callers
Function
newRequestAutoGroupsContext
()
service/group_auto_groups_test.go:35
↓ 3 callers
Function
newRule
(ptype string, policy []string)
service/authz/adapter.go:96
↓ 3 callers
Function
newSMTPClient
(addr string)
common/email.go:44
↓ 3 callers
Function
newTokenAutoGroupsContext
()
middleware/token_auto_groups_context_test.go:15
↓ 3 callers
Method
nextIndex
(kind string, toolIndex int)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:343
↓ 3 callers
Function
nextLocalId
()
web/src/features/channels/components/dialogs/param-override-editor-dialog.tsx:452
↓ 3 callers
Function
normalizeAdvancedCustomRouteModels
(models []string)
relaykit/dto/channel_settings.go:480
↓ 3 callers
Function
normalizeCatalogItems
(items?: readonly string[])
web/src/features/pricing/components/model-details.tsx:144
↓ 3 callers
Function
normalizeHttpProtocol
( value: string | undefined | null )
web/src/features/channels/lib/channel-form.ts:77
↓ 3 callers
Function
normalizeInterfaceLanguage
(value?: string | null)
web/src/i18n/languages.ts:32
↓ 3 callers
Function
normalizeLineEndings
(value: string)
web/src/features/system-settings/models/routing-reliability-section.tsx:133
↓ 3 callers
Function
normalizeModelList
(models: unknown[] = [])
web/src/features/channels/lib/upstream-update-utils.ts:19
↓ 3 callers
Function
normalizeOpenAIUsage
normalizeOpenAIUsage maps the OpenAI Images usage shape (input_tokens / output_tokens / input_tokens_details) onto the canonical prompt/completion fie
relay/channel/openai/relay_image.go:70
↓ 3 callers
Function
normalizeRatio
(value: unknown)
web/src/features/system-settings/models/group-ratio-visual-editor.tsx:115
↓ 3 callers
Function
normalizeResetCreditStatus
(value: unknown)
web/src/features/channels/components/dialogs/codex-usage-dialog.tsx:253
↓ 3 callers
Function
optionalString
(s string)
service/waffo_pancake.go:147
↓ 3 callers
Function
parseCodexOAuthKey
(raw string)
service/codex_credential_refresh.go:31
↓ 3 callers
Function
parseGroupsList
(groups: string)
web/src/features/channels/lib/channel-utils.ts:238
↓ 3 callers
Function
parseJsonEditorConfig
()
web/src/features/channels/components/dialogs/advanced-custom-editor-dialog.tsx:427
↓ 3 callers
Function
parseModelsString
(modelsStr: string)
web/src/features/channels/lib/model-mapping-validation.ts:26
↓ 3 callers
Function
parseNumberDraft
(value: string)
web/src/features/system-settings/models/tiered-pricing-editor.tsx:340
↓ 3 callers
Function
parseThinkTags
(content: string)
web/src/features/playground/lib/message/message-reasoning-utils.ts:29
↓ 3 callers
Function
parseTiersFromExpr
(exprStr: string)
web/src/features/pricing/lib/billing-expr.ts:268
↓ 3 callers
Function
parseUserSettings
(settingsJson?: string)
web/src/features/profile/lib/format.ts:28
↓ 3 callers
Function
patchClaudeMessageDeltaUsageData
(data string, usage *dto.ClaudeUsage)
relay/channel/claude/relay-claude.go:78
↓ 3 callers
Function
performManageUserRequest
(t *testing.T, body string)
controller/user_manage_test.go:50
↓ 3 callers
Function
processChannelError
(c *gin.Context, channelError types.ChannelError, err *types.NewAPIError)
controller/relay.go:363
↓ 3 callers
Function
proofHeaders
(proofToken?: string)
web/src/features/auth/passkey/api.ts:27
↓ 3 callers
Function
publishCommittedUserAuthVersion
publishCommittedUserAuthVersion records the durable lower bound used to reject an arbitrarily delayed cache fill after a committed security change. It
model/user_auth_cache.go:153
↓ 3 callers
Function
randomInRange
( rand: () => number, min: number, max: number )
web/src/features/pricing/lib/seed.ts:48
↓ 3 callers
Function
rankingShare
(value int64, total int64)
service/rankings.go:557
↓ 3 callers
Method
reasoningID
()
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:374
↓ 3 callers
Function
recalcQuotaFromRatios
recalcQuotaFromRatios 根据 adjustedRatios 重新计算 quota。 公式: baseQuota × ∏(ratio) — 其中 baseQuota 是不含 OtherRatios 的基础额度。
relay/relay_task.go:264
↓ 3 callers
Function
recordValue
(value: unknown)
web/src/features/dashboard/lib/flow.ts:1024
↓ 3 callers
Function
redirectToLogin
()
web/src/features/auth/hooks/use-auth-redirect.ts:65
↓ 3 callers
Function
refreshAuthentication
()
web/src/lib/auth-session.ts:333
↓ 3 callers
Method
rememberUsage
(usage *dto.Usage)
relaykit/relayconvert/response_registry.go:600
↓ 3 callers
Function
removeTrailingSlash
(value: string)
web/src/features/system-settings/integrations/utils.ts:19
↓ 3 callers
Function
renderChildren
(nodes: ParsedNode[])
web/src/components/ai-elements/response-renderer.tsx:56
↓ 3 callers
Function
renderQuotaCompat
(rawQuota: number, digits = 4)
web/src/features/dashboard/lib/charts.ts:53
↓ 3 callers
Function
requireBrowserSession
(c *gin.Context)
controller/auth_session.go:151
↓ 3 callers
Function
requireOrderedSubstrings
(t *testing.T, s string, parts ...string)
relay/channel/openai/chat_via_responses_test.go:226
↓ 3 callers
Function
resolveChannelSortOptions
(idSort bool, sortOptions []ChannelSortOptions)
model/channel.go:123
↓ 3 callers
Function
resolveChannelTestUserID
(c *gin.Context)
controller/channel-test.go:59
↓ 3 callers
Function
resolveVisibleStages
( role: FlowRole, visibleStages?: FlowNodeKind[] )
web/src/features/dashboard/lib/flow.ts:260
↓ 3 callers
Function
responsesCallID
(item map[string]any)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_req.go:488
↓ 3 callers
Function
responsesJSONString
(raw json.RawMessage)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_req.go:530
↓ 3 callers
Function
runResponsesImageBillingStream
(t *testing.T, events ...string)
relay/channel/openai/relay_responses_billing_test.go:197
↓ 3 callers
Function
runSystemTaskClaimPass
runSystemTaskClaimPass tries to claim one pending task per registered type and dispatches each claimed task in its own goroutine so a long-running han
service/system_task.go:225
↓ 3 callers
Function
runSystemTaskScheduler
runSystemTaskScheduler creates a new task row for each enabled scheduled handler whose interval has elapsed since its last run and that has no active
service/system_task.go:263
↓ 3 callers
Function
runTokenMigrationCompatibilityTest
(t *testing.T, db *gorm.DB, dialect string, managedTokensTable *bool)
controller/token_test.go:304
↓ 3 callers
Function
sanitizeFetchModelsError
(err error, key string)
controller/channel_upstream_update.go:284
↓ 3 callers
Function
sanitizeHeaderOverrideMap
(source map[string]interface{})
relay/common/override.go:398
↓ 3 callers
Function
saturateQuota
saturateQuota converts an already-rounded quota value to int, clamping to the int32 range. Whenever clamping (what would otherwise be an integer wrapa
common/quota_math.go:72
↓ 3 callers
Method
scanKeys
(match string)
pkg/cachex/hybrid_cache.go:139
↓ 3 callers
Function
selectChannelsForAutomaticTest
(channels []*model.Channel, mode string)
controller/channel-test.go:1018
↓ 3 callers
Function
setAuthNoStore
(c *gin.Context)
controller/auth_session.go:178
↓ 3 callers
Function
setChannelAffinityContext
(c *gin.Context, meta channelAffinityMeta)
service/channel_affinity.go:352
↓ 3 callers
Function
setCodexWhamRequestHeaders
(req *http.Request, accessToken string, accountID string)
service/codex_wham_usage.go:154
↓ 3 callers
Function
setDashboardAuthContext
(c *gin.Context, user *model.UserBase, identity service.AuthIdentity, useAccessToken bool)
middleware/auth.go:194
↓ 3 callers
Function
setFormValue
(field: keyof ModelPricingFormValues, value: string)
web/src/features/system-settings/models/model-pricing-sheet.tsx:223
↓ 3 callers
Function
setHeaderOverrideInContext
(context map[string]interface{}, headerName string, value interface{}, keepOrigin bool)
relay/common/override.go:1073
↓ 3 callers
Function
setupManageUserTestDB
(t *testing.T)
controller/user_manage_test.go:22
↓ 3 callers
Function
shouldAuditParamPath
(path string)
relay/common/override.go:257
↓ 3 callers
Function
stableColorMap
( keys: string[], palette?: readonly string[] )
web/src/features/dashboard/lib/flow.ts:315
↓ 3 callers
Function
startReasoningTiming
( message: Message, startedAt: number = Date.now() )
web/src/features/playground/lib/message/message-timing-utils.ts:40
↓ 3 callers
Method
stop
()
web/src/components/ai-elements/prompt-input.tsx:1052
↓ 3 callers
Function
stopReasonOpenAI2Claude
(reason string)
relaykit/relayconvert/internal/oai_chat/to_claude_messages_resp.go:512
↓ 3 callers
Function
subtractModelNames
(base []string, removed []string)
controller/channel_upstream_update.go:123
↓ 3 callers
Function
successRate
(value counters)
pkg/perf_metrics/metrics.go:366
↓ 3 callers
Function
supportsAliAnthropicMessages
* var syncModels = []string{ "z-image", "qwen-image", "wan2.6", } */
relay/channel/ali/adaptor.go:39
↓ 3 callers
Function
syncRows
(updatedRows: MappingRow[])
web/src/features/channels/components/model-mapping-editor.tsx:149
↓ 3 callers
Function
taskBillingContextPriceData
(bc *model.TaskBillingContext)
service/task_billing.go:144
↓ 3 callers
Function
taskBillingOther
taskBillingOther 从 task 的 BillingContext 构建日志 Other 字段。
service/task_billing.go:122
↓ 3 callers
Function
taskModelName
taskModelName 从 BillingContext 或 Properties 中获取模型名称。
service/task_billing.go:156
↓ 3 callers
Function
telegramAuthorizationClaim
(params url.Values, now time.Time)
controller/telegram.go:282
↓ 3 callers
Function
terminalTestGeminiChunk
(text string, finishReason string, toolCall bool)
relaykit/relayconvert/terminal_stream_test.go:350
↓ 3 callers
Function
toBoolean
(value: unknown, fallback: boolean)
web/src/features/system-settings/maintenance/config.ts:86
↓ 3 callers
Function
toInputValue
(date?: Date)
web/src/features/usage-logs/components/compact-date-time-range-picker.tsx:40
↓ 3 callers
Function
toValueText
(value: unknown)
web/src/features/channels/components/dialogs/param-override-editor-dialog.tsx:454
↓ 3 callers
Function
triggerRefresh
()
web/src/features/subscriptions/components/subscriptions-provider.tsx:62
↓ 3 callers
Function
unwrapStoredValue
(value: unknown)
web/src/features/playground/lib/storage/storage.ts:68
← previous
next →
1,201–1,300 of 9,514, ranked by callers