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
TestEventStreamReaderRejectsBadFraming
(t *testing.T)
relay/channel/providerplugin/eventstream_test.go:59
Function
TestExecuteTaskSubmissionCallerCancellationDuringSubmitRefundsBeforeDurableBarrier
(t *testing.T)
controller/relay_task_plugin_test.go:387
Function
TestExecuteTaskSubmissionDisconnectAfterDurableInsertDoesNotRefund
(t *testing.T)
controller/relay_task_plugin_test.go:428
Function
TestExecuteTaskSubmissionDisconnectBeforeUpstreamAcceptanceSkipsSubmitAndRefunds
(t *testing.T)
controller/relay_task_plugin_test.go:362
Function
TestExecuteTaskSubmissionHonorsRouteRetainResult
A submit route declaring retainResult: false persists the task row for billing but never writes the upstream snapshot for an immediate terminal result
controller/relay_task_plugin_test.go:273
Function
TestExecuteTaskSubmissionPersistsPinnedPluginProvenance
(t *testing.T)
controller/relay_task_plugin_test.go:214
Function
TestExecuteTaskSubmissionRefundsCancellationBeforeDurableBarrier
(t *testing.T)
controller/relay_task_plugin_test.go:337
Function
TestExecuteTaskSubmissionRefundsWhenFinalReserveFails
(t *testing.T)
controller/relay_task_plugin_test.go:677
Function
TestExecuteTaskSubmissionRefundsWhenInsertFails
(t *testing.T)
controller/relay_task_plugin_test.go:166
Function
TestExecuteTaskSubmissionSettlementFailureStaysDurableAndWritesNothing
(t *testing.T)
controller/relay_task_plugin_test.go:189
Function
TestExemptAtNameIsOpaqueForBillingIdentity
(t *testing.T)
setting/reasoning/suffix_test.go:123
Function
TestExpireStaleSystemTaskLockFailsOldRunAndAllowsNewRun
(t *testing.T)
model/system_task_test.go:302
Function
TestExpireSubscriptionOrder_RejectsMismatchedPaymentProvider
(t *testing.T)
model/payment_method_guard_test.go:162
Function
TestExpiredSystemTaskLockFailsOldRunAndClaimsLegacyPendingRun
(t *testing.T)
model/system_task_test.go:274
Function
TestExpiringCredentialIsRefreshedBeforeTheRequest
(t *testing.T)
router/provider_plugin_relay_test.go:542
Function
TestExpiringTaskCredentialIsRefreshedFirst
(t *testing.T)
relay/channel/task/jsplugin/credential_test.go:434
Function
TestExprHashString_Deterministic
--------------------------------------------------------------------------- Hash ---------------------------------------------------------------------
pkg/billingexpr/billingexpr_test.go:556
Function
TestExternalAuthAssertionCanOnlyBeClaimedOnce
(t *testing.T)
model/auth_flow_test.go:73
Function
TestExternalIdentityClaimEnforcesSingleOwnerAtomically
(t *testing.T)
model/external_identity_claim_test.go:11
Function
TestExtractChannelAffinityValue_JSONFile
(t *testing.T)
service/channel_affinity_template_test.go:199
Function
TestExtractChannelAffinityValue_RequestHeader
(t *testing.T)
service/channel_affinity_template_test.go:185
Function
TestFailedAdvancedCustomDetectionDoesNotStageFullRemoval
(t *testing.T)
controller/channel_upstream_update_test.go:333
Function
TestFailedRefreshBeforeTheRequest
(t *testing.T)
router/provider_plugin_relay_test.go:557
Function
TestFetchAdvancedCustomModelsAppliesHeaderOverrideAfterRouteAuth
(t *testing.T)
controller/channel_upstream_update_test.go:74
Function
TestFetchAdvancedCustomModelsRedactsQueryKeyFromTransportErrors
(t *testing.T)
controller/channel_upstream_update_test.go:148
Function
TestFetchAdvancedCustomModelsRejectsNonOKResponse
(t *testing.T)
controller/channel_upstream_update_test.go:135
Function
TestFetchAdvancedCustomModelsUsesEnabledSavedMultiKey
(t *testing.T)
controller/channel_upstream_update_test.go:112
Function
TestFetchBodyRules
(t *testing.T)
pkg/jsplugin/provider_test.go:894
Function
TestFetchInRequestProcessingHooks
ingress, egress and report reach the instance's own service with GET, HEAD and POST; request and outbound have no network. report gets ctx with stage
pkg/jsplugin/provider_test.go:765
Function
TestFetchModelListPagesAndExchangesAgainOn401
A model list fetch follows the plugin's pages, and a 401 exchanges the key again once and sends the rejected page again.
relay/channel/providerplugin/management_test.go:49
Function
TestFetchModelListStopsAtTheFollowUpLimit
A plugin that keeps chaining fails the fetch after MaxFollowUps requests.
relay/channel/providerplugin/management_test.go:98
Function
TestFetchModelsAdvancedCustomCreatePreview
(t *testing.T)
controller/channel_upstream_update_test.go:200
Function
TestFetchModelsAdvancedCustomEditPreviewUsesSavedKeyAndExplicitClears
(t *testing.T)
controller/channel_upstream_update_test.go:245
Function
TestFetchModelsOfAProviderChannel
(t *testing.T)
controller/provider_plugin_test.go:418
Function
TestFetchModelsUsesSharedChannelFetchBehavior
(t *testing.T)
controller/channel_upstream_update_test.go:364
Function
TestFetchNewAPIModelsUsesOpenAIContract
(t *testing.T)
controller/channel_upstream_update_test.go:398
Function
TestFetchOrdinaryOpenAIModelsKeepsExistingEmptyDataBehavior
(t *testing.T)
controller/channel_upstream_update_test.go:183
Function
TestFetchPostInCredentialHooks
(t *testing.T)
pkg/jsplugin/provider_test.go:827
Function
TestFetchSendsAttachments
utils.fetch sends the data of each ref its body names, streamed from the request, and the URL of a listed file as it is; the record marks both sent.
relay/requestplugin/attachments_test.go:321
Function
TestFileReferenceRoundTripAddressesRepeatedFieldFiles
(t *testing.T)
pkg/jsplugin/routing_test.go:141
Function
TestFilterCandidateIDs
(t *testing.T)
model/channel_constraint_test.go:15
Function
TestFinalizeResponsesToChatStreamFlushesPendingDeltaOnlyArguments
(t *testing.T)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_resp_test.go:400
Function
TestFindEarliestPendingSystemTasks
(t *testing.T)
model/system_task_test.go:333
Function
TestFinishSystemTaskRetainsExecutor
(t *testing.T)
model/system_task_test.go:444
Function
TestFixedPriceBillingDatabaseMatrix
The configured DSNs must point at isolated test databases. Each dialect runs the real reservation, settlement and log paths with the same billing case
service/text_quota_test.go:34
Function
TestFixedPriceBranches
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:14
Function
TestFixedPricePreConsumeAndRealtimeRejection
(t *testing.T)
relay/helper/price_test.go:74
Function
TestFixedPriceQuotaBoundariesAndUnsupportedTaskSnapshots
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:64
Function
TestFixedPriceRejectsInvalidLeavesIncludingUnselectedBranches
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:44
Function
TestForcedHTTP1AgainstHTTP2Server
(t *testing.T)
service/http_client_transport_test.go:190
Function
TestForcedHTTP1ConcurrentDistinctConnections
(t *testing.T)
service/http_client_transport_test.go:218
Function
TestForeignCredentialNeverLeavesTheGateway
(t *testing.T)
router/provider_plugin_relay_test.go:644
Function
TestForeignOrMisplacedCredentialsNeverLeave
(t *testing.T)
relay/channel/task/jsplugin/credential_test.go:379
Function
TestFormBodyIngress
(t *testing.T)
relay/requestplugin/requestplugin_test.go:1704
Function
TestFormFileAttachments
A form's files are attachments after the body's inline media: listed by field name, read, and never rewritten.
relay/requestplugin/attachments_test.go:296
Function
TestFormatClaudeResponseInfo_ContentBlockDelta
(t *testing.T)
relay/channel/claude/relay_claude_test.go:259
Function
TestFormatClaudeResponseInfo_MessageDelta_FullUsage
(t *testing.T)
relay/channel/claude/relay_claude_test.go:153
Function
TestFormatClaudeResponseInfo_MessageDelta_OnlyOutputTokens
(t *testing.T)
relay/channel/claude/relay_claude_test.go:195
Function
TestFormatClaudeResponseInfo_MessageStart
(t *testing.T)
relay/channel/claude/relay_claude_test.go:114
Function
TestFormatClaudeResponseInfo_NilClaudeInfo
(t *testing.T)
relay/channel/claude/relay_claude_test.go:251
Function
TestFormatMatchingModelNameDoesNotStripBase
(t *testing.T)
setting/ratio_setting/matching_test.go:10
Function
TestFormatUserLogsStripsQuotaSaturation
TestFormatUserLogsStripsQuotaSaturation verifies the admin-only quota saturation marker (nested under other.admin_info) is removed for non-admin log v
model/log_format_test.go:15
Function
TestFormatWaffoPancakeAmount_UsesDisplayPriceString
(t *testing.T)
controller/topup_waffo_pancake_test.go:13
Function
TestFourShardHTTP2ReusesExactlyFourConnections
(t *testing.T)
service/http_client_transport_test.go:157
Function
TestFromClaudeKeepsOutOfRangeBudgetsForTheRenderer
(t *testing.T)
relaykit/relayconvert/reasoning/intent_test.go:168
Function
TestFromOpenAIChatResolvesFieldConflictsWithDiagnostics
(t *testing.T)
relaykit/relayconvert/reasoning/intent_test.go:135
Function
TestFrontendSimulationContract
Shared fixtures protect the frontend simulator against drift from the real engine.
pkg/billingexpr/billingexpr_test.go:1157
Function
TestGLM_Tier1
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:162
Function
TestGLM_Tier2
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:176
Function
TestGLM_Tier3
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:190
Function
TestGPT6AstraBuiltinBilling
(t *testing.T)
setting/billing_setting/builtin_billing_test.go:21
Function
TestGapsAWSEventStream
(t *testing.T)
router/provider_plugin_gaps_test.go:587
Function
TestGapsBalanceRunDisablesOnlyWhatIsUsedUp
(t *testing.T)
controller/channel_plugin_gaps_test.go:246
Function
TestGapsChainedRequests
(t *testing.T)
router/provider_plugin_gaps_test.go:89
Function
TestGapsChannelConfigAndKeyCheckOnSave
(t *testing.T)
controller/channel_plugin_gaps_test.go:87
Function
TestGapsCheckPluginKeys
(t *testing.T)
service/provider_plugin_token_test.go:205
Function
TestGapsConfigAddressesAndURLs
(t *testing.T)
router/provider_plugin_gaps_test.go:320
Function
TestGapsFetchModelsPreviewOfAPluginChannel
(t *testing.T)
controller/channel_plugin_gaps_test.go:382
Function
TestGapsKeyExchange
(t *testing.T)
router/provider_plugin_gaps_test.go:419
Function
TestGapsPluginKeyTokenCache
(t *testing.T)
service/provider_plugin_token_test.go:87
Function
TestGapsProviderTestEndpoint
(t *testing.T)
controller/channel_plugin_gaps_test.go:428
Function
TestGapsToolCounts
The web_search calls a converter counts are billed at the tool price, once per call, as the built-in vendors' tool usage is.
router/provider_plugin_gaps_test.go:509
Function
TestGapsUpdateAllBalancesRunsAsASystemTask
(t *testing.T)
controller/channel_plugin_gaps_test.go:306
Function
TestGapsUpdateChannelBalanceOfAPluginChannel
(t *testing.T)
controller/channel_plugin_gaps_test.go:190
Function
TestGapsUploadThenRequest
A first request that uploads the client's text, then the main request that names the upload.
router/provider_plugin_gaps_test.go:140
Function
TestGapsUpstreamWebSocket
(t *testing.T)
router/provider_plugin_gaps_test.go:249
Function
TestGeminiChatGenerationConfigPreservesExplicitZeroValuesCamelCase
(t *testing.T)
relaykit/dto/gemini_generation_config_test.go:11
Function
TestGeminiChatGenerationConfigPreservesExplicitZeroValuesSnakeCase
(t *testing.T)
relaykit/dto/gemini_generation_config_test.go:51
Function
TestGeminiChatHandlerCompletionTokensExcludeToolUsePromptTokens
(t *testing.T)
relay/channel/gemini/relay_gemini_usage_test.go:146
Function
TestGeminiChatHandlerMissingUsageMetadataBuildsEstimatedBillingUsage
(t *testing.T)
relay/channel/gemini/relay_gemini_usage_test.go:462
Function
TestGeminiChatHandlerPromptOnlyUsageMetadataEstimatesCompletionTokens
(t *testing.T)
relay/channel/gemini/relay_gemini_usage_test.go:569
Function
TestGeminiChatHandlerUsesEstimatedPromptTokensWhenUsagePromptMissing
(t *testing.T)
relay/channel/gemini/relay_gemini_usage_test.go:304
Function
TestGeminiChatRequest_IsStream
(t *testing.T)
relaykit/dto/gemini_isstream_test.go:10
Function
TestGeminiChatResponseMarshalKeepsUsageMetadataField
(t *testing.T)
relaykit/dto/gemini_response_test.go:30
Function
TestGeminiChatResponseUsageMetadataPresence
(t *testing.T)
relaykit/dto/gemini_response_test.go:11
Function
TestGeminiChatStreamHandlerClaudeFirstFrameUsesUpstreamUsage
(t *testing.T)
relay/channel/gemini/relay_gemini_usage_test.go:62
Function
TestGeminiHandlersCountGroundingQueries
Google Search grounding records the unique trimmed non-empty queries (webSearchQueries and imageSearchQueries of every candidate, across every stream
relay/channel/gemini/relay_gemini_usage_test.go:661
Function
TestGeminiModalityKeysSettleConsistentlyAndDuplicateEntriesSum
(t *testing.T)
relaykit/dto/usage_merge_test.go:56
Function
TestGeminiRelayHandsLongRunningPredictionToPluginRoute
(t *testing.T)
router/relay_router_test.go:95
Function
TestGeminiResponsesHandlerClosesBodyOnReadError
(t *testing.T)
relay/channel/gemini/relay_responses_test.go:70
← previous
next →
12,401–12,500 of 15,409, ranked by callers