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
Function
TestMediaReencode
(t *testing.T)
relay/requestplugin/requestplugin_test.go:446
Function
TestMediaReencodeLosslessWebP
(t *testing.T)
relay/requestplugin/requestplugin_test.go:620
Function
TestMediaTextEffect
media.text rewrites a text file of the body. Any other file goes on as it is and is recorded as not rewritable; a media number that does not exist fai
relay/requestplugin/attachments_test.go:263
Function
TestMergeBillingUsageORsEstimatedOnSameAndCrossDialect
(t *testing.T)
relaykit/dto/usage_merge_test.go:204
Function
TestMergeClaudeUsageCacheCreationReplacesWholeObject
(t *testing.T)
relaykit/dto/usage_merge_test.go:11
Function
TestMergeClaudeUsageNonZeroPreservesBillingUsage
(t *testing.T)
relaykit/dto/usage_merge_test.go:230
Function
TestMergeExplicitAndSuffix
(t *testing.T)
relaykit/relayconvert/reasoning/intent_test.go:12
Function
TestMergeGeminiUsageMetadataCandidatesAndThoughtsReplacedAsPair
(t *testing.T)
relaykit/dto/usage_merge_test.go:31
Function
TestMergeGeminiUsageMetadataStreamDetailsAreCumulativeSnapshots
(t *testing.T)
relaykit/dto/usage_merge_test.go:104
Function
TestMergeModelNames
(t *testing.T)
controller/channel_upstream_update_test.go:433
Function
TestMergeToolSurchargeItemsSaturatesCountOverflow
(t *testing.T)
service/text_quota_test.go:1417
Function
TestMergeUsageNonZeroCacheCreationInputTokensReplacesWithoutAdding
(t *testing.T)
relaykit/dto/usage_merge_test.go:397
Function
TestMergeUsageNonZeroKeepsPositiveValuesAndTakesMaxTotal
(t *testing.T)
relaykit/dto/usage_merge_test.go:281
Function
TestMessageStartZeroOutputSidecarRemainsRefreshable
(t *testing.T)
relaykit/relayconvert/internal/claude_messages/stream_billing_usage_test.go:11
Function
TestMetaDecoderRejectsLossyOrUnknownRoutingFields
(t *testing.T)
pkg/jsplugin/routing_test.go:1007
Function
TestMetaProtocolSupports
(t *testing.T)
pkg/jsplugin/protocol_supports_test.go:201
Function
TestMetadataSyncLocaleAndEndpointValidation
(t *testing.T)
controller/model_management_test.go:1070
Function
TestMidjourneyPolicyAcceptance
(t *testing.T)
service/channel_affinity_template_test.go:361
Function
TestMidjourneyRefundRestoresEveryAccountingElementOnBillingChannel
(t *testing.T)
service/task_billing_test.go:640
Function
TestMigratePrefillGroupUniquenessMySQL
(t *testing.T)
model/prefill_group_migration_test.go:65
Function
TestMigratePrefillGroupUniquenessPostgreSQL
(t *testing.T)
model/prefill_group_migration_test.go:79
Function
TestMigratePrefillGroupUniquenessSQLite
(t *testing.T)
model/prefill_group_migration_test.go:59
Function
TestMigrateRetiredFrontendOptionsKeepsAuthoritativeTargets
(t *testing.T)
model/frontend_option_migration_test.go:132
Function
TestMigrateRetiredFrontendOptionsKeepsEmptyAuthoritativeTargets
(t *testing.T)
model/frontend_option_migration_test.go:151
Function
TestMigrateRetiredFrontendOptionsMigratesValidValuesIdempotently
(t *testing.T)
model/frontend_option_migration_test.go:43
Function
TestMigrateRetiredFrontendOptionsPreservesMalformedValuesAndContinues
(t *testing.T)
model/frontend_option_migration_test.go:104
Function
TestMigrateRetiredFrontendOptionsPreservesMixedInvalidFAQ
(t *testing.T)
model/frontend_option_migration_test.go:122
Function
TestMigrateSensitiveWords
The old words become one global request-filter instance after the saved ones, enabled when both old switches were on; the old options go, and a second
model/sensitive_word_migration_test.go:24
Function
TestMigrateSensitiveWordsWithoutWords
(t *testing.T)
model/sensitive_word_migration_test.go:88
Function
TestMigrateTokenKeyUniquenessMySQL
(t *testing.T)
model/token_migration_test.go:70
Function
TestMigrateTokenKeyUniquenessPostgreSQL
(t *testing.T)
model/token_migration_test.go:84
Function
TestMigrateTokenKeyUniquenessSQLite
(t *testing.T)
model/token_migration_test.go:64
Function
TestMigrationSchemaStability
(t *testing.T)
model/migration_dialector_test.go:60
Function
TestMixedCacheFields
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:629
Function
TestMixedCacheFields_AllCacheZero
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:641
Function
TestModelDeletionDatabaseMatrix
(t *testing.T)
controller/model_management_test.go:1297
Function
TestModelFamily
(t *testing.T)
tokenkit/tokenkit_test.go:13
Function
TestModelListRouteNeedsConvertResponseAlone
(t *testing.T)
pkg/jsplugin/provider_test.go:179
Function
TestModelManagementDatabaseMatrix
(t *testing.T)
controller/model_management_test.go:483
Function
TestModelMemoryRateLimitRejectionsReturnOpenAIError
The memory limiter answers like the Redis limiter: an OpenAI error body naming the limit that was reached, not an empty 429.
middleware/model_rate_limit_test.go:111
Function
TestModelMemoryRateLimitReservesConcurrentSuccessAdmission
(t *testing.T)
middleware/model_rate_limit_test.go:82
Function
TestModelModifierNamesRouteWithAndWithoutMemoryCache
(t *testing.T)
model/task_plugin_channel_select_test.go:121
Function
TestModelModifiersUpstreamFields
Explicit @ modifiers reach DeepSeek as its own thinking switch and effort in every format and override the client's reasoning fields: no budget_tokens
relay/channel/deepseek/adaptor_test.go:148
Function
TestModelPriceHelperCanonicalBillingLadder
(t *testing.T)
relay/helper/price_test.go:420
Function
TestModelPriceHelperDeepSeekThinkingTailsBillAtBase
DeepSeek thinking tails and @ modifiers bill at the base model's built-in expression; a name on the thinking-suffix blacklist stays opaque and needs i
relay/helper/price_test.go:652
Function
TestModelPriceHelperExemptAtNameBillsVerbatim
(t *testing.T)
relay/helper/price_test.go:580
Function
TestModelPriceHelperHonorsCustomClaudeThinkingAlias
(t *testing.T)
relay/helper/price_test.go:383
Function
TestModelPriceHelperMigratesLegacyGeminiWildcardToCanonical
(t *testing.T)
relay/helper/price_test.go:513
Function
TestModelPriceHelperModifierNameFallsBackToBase
(t *testing.T)
relay/helper/price_test.go:550
Function
TestModelPriceHelperNativeGeminiNoThinkingDoesNotAliasBillingModel
(t *testing.T)
relay/helper/price_test.go:703
Function
TestModelPriceHelperPreservesGpt51CodexMaxIdentity
(t *testing.T)
relay/helper/price_test.go:617
Function
TestModelPriceHelperRequestBillingRatiosOnlyApplyToFixedPrice
(t *testing.T)
relay/helper/price_test.go:225
Function
TestModelPriceHelperTieredInputPreConsumeMultiplier
(t *testing.T)
relay/helper/price_test.go:115
Function
TestModelPriceHelperTieredRejectsPreConsumeOverflow
(t *testing.T)
relay/helper/price_test.go:186
Function
TestModelPriceHelperTieredUsesPreloadedRequestInput
(t *testing.T)
relay/helper/price_test.go:26
Function
TestModelPriceHelperUsesSuffixedOriginLikeMain
Pricing identity is resolved once in ModelPriceHelper via the candidate ladder: raw name (only when it has no @ modifiers) → canonical base@effort:E@t
relay/helper/price_test.go:323
Function
TestModelPricingConversionAcceptsDeclaredEndpointArray
Model metadata may declare endpoints either as a type array or as a path map. Conversion must understand both; reading only the map form made every mo
controller/model_pricing_conversion_endpoints_test.go:16
Function
TestModelPricingConversionDatabaseMatrix
(t *testing.T)
controller/model_management_test.go:112
Function
TestModelPricingIssuesFollowPluginChanges
Prices saved while a plugin fit stop fitting when it changes: a dropped model leaves its provider price stale, and a new provider without the usage th
model/pricing_usage_schema_test.go:456
Function
TestModelPricingSnapshotListsUsedBuiltinPrices
The full snapshot lists a built-in price, with its expression as the editor default, once the price is saved or an enabled channel serves the model. A
model/pricing_usage_schema_test.go:543
Function
TestModelRateLimitCountsConfiguredGroupsSeparately
A group with its own limit counts each user's requests on its own; groups without one keep sharing the user's global limit.
middleware/model_rate_limit_test.go:147
Function
TestModelRateLimitStreamFailuresDoNotConsumeSuccessLimit
(t *testing.T)
middleware/model_rate_limit_test.go:48
Function
TestModelRedisRateLimitUsesUTCRegardlessOfLocalTimezone
(t *testing.T)
middleware/model_rate_limit_test.go:22
Function
TestModelsBulkActions
({ table }: { table: TanStackTable<ModelRow> })
web/src/features/channels/components/dialogs/channel-test-dialog.tsx:1400
Function
TestMultiKeyEnableRestoresOnlyExhaustedChannels
(t *testing.T)
controller/channel_multi_key_test.go:19
Function
TestMultimodalEmbeddingResponse
The native response becomes an OpenAI embedding list. prompt_tokens is all billable input and image_tokens its visual part, priced at the image ratio;
relay/channel/ali/adaptor_test.go:417
Function
TestMultipartBodyStorageReplaysFilesAndFields
(t *testing.T)
common/body_storage_test.go:118
Function
TestMultiprotocolGatewayEndpointTypes
(t *testing.T)
controller/channel_test_internal_test.go:150
Function
TestNativePresentersChooseTheVendorsStatus
A native presenter answers with the vendor's own status by returning a reply wrapper; anything else it returns is a 200 JSON body.
middleware/task_plugin_test.go:2632
Function
TestNativeRouteCredentialFormsAuthenticateThroughTokenAuth
On the built-in plugin whose vendor uses it, a native route takes the gateway token in that vendor's API-key form; everywhere else only the Bearer for
router/plugin_router_test.go:930
Function
TestNativeRouteCredentialRewritesOnlyTheVendorsOwnForm
(t *testing.T)
middleware/task_plugin_test.go:2668
Function
TestNativeRouteDecodesTheIngressBody
On a native route the plugin decodes the body again after ingress changed it, so the vendor receives the changed prompt.
controller/plugin_native_e2e_test.go:587
Function
TestNeedsLoginCredentialFailsWithoutReachingTheUpstream
A key whose credential needs a new login never reaches the upstream: the request disables the key for the reason a login clears, whatever the automati
router/provider_plugin_relay_test.go:598
Function
TestNewAPIChannelPluginBindingsRequireBindPermission
(t *testing.T)
controller/channel_task_plugin_bind_test.go:181
Function
TestNewAPIChannelRegistration
(t *testing.T)
controller/channel_test_internal_test.go:117
Function
TestNewAPIChannelServesExtendedTaskPlugins
(t *testing.T)
model/task_plugin_channel_select_test.go:84
Function
TestNewAwsInvokeContextInheritsParent
(t *testing.T)
relay/channel/aws/relay_aws_test.go:322
Function
TestNewAwsInvokeErrorSkipsRetryOnlyForClientCancellation
(t *testing.T)
relay/channel/aws/relay_aws_test.go:353
Function
TestNewClaudeMessagesBillingUsageRequiresTokenContent
(t *testing.T)
relaykit/dto/billing_usage_test.go:23
Function
TestNewEstimatedGeminiChatBillingUsage
(t *testing.T)
relaykit/dto/billing_usage_test.go:110
Function
TestNewGeminiChatBillingUsageRequiresTokenContent
(t *testing.T)
relaykit/dto/billing_usage_test.go:11
Function
TestNewOpenAIChatBillingUsageRequiresTokenContent
(t *testing.T)
relaykit/dto/billing_usage_test.go:40
Function
TestNewOutboundJSONBody_GetBodyAfterPartialRead
(t *testing.T)
relay/common/outbound_body_test.go:40
Function
TestNewOutboundJSONBody_GetBodyReadersAreIndependent
(t *testing.T)
relay/common/outbound_body_test.go:115
Function
TestNewOutboundJSONBody_GetBodyReadersAreIndependent_DiskStorage
TestNewOutboundJSONBody_GetBodyReadersAreIndependent_DiskStorage runs the same independence assertions against the disk-backed storage. Deliberately n
relay/common/outbound_body_test.go:137
Function
TestNewOutboundJSONBody_GetBodyReplaysFullBody
(t *testing.T)
relay/common/outbound_body_test.go:12
Function
TestNewSMTPClientHonorsExplicitStartTLSWhenPortIs465
(t *testing.T)
common/email_test.go:383
Function
TestNewSMTPClientKeepsImplicitTLSForLegacyPort465
(t *testing.T)
common/email_test.go:406
Function
TestNewSSRFProtectionFromFetchSettingParsesPortRanges
(t *testing.T)
common/ssrf_protection_test.go:53
Function
TestNewStreamScannerCallerLimit
(t *testing.T)
relay/helper/stream_scanner_test.go:671
Function
TestNewStreamScanner_AllowsLargeStreamLine
(t *testing.T)
relay/helper/stream_scanner_test.go:148
Function
TestNewTaskAPIRequestInheritsClientCancellation
(t *testing.T)
relay/channel/api_request_test.go:15
Function
TestNoAvailableChannelMessageWithoutPlugin
(t *testing.T)
middleware/distributor_test.go:357
Function
TestNodeSyncAppliesAnOptionAnotherNodeWrote
(t *testing.T)
service/node_sync_test.go:127
Function
TestNodeSyncCapsWhatTheRegistryRowCarries
(t *testing.T)
service/node_sync_test.go:364
Function
TestNodeSyncReloadsATopicWhoseStartupLoadFailed
A topic whose startup load failed is not marked applied at startup: the node reports the error and the first tick loads the topic again.
service/node_sync_test.go:283
Function
TestNodeSyncReloadsTopicsWhoseRevisionChanged
(t *testing.T)
service/node_sync_test.go:69
Function
TestNodeSyncStatusComparesEveryNodeWithTheLatestRevision
Each node is judged by the topics it keeps: the status lists those of this node and of every online node, and a node that reports other topics but not
service/node_sync_test.go:155
Function
TestNodeSyncWithoutStartupRevisionsReportsEveryTopicUnapplied
Without the startup revisions every registered topic stays unapplied, and the node reports each one as not synced until the first tick loads it.
service/node_sync_test.go:314
Function
TestNonTerminalUpdate_NoBilling
(t *testing.T)
service/task_billing_test.go:1373
← previous
next →
12,801–12,900 of 15,409, ranked by callers