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
TestApplyReasoningModelSuffixRetryKeepsEquivalentState
(t *testing.T)
relay/helper/reasoning_suffix_test.go:47
Function
TestApplyReasoningModelSuffixStillParsesOpenAIEffortTail
(t *testing.T)
relay/helper/reasoning_suffix_test.go:232
Function
TestApplyReasoningModelSuffixThinkingLegacyValuesRejected
(t *testing.T)
relay/helper/reasoning_suffix_test.go:377
Function
TestApplyReasoningModelSuffixThinkingMinusOnePassthrough
(t *testing.T)
relay/helper/reasoning_suffix_test.go:582
Function
TestApplyReasoningModelSuffixThinkingOff
(t *testing.T)
relay/helper/reasoning_suffix_test.go:360
Function
TestApplyReasoningModelSuffixThinkingOnOnly
(t *testing.T)
relay/helper/reasoning_suffix_test.go:342
Function
TestApplyReasoningModelSuffixTreatsCloudflareAtAsModelName
(t *testing.T)
relay/helper/reasoning_suffix_test.go:275
Function
TestApplyReasoningModelSuffixTrimsUpstreamAndAttachesState
(t *testing.T)
relay/helper/reasoning_suffix_test.go:33
Function
TestApplyResponsesUsageCopiesTokenDetails
(t *testing.T)
service/responses_usage_test.go:161
Function
TestApplyResponsesUsageFallsBackToCompletionTokenDetails
(t *testing.T)
service/responses_usage_test.go:203
Function
TestApplyResponsesUsagePreservesBillingSnapshotAcrossPartialUpdates
(t *testing.T)
service/responses_usage_test.go:218
Function
TestApplySelectedModelChanges
(t *testing.T)
controller/channel_upstream_update_test.go:460
Function
TestApplySystemPromptIfNeededSkipsToolLoadingMessages
(t *testing.T)
relay/chat_completions_via_responses_test.go:212
Function
TestApplyUpstreamBodyMetadataEmptyStorageRemainsReplayable
(t *testing.T)
relay/channel/api_request_getbody_test.go:153
Function
TestApplyUpstreamBodyMetadataHidesRawBodyStorageCloser
(t *testing.T)
relay/channel/api_request_getbody_test.go:62
Function
TestApplyUpstreamBodyMetadataKeepsExistingGetBody
(t *testing.T)
relay/channel/api_request_getbody_test.go:127
Function
TestApplyUpstreamBodyMetadataKeepsNativeMetadataForNonReplayableBody
(t *testing.T)
relay/channel/api_request_getbody_test.go:95
Function
TestApplyUpstreamBodyMetadataSetsReplayableMetadata
(t *testing.T)
relay/channel/api_request_getbody_test.go:26
Function
TestApplyWebSocketSubprotocolAuthorizationDoesNotOverrideProtocolOnly
(t *testing.T)
middleware/auth_test.go:590
Function
TestApplyWebSocketSubprotocolAuthorizationOverridesWithInsecureKey
(t *testing.T)
middleware/auth_test.go:600
Function
TestApplyWebSocketSubprotocolAuthorizationReadsRepeatedHeaders
(t *testing.T)
middleware/auth_test.go:609
Function
TestAssignDisplayLogIds
(t *testing.T)
model/clickhouse_log_test.go:144
Function
TestAttachQuotaSaturationNestsUnderAdminInfo
TestAttachQuotaSaturationNestsUnderAdminInfo verifies the saturation marker is nested under other.admin_info.quota_saturation so it is admin-only (the
service/quota_saturation_test.go:22
Function
TestAttachQuotaSaturationNoClampNoMarker
TestAttachQuotaSaturationNoClampNoMarker verifies the common case (no saturation) leaves the log untouched.
service/quota_saturation_test.go:92
Function
TestAttachQuotaSaturationPreservesExistingAdminInfo
TestAttachQuotaSaturationPreservesExistingAdminInfo verifies the marker is merged into a pre-existing admin_info map without clobbering it.
service/quota_saturation_test.go:74
Function
TestAttachmentRecordWithoutListing
Without a listing, the record holds the attachments the hook read.
relay/requestplugin/attachments_test.go:189
Function
TestAttachmentTextCacheAndBudget
Three instances that read one attachment extract it once; the request's text budget leaves the rest unchecked.
relay/requestplugin/attachments_test.go:198
Function
TestAttachmentTextFormatsAndCaps
(t *testing.T)
relay/requestplugin/attachments_test.go:230
Function
TestAttachmentsListAndRead
A hook lists the attachments in body order, inline ones by ref and the rest by id or URL, and reads the text of text, PDF and DOCX files; the record s
relay/requestplugin/attachments_test.go:149
Function
TestAttachmentsUnusedCostNothing
A hook that does not use attachments costs nothing for them: no file is extracted, decoded or listed, the record holds none, and a call's attachment s
relay/requestplugin/attachments_test.go:370
Function
TestAudioTokenVariables
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:1027
Function
TestAuditDatabaseMatrix
(t *testing.T)
controller/access_token_audit_test.go:1027
Function
TestAuditIsolationVisibilityAndFailureContracts
(t *testing.T)
controller/access_token_audit_test.go:569
Function
TestAuditLogSortIndexDatabaseMatrix
TestAuditLogSortIndexDatabaseMatrix verifies audit ordering and index migrations across supported databases.
model/audit_log_test.go:21
Function
TestAuditOtherDatabaseEncoding
(t *testing.T)
controller/access_token_audit_test.go:996
Function
TestAuditRoleSnapshotSurvivesActorChanges
(t *testing.T)
controller/access_token_audit_test.go:699
Function
TestAuditRoleVisibilityAndPermissions
(t *testing.T)
controller/access_token_audit_test.go:632
Function
TestAuthCacheIntegrityDatabaseMatrix
(t *testing.T)
model/auth_cache_integrity_test.go:19
Function
TestAuthCacheKeysShareClusterHashTag
Sharded Redis hashes only the text inside the first brace pair, so fence and version keys tagged with the untagged cache key share its slot. Miniredis
model/user_cache_auth_version_test.go:21
Function
TestAuthFlowExpiryIsEnforced
(t *testing.T)
model/auth_flow_test.go:56
Function
TestAuthFlowIsBoundAndConsumedOnce
(t *testing.T)
model/auth_flow_test.go:13
Function
TestAuthLogoutRejectsRefreshCookieSessionMismatch
(t *testing.T)
controller/auth_session_test.go:19
Function
TestAutoDisableKeepsManualDisable
(t *testing.T)
model/channel_status_test.go:167
Function
TestAutoDisableOfAScheduledPluginKeyBumpsChannelsOnFollowers
The master runs a plugin's scheduled hook when a key is disabled automatically, so a follower's automatic disable of such a key bumps the channels top
model/channel_status_test.go:268
Function
TestAutoGroupScopesBySettledGroup
(t *testing.T)
relay/requestplugin/requestplugin_test.go:1943
Function
TestAutoOneShardNegotiatesHTTP2SingleConnection
(t *testing.T)
service/http_client_transport_test.go:125
Function
TestAutoReasoningDefaultRules
(t *testing.T)
plugins/request_plugins_test.go:951
Function
TestAutoReasoningPlugin
(t *testing.T)
plugins/request_plugins_test.go:427
Function
TestAwsHandlersCancelSdkRequestAndSkipRetry
(t *testing.T)
relay/channel/aws/relay_aws_test.go:391
Function
TestAwsStreamHandlerStopsAtClientCancellation
(t *testing.T)
relay/channel/aws/relay_aws_test.go:497
Function
TestAwsStreamHandlerUsesFinalUpstreamUsage
(t *testing.T)
relay/channel/aws/relay_aws_test.go:459
Function
TestAzureHostedWebSearch
A converted hosted web search reaches Azure and Xinference Chat Completions as web_search_options, like OpenAI; the upstream decides whether it applie
relay/channel/openai/relay_responses_billing_test.go:620
Function
TestBackendMessageLanguage
A saved language or an Accept-Language header selects the language of a backend message. A reader who states neither gets DEFAULT_LANGUAGE, which is E
i18n/i18n_test.go:79
Function
TestBackgroundScanRefreshesOnlyWhatExpiresSoon
(t *testing.T)
service/provider_plugin_test.go:621
Function
TestBackwardCompat_OldExprWithTokenParams
--------------------------------------------------------------------------- Backward compatibility: p+c only expressions still work with TokenParams -
pkg/billingexpr/billingexpr_test.go:657
Function
TestBaseModelNameStripsModifiers
(t *testing.T)
setting/reasoning/suffix_test.go:119
Function
TestBatchPollsGroupTasksByAccount
TestBatchPollsGroupTasksByAccount polls tasks of two accounts, and of one that left the channel, on one multi-key channel.
relay/channel/task/jsplugin/credential_test.go:276
Function
TestBatchUpdateAccumulatesTwoMaximumRequestCharges
(t *testing.T)
model/quota_reserve_test.go:141
Function
TestBatchUpdateAccumulatorSaturatesOverflow
(t *testing.T)
model/quota_reserve_test.go:154
Function
TestBillableToolCountSources
Upstream-reported counts replace per-item counts for the same key (an explicit zero silences them) and ignore negatives; a count the request itself pr
relay/common/tool_usage_test.go:115
Function
TestBillingSessionReserveWalletTopUpDecrementsBalance
(t *testing.T)
service/tiered_settle_test.go:500
Function
TestBillingUsageJSONUsesProtocolNamedFields
(t *testing.T)
relaykit/dto/billing_usage_test.go:156
Function
TestBorrowedResponsesRequestRetryBodies
(t *testing.T)
relay/request_clone_test.go:286
Function
TestBuildAlphaSearchRequestBodyNoMappingKeepsRawBytes
(t *testing.T)
relay/alpha_search_handler_test.go:53
Function
TestBuildAlphaSearchRequestBodyPreservesUnknownFields
(t *testing.T)
relay/alpha_search_handler_test.go:22
Function
TestBuildAlphaSearchRequestBodyRewritesModel
A single model is rewritten where it stands. Routing reads the first "model" and most upstreams read the last, so a repeated model comes out as one me
relay/alpha_search_handler_test.go:63
Function
TestBuildAwsRequestBodyPassThroughDropsRepeatedModelAndStream
InvokeModel takes the model and streaming from the request, so the pass-through body keeps no copy of either, even when the client repeats them.
relay/channel/aws/relay_aws_test.go:227
Function
TestBuildBillingExprRequestInputFromRequest
(t *testing.T)
relay/helper/billing_expr_request_test.go:52
Function
TestBuildClaudeUsageFromOpenAICacheWriteUsage
(t *testing.T)
relaykit/relayconvert/internal/oai_chat/to_claude_messages_resp_test.go:107
Function
TestBuildGoogleModelURLUsesTheLocationHost
(t *testing.T)
relay/channel/vertex/url_builder_test.go:9
Function
TestBuildLogLikeConditionUsesClickHouseEscaping
(t *testing.T)
model/clickhouse_log_test.go:118
Function
TestBuildLogLikeConditionUsesStandardEscape
(t *testing.T)
model/clickhouse_log_test.go:104
Function
TestBuildMessageDeltaPatchUsage
(t *testing.T)
relay/channel/claude/message_delta_usage_patch_test.go:66
Function
TestBuildOllamaStreamDelta
(t *testing.T)
relay/channel/ollama/stream_test.go:101
Function
TestBuildOpenAIModelFallsBackToCustomForUnknownModels
(t *testing.T)
controller/model_owned_by_test.go:57
Function
TestBuildOpenAIModelOverridesOwnedBy
(t *testing.T)
controller/model_owned_by_test.go:51
Function
TestBuildOpenAIStyleUsageFromClaudeUsage
(t *testing.T)
relay/channel/claude/relay_claude_test.go:308
Function
TestBuildOpenAIStyleUsageFromClaudeUsageDefaultsAggregateCacheCreationTo5m
(t *testing.T)
relay/channel/claude/relay_claude_test.go:390
Function
TestBuildOpenAIStyleUsageFromClaudeUsagePreservesCacheCreationRemainder
(t *testing.T)
relay/channel/claude/relay_claude_test.go:340
Function
TestBuildResponsesWSCreateEventIsFlat
(t *testing.T)
relay/responses_websocket_test.go:492
Function
TestBuildResponsesWSErrorPayloadIncludesStatus
(t *testing.T)
relay/responses_websocket_test.go:538
Function
TestBuildTaskArtifactContentURLFallsBackOnlyToServerAddress
(t *testing.T)
service/task_artifact_access_test.go:57
Function
TestBuildTaskArtifactContentURLUsesConfiguredAddressAndPreservesPrefix
(t *testing.T)
service/task_artifact_access_test.go:31
Function
TestBuildTaskPluginRouteRequestBodyUnion
(t *testing.T)
middleware/task_plugin_test.go:384
Function
TestBuildTaskPluginRouteRequestRejectsUnsafeBodies
(t *testing.T)
middleware/task_plugin_test.go:477
Function
TestBuildTaskPluginViewEncodesKeysInMapOrder
(t *testing.T)
service/task_plugin_view_test.go:87
Function
TestBuildTaskPluginViewOmitsPrivatePollState
(t *testing.T)
service/task_plugin_view_test.go:66
Function
TestBuildTaskPluginViewRewritesOnlyStructuredTaskIDFields
(t *testing.T)
service/task_plugin_view_test.go:13
Function
TestBuildTestLogOtherInjectsTieredInfo
(t *testing.T)
controller/channel_test_internal_test.go:281
Function
TestBuildTieredTokenParams_ClaudeUnsplitCacheWrites
(t *testing.T)
service/tiered_settle_test.go:951
Function
TestBuildTieredTokenParams_Claude_WithCache
(t *testing.T)
service/tiered_settle_test.go:799
Function
TestBuildTieredTokenParams_GPT_AudioOutput
(t *testing.T)
service/tiered_settle_test.go:817
Function
TestBuildTieredTokenParams_GPT_AudioOutputNoVar
(t *testing.T)
service/tiered_settle_test.go:835
Function
TestBuildTieredTokenParams_GPT_NoCacheVar
(t *testing.T)
service/tiered_settle_test.go:727
Function
TestBuildTieredTokenParams_GPT_WithCache
(t *testing.T)
service/tiered_settle_test.go:709
Function
TestBuildTieredTokenParams_GPT_WithImage
(t *testing.T)
service/tiered_settle_test.go:745
Function
TestBuildTieredTokenParams_Len_Claude
(t *testing.T)
service/tiered_settle_test.go:924
Function
TestBuildTieredTokenParams_Len_GPT
--------------------------------------------------------------------------- BuildTieredTokenParams: Len computation tests ----------------------------
service/tiered_settle_test.go:901
Function
TestBuildTieredTokenParams_Len_TierCondition
(t *testing.T)
service/tiered_settle_test.go:1031
Function
TestBuildTieredTokenParams_ParityWithRatio
(t *testing.T)
service/tiered_settle_test.go:853
← previous
next →
11,901–12,000 of 15,409, ranked by callers