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
TestUnreadableBodyAndMissingPlugin
A body the stage cannot read and an instance whose plugin is gone stop nothing: the first is recorded as unchecked, the second does not run.
relay/requestplugin/requestplugin_test.go:318
Function
TestUnregisterPreventsClose
(t *testing.T)
pkg/wsmanager/wsmanager_test.go:66
Function
TestUpdateAuthFlowPayloadSwapsOnlyTheExpectedPayload
(t *testing.T)
model/channel_plugin_credential_test.go:56
Function
TestUpdateBatchTasksPollClassification
(t *testing.T)
service/task_polling_test.go:1024
Function
TestUpdateBatchTasksRefundsFailedTaskWithoutUsageSettlement
(t *testing.T)
service/task_polling_test.go:456
Function
TestUpdateBatchTasksRefundsFailedTieredTask
(t *testing.T)
service/task_polling_test.go:399
Function
TestUpdateBatchTasksSettlesTieredUsageForTerminalStates
(t *testing.T)
service/task_polling_test.go:319
Function
TestUpdateChannelLocked
(t *testing.T)
model/channel_plugin_credential_test.go:88
Function
TestUpdateChannelNewAPIBalanceUsesTheSmallerRemainingQuota
(t *testing.T)
controller/channel_billing_test.go:140
Function
TestUpdateChannelRejectsStatusField
(t *testing.T)
controller/channel_authz_test.go:132
Function
TestUpdateChannelStatusBumpsChannelsOnlyForChangesByHand
A status set by hand reaches every node at once through the channels topic. An automatic change, made for the key a request or a channel test used, is
model/channel_status_test.go:227
Function
TestUpdateChannelStatusPersistsMultiKeyState
(t *testing.T)
model/channel_status_test.go:39
Function
TestUpdateChannelSub2APIBalanceInvalidKey
(t *testing.T)
controller/channel_billing_sub2api_test.go:93
Function
TestUpdateChannelSub2APIBalanceMissingBaseURL
(t *testing.T)
controller/channel_billing_sub2api_test.go:139
Function
TestUpdateChannelSub2APIBalanceNegativeWalletBalance
(t *testing.T)
controller/channel_billing_sub2api_test.go:125
Function
TestUpdateChannelSub2APIBalanceRemainingPreferred
(t *testing.T)
controller/channel_billing_sub2api_test.go:49
Function
TestUpdateChannelSub2APIBalanceSubscriptionKeyMissingFields
(t *testing.T)
controller/channel_billing_sub2api_test.go:80
Function
TestUpdateChannelSub2APIBalanceUnlimitedSubscription
(t *testing.T)
controller/channel_billing_sub2api_test.go:106
Function
TestUpdateChannelSub2APIBalanceWalletFallback
(t *testing.T)
controller/channel_billing_sub2api_test.go:66
Function
TestUpdateChannelTaskPluginRequiresBindPermission
(t *testing.T)
controller/channel_task_plugin_bind_test.go:89
Function
TestUpdateConfigFromMap_EmptyMapClearsAll
(t *testing.T)
setting/config/config_test.go:50
Function
TestUpdateConfigFromMap_MapReplacement
(t *testing.T)
setting/config/config_test.go:13
Function
TestUpdateConfigFromMap_ScalarFieldsUnchanged
(t *testing.T)
setting/config/config_test.go:76
Function
TestUpdateMaxTokenAutoGroupsAcceptsAnyPositiveInteger
(t *testing.T)
setting/auto_group_test.go:11
Function
TestUpdateMaxTokenAutoGroupsRejectsInvalidValuesWithoutChangingState
(t *testing.T)
setting/auto_group_test.go:21
Function
TestUpdateOptionAliasBillingExprUsesPluginSchema
(t *testing.T)
controller/billing_option_test.go:114
Function
TestUpdateOptionRejectsInvalidGeminiSafetyThreshold
(t *testing.T)
controller/option_gemini_test.go:15
Function
TestUpdateOptionRejectsInvalidTaskBillingExpressions
(t *testing.T)
controller/billing_option_test.go:28
Function
TestUpdateOptionRejectsNegativeClaudeDefaultMaxTokens
(t *testing.T)
controller/option_claude_test.go:15
Function
TestUpdateOptionRejectsRetiredFrontendTheme
(t *testing.T)
controller/theme_compat_test.go:15
Function
TestUpdateOptionRejectsUsageExpressionWithoutTaskPlugin
(t *testing.T)
controller/billing_option_test.go:86
Function
TestUpdateOptionValidatesEpaySignSettings
(t *testing.T)
controller/payment_webhook_availability_test.go:428
Function
TestUpdatePasskeyAssertionStateCannotRewriteRegistrationIdentity
(t *testing.T)
model/user_authentication_test.go:312
Function
TestUpdatePendingTopUpStatus_RejectsMismatchedPaymentProvider
(t *testing.T)
model/payment_method_guard_test.go:106
Function
TestUpdateStandardChannelBalanceRoutesSub2API
(t *testing.T)
controller/channel_billing_sub2api_test.go:147
Function
TestUpdateSunoTasksStalePollsRefundExactlyOnce
(t *testing.T)
service/task_polling_test.go:663
Function
TestUpdateSystemTaskStateIdenticalPayloadDoesNotLoseLock
(t *testing.T)
model/system_task_test.go:512
Function
TestUpdateTaskPluginMarketplaceSourcesRoundTrip
(t *testing.T)
controller/task_plugin_test.go:1842
Function
TestUpdateTaskPluginMarketplaceSourcesValidation
(t *testing.T)
controller/task_plugin_test.go:1873
Function
TestUpdateTokenAutoGroupsTriStateAndNonAutoCleanup
(t *testing.T)
controller/token_auto_groups_test.go:138
Function
TestUpdateTokenMasksKeyInResponse
(t *testing.T)
controller/token_test.go:522
Function
TestUpdateUserBindColumnOnlyTouchesTheBindingColumn
(t *testing.T)
model/user_update_test.go:299
Function
TestUpdateUserBindColumnPreservesRestrictiveChange
(t *testing.T)
model/user_update_test.go:319
Function
TestUpdateUserBindColumnRejectsNonWhitelistedColumns
(t *testing.T)
model/user_update_test.go:333
Function
TestUpdateUserSettingKeepsWhatTheRequestLeavesOut
Saving notification settings starts from what the user stored: fields the form does not manage stay, and switches an older client leaves out keep thei
controller/user_manage_test.go:650
Function
TestUpdateUserSettingOnlyUpdatesSetting
(t *testing.T)
model/user_update_test.go:208
Function
TestUpdateVideoSingleTaskPollClassification
(t *testing.T)
service/task_polling_test.go:880
Function
TestUpdateVideoTasksCanSkipPollingSleepPerChannel
(t *testing.T)
service/task_polling_test.go:486
Function
TestUpdateVideoTasksDefaultSleepDoesNotBlockOtherChannels
(t *testing.T)
service/task_polling_test.go:516
Function
TestUpdateVideoTasksDefaultSleepWaitsBetweenTasks
(t *testing.T)
service/task_polling_test.go:227
Function
TestUpdateVideoTasksMixedChannelSleepSettings
(t *testing.T)
service/task_polling_test.go:623
Function
TestUpdateVideoTasksSlowChannelDoesNotBlockOtherChannels
(t *testing.T)
service/task_polling_test.go:556
Function
TestUpdateWithStatus_ConcurrentWinner
(t *testing.T)
model/task_cas_test.go:278
Function
TestUpdateWithStatus_Lose
(t *testing.T)
model/task_cas_test.go:258
Function
TestUpdateWithStatus_PersistsPluginStateAndPollFailures
(t *testing.T)
model/task_cas_test.go:325
Function
TestUpdateWithStatus_Win
--------------------------------------------------------------------------- UpdateWithStatus CAS — DB integration tests ------------------------------
model/task_cas_test.go:235
Function
TestUpdatedRegistrationPanicRestoresIncumbent
(t *testing.T)
router/plugin_router_test.go:767
Function
TestUploadTaskPluginAcceptsSourcesUpToEightMiB
(t *testing.T)
controller/task_plugin_test.go:377
Function
TestUploadTaskPluginAppliesMarketplaceKeyRulesAndCountsCommunityInstalls
(t *testing.T)
controller/task_plugin_test.go:2149
Function
TestUploadTaskPluginPreflightConflict
(t *testing.T)
controller/task_plugin_test.go:1384
Function
TestUploadTaskPluginRefreshesRuntimeSyncState
(t *testing.T)
controller/task_plugin_test.go:882
Function
TestUploadTaskPluginRejectsMetaViolatingV1Schema
(t *testing.T)
controller/task_plugin_test.go:1666
Function
TestUploadTaskPluginReportsUnknownMetaField
(t *testing.T)
controller/task_plugin_test.go:1641
Function
TestUploadTaskPluginSourceSha256
(t *testing.T)
controller/task_plugin_test.go:1739
Function
TestUploadTaskPluginStoresSidecarIconAndServesIt
(t *testing.T)
controller/task_plugin_test.go:1961
Function
TestUpstreamAddressesMaskOnlyConfiguredAddresses
Only addresses the admin configured are masked: a channel on the base URL new-api presets reaches a public official endpoint, and so do adaptors that
service/relay_error_test.go:132
Function
TestUpstreamContextsUseGatewayBearerOnNewAPIChannels
(t *testing.T)
relay/channel/task/jsplugin/auth_test.go:82
Function
TestUpstreamGetBody_HTTP2CannotRetryWithoutGetBody
TestUpstreamGetBody_HTTP2CannotRetryWithoutGetBody documents the pre-fix behavior: without GetBody the transport cannot safely retry once the body has
relay/channel/api_request_getbody_test.go:555
Function
TestUpstreamGetBody_HTTP2RetryAfterGracefulGoAway_PassThrough
(t *testing.T)
relay/channel/api_request_getbody_test.go:521
Function
TestUpstreamGetBody_HTTP2RetryAfterUpstreamStreamReset
TestUpstreamGetBody_HTTP2RetryAfterUpstreamStreamReset exercises the actual failure this change fixes: an HTTP/2 upstream resets the stream with a ret
relay/channel/api_request_getbody_test.go:454
Function
TestUpstreamGetBody_HTTP2RetryAfterUpstreamStreamReset_PassThrough
(t *testing.T)
relay/channel/api_request_getbody_test.go:489
Function
TestUpstreamsManifestContract
(t *testing.T)
pkg/jsplugin/registry_test.go:1255
Function
TestUsageAccountingSupportsSignedDirectAndBatchDeltas
(t *testing.T)
model/user_update_test.go:94
Function
TestUsageBillingPathForLog
(t *testing.T)
service/text_quota_test.go:707
Function
TestUsageEnumLabelsContract
(t *testing.T)
pkg/jsplugin/registry_test.go:371
Function
TestUsageFromChatUsagePreservesCacheCreationInputTokensAlone
(t *testing.T)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_resp_test.go:94
Function
TestUsageFromOpenAIBillingUsageFallsBackToPromptCacheHitTokens
(t *testing.T)
service/text_quota_test.go:648
Function
TestUsageFromOpenAIBillingUsageNormalizesCacheDetailsWithoutOverwritingCanonicalValues
(t *testing.T)
service/text_quota_test.go:617
Function
TestUsageUnitLabelContract
(t *testing.T)
pkg/jsplugin/registry_test.go:333
Function
TestUsedUsageKeysExtractsLiteralCallsAndSkipsDynamicArguments
(t *testing.T)
pkg/billingexpr/compile_usage_test.go:10
Function
TestUsedUsageKeysReturnsNilForEmptyOrInvalidExpressions
(t *testing.T)
pkg/billingexpr/compile_usage_test.go:18
Function
TestUserAccessTokenLimitAndOwnership
(t *testing.T)
model/user_update_test.go:497
Function
TestUserAuthAllowsOpaqueDottedPAT
(t *testing.T)
middleware/auth_test.go:117
Function
TestUserAuthAppliesAccessTokenRouteRules
(t *testing.T)
middleware/auth_test.go:388
Function
TestUserAuthCacheUpdateRejectsVersionMismatch
(t *testing.T)
model/user_cache_auth_version_test.go:112
Function
TestUserAuthFenceRollbackExpiresAndRecovers
(t *testing.T)
model/user_cache_auth_version_test.go:58
Function
TestUserAuthNeverFallsBackForRecognizedInvalidInternalJWT
(t *testing.T)
middleware/auth_test.go:138
Function
TestUserAuthVersionFenceAndCommittedFloorAreMonotonic
(t *testing.T)
model/user_cache_auth_version_test.go:212
Function
TestUserAuthVersionInvalidatesExistingSession
(t *testing.T)
service/auth_session_test.go:430
Function
TestUserBaseIncludesAuthorizationFields
(t *testing.T)
model/user_session_test.go:588
Function
TestUserSessionCacheExcludesRefreshDigests
(t *testing.T)
model/user_session_test.go:311
Function
TestUserSessionCacheTTLUsesShortCacheWindow
(t *testing.T)
model/user_session_test.go:99
Function
TestUserSessionCreateListAndRevokeOne
(t *testing.T)
model/user_session_test.go:216
Function
TestUserSessionGrowthCountsUseBroadActiveAndStrictIssuancePredicates
(t *testing.T)
model/user_session_test.go:392
Function
TestUserSessionGrowthQueryIndexesExist
(t *testing.T)
model/user_session_test.go:580
Function
TestUserSessionPreviousRefreshHashMigrationConfiguredDatabases
(t *testing.T)
model/user_session_migration_test.go:131
Function
TestUserSessionPreviousRefreshHashMigrationSQLite
(t *testing.T)
model/user_session_migration_test.go:124
Function
TestUserSessionPreviousRefreshHashNormalizesLegacyPadding
(t *testing.T)
model/user_session_test.go:275
Function
TestUserSessionPreviousRefreshHashSchemaUsesNullableVarchar
(t *testing.T)
model/user_session_migration_test.go:73
Function
TestUserUpdateBumpsAuthVersionOnlyForAuthorizationChanges
(t *testing.T)
model/user_session_test.go:605
← previous
next →
14,101–14,200 of 15,409, ranked by callers