MCPcopy Create free account

hub / github.com/QuantumNous/new-api / functions

Functions15,409 in github.com/QuantumNous/new-api

FunctionTestApplyReasoningModelSuffixRetryKeepsEquivalentState
(t *testing.T)
relay/helper/reasoning_suffix_test.go:47
FunctionTestApplyReasoningModelSuffixStillParsesOpenAIEffortTail
(t *testing.T)
relay/helper/reasoning_suffix_test.go:232
FunctionTestApplyReasoningModelSuffixThinkingLegacyValuesRejected
(t *testing.T)
relay/helper/reasoning_suffix_test.go:377
FunctionTestApplyReasoningModelSuffixThinkingMinusOnePassthrough
(t *testing.T)
relay/helper/reasoning_suffix_test.go:582
FunctionTestApplyReasoningModelSuffixThinkingOff
(t *testing.T)
relay/helper/reasoning_suffix_test.go:360
FunctionTestApplyReasoningModelSuffixThinkingOnOnly
(t *testing.T)
relay/helper/reasoning_suffix_test.go:342
FunctionTestApplyReasoningModelSuffixTreatsCloudflareAtAsModelName
(t *testing.T)
relay/helper/reasoning_suffix_test.go:275
FunctionTestApplyReasoningModelSuffixTrimsUpstreamAndAttachesState
(t *testing.T)
relay/helper/reasoning_suffix_test.go:33
FunctionTestApplyResponsesUsageCopiesTokenDetails
(t *testing.T)
service/responses_usage_test.go:161
FunctionTestApplyResponsesUsageFallsBackToCompletionTokenDetails
(t *testing.T)
service/responses_usage_test.go:203
FunctionTestApplyResponsesUsagePreservesBillingSnapshotAcrossPartialUpdates
(t *testing.T)
service/responses_usage_test.go:218
FunctionTestApplySelectedModelChanges
(t *testing.T)
controller/channel_upstream_update_test.go:460
FunctionTestApplySystemPromptIfNeededSkipsToolLoadingMessages
(t *testing.T)
relay/chat_completions_via_responses_test.go:212
FunctionTestApplyUpstreamBodyMetadataEmptyStorageRemainsReplayable
(t *testing.T)
relay/channel/api_request_getbody_test.go:153
FunctionTestApplyUpstreamBodyMetadataHidesRawBodyStorageCloser
(t *testing.T)
relay/channel/api_request_getbody_test.go:62
FunctionTestApplyUpstreamBodyMetadataKeepsExistingGetBody
(t *testing.T)
relay/channel/api_request_getbody_test.go:127
FunctionTestApplyUpstreamBodyMetadataKeepsNativeMetadataForNonReplayableBody
(t *testing.T)
relay/channel/api_request_getbody_test.go:95
FunctionTestApplyUpstreamBodyMetadataSetsReplayableMetadata
(t *testing.T)
relay/channel/api_request_getbody_test.go:26
FunctionTestApplyWebSocketSubprotocolAuthorizationDoesNotOverrideProtocolOnly
(t *testing.T)
middleware/auth_test.go:590
FunctionTestApplyWebSocketSubprotocolAuthorizationOverridesWithInsecureKey
(t *testing.T)
middleware/auth_test.go:600
FunctionTestApplyWebSocketSubprotocolAuthorizationReadsRepeatedHeaders
(t *testing.T)
middleware/auth_test.go:609
FunctionTestAssignDisplayLogIds
(t *testing.T)
model/clickhouse_log_test.go:144
FunctionTestAttachQuotaSaturationNestsUnderAdminInfo
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
FunctionTestAttachQuotaSaturationNoClampNoMarker
TestAttachQuotaSaturationNoClampNoMarker verifies the common case (no saturation) leaves the log untouched.
service/quota_saturation_test.go:92
FunctionTestAttachQuotaSaturationPreservesExistingAdminInfo
TestAttachQuotaSaturationPreservesExistingAdminInfo verifies the marker is merged into a pre-existing admin_info map without clobbering it.
service/quota_saturation_test.go:74
FunctionTestAttachmentRecordWithoutListing
Without a listing, the record holds the attachments the hook read.
relay/requestplugin/attachments_test.go:189
FunctionTestAttachmentTextCacheAndBudget
Three instances that read one attachment extract it once; the request's text budget leaves the rest unchecked.
relay/requestplugin/attachments_test.go:198
FunctionTestAttachmentTextFormatsAndCaps
(t *testing.T)
relay/requestplugin/attachments_test.go:230
FunctionTestAttachmentsListAndRead
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
FunctionTestAttachmentsUnusedCostNothing
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
FunctionTestAudioTokenVariables
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:1027
FunctionTestAuditDatabaseMatrix
(t *testing.T)
controller/access_token_audit_test.go:1027
FunctionTestAuditIsolationVisibilityAndFailureContracts
(t *testing.T)
controller/access_token_audit_test.go:569
FunctionTestAuditLogSortIndexDatabaseMatrix
TestAuditLogSortIndexDatabaseMatrix verifies audit ordering and index migrations across supported databases.
model/audit_log_test.go:21
FunctionTestAuditOtherDatabaseEncoding
(t *testing.T)
controller/access_token_audit_test.go:996
FunctionTestAuditRoleSnapshotSurvivesActorChanges
(t *testing.T)
controller/access_token_audit_test.go:699
FunctionTestAuditRoleVisibilityAndPermissions
(t *testing.T)
controller/access_token_audit_test.go:632
FunctionTestAuthCacheIntegrityDatabaseMatrix
(t *testing.T)
model/auth_cache_integrity_test.go:19
FunctionTestAuthCacheKeysShareClusterHashTag
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
FunctionTestAuthFlowExpiryIsEnforced
(t *testing.T)
model/auth_flow_test.go:56
FunctionTestAuthFlowIsBoundAndConsumedOnce
(t *testing.T)
model/auth_flow_test.go:13
FunctionTestAuthLogoutRejectsRefreshCookieSessionMismatch
(t *testing.T)
controller/auth_session_test.go:19
FunctionTestAutoDisableKeepsManualDisable
(t *testing.T)
model/channel_status_test.go:167
FunctionTestAutoDisableOfAScheduledPluginKeyBumpsChannelsOnFollowers
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
FunctionTestAutoGroupScopesBySettledGroup
(t *testing.T)
relay/requestplugin/requestplugin_test.go:1943
FunctionTestAutoOneShardNegotiatesHTTP2SingleConnection
(t *testing.T)
service/http_client_transport_test.go:125
FunctionTestAutoReasoningDefaultRules
(t *testing.T)
plugins/request_plugins_test.go:951
FunctionTestAutoReasoningPlugin
(t *testing.T)
plugins/request_plugins_test.go:427
FunctionTestAwsHandlersCancelSdkRequestAndSkipRetry
(t *testing.T)
relay/channel/aws/relay_aws_test.go:391
FunctionTestAwsStreamHandlerStopsAtClientCancellation
(t *testing.T)
relay/channel/aws/relay_aws_test.go:497
FunctionTestAwsStreamHandlerUsesFinalUpstreamUsage
(t *testing.T)
relay/channel/aws/relay_aws_test.go:459
FunctionTestAzureHostedWebSearch
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
FunctionTestBackendMessageLanguage
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
FunctionTestBackgroundScanRefreshesOnlyWhatExpiresSoon
(t *testing.T)
service/provider_plugin_test.go:621
FunctionTestBackwardCompat_OldExprWithTokenParams
--------------------------------------------------------------------------- Backward compatibility: p+c only expressions still work with TokenParams -
pkg/billingexpr/billingexpr_test.go:657
FunctionTestBaseModelNameStripsModifiers
(t *testing.T)
setting/reasoning/suffix_test.go:119
FunctionTestBatchPollsGroupTasksByAccount
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
FunctionTestBatchUpdateAccumulatesTwoMaximumRequestCharges
(t *testing.T)
model/quota_reserve_test.go:141
FunctionTestBatchUpdateAccumulatorSaturatesOverflow
(t *testing.T)
model/quota_reserve_test.go:154
FunctionTestBillableToolCountSources
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
FunctionTestBillingSessionReserveWalletTopUpDecrementsBalance
(t *testing.T)
service/tiered_settle_test.go:500
FunctionTestBillingUsageJSONUsesProtocolNamedFields
(t *testing.T)
relaykit/dto/billing_usage_test.go:156
FunctionTestBorrowedResponsesRequestRetryBodies
(t *testing.T)
relay/request_clone_test.go:286
FunctionTestBuildAlphaSearchRequestBodyNoMappingKeepsRawBytes
(t *testing.T)
relay/alpha_search_handler_test.go:53
FunctionTestBuildAlphaSearchRequestBodyPreservesUnknownFields
(t *testing.T)
relay/alpha_search_handler_test.go:22
FunctionTestBuildAlphaSearchRequestBodyRewritesModel
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
FunctionTestBuildAwsRequestBodyPassThroughDropsRepeatedModelAndStream
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
FunctionTestBuildBillingExprRequestInputFromRequest
(t *testing.T)
relay/helper/billing_expr_request_test.go:52
FunctionTestBuildClaudeUsageFromOpenAICacheWriteUsage
(t *testing.T)
relaykit/relayconvert/internal/oai_chat/to_claude_messages_resp_test.go:107
FunctionTestBuildGoogleModelURLUsesTheLocationHost
(t *testing.T)
relay/channel/vertex/url_builder_test.go:9
FunctionTestBuildLogLikeConditionUsesClickHouseEscaping
(t *testing.T)
model/clickhouse_log_test.go:118
FunctionTestBuildLogLikeConditionUsesStandardEscape
(t *testing.T)
model/clickhouse_log_test.go:104
FunctionTestBuildMessageDeltaPatchUsage
(t *testing.T)
relay/channel/claude/message_delta_usage_patch_test.go:66
FunctionTestBuildOllamaStreamDelta
(t *testing.T)
relay/channel/ollama/stream_test.go:101
FunctionTestBuildOpenAIModelFallsBackToCustomForUnknownModels
(t *testing.T)
controller/model_owned_by_test.go:57
FunctionTestBuildOpenAIModelOverridesOwnedBy
(t *testing.T)
controller/model_owned_by_test.go:51
FunctionTestBuildOpenAIStyleUsageFromClaudeUsage
(t *testing.T)
relay/channel/claude/relay_claude_test.go:308
FunctionTestBuildOpenAIStyleUsageFromClaudeUsageDefaultsAggregateCacheCreationTo5m
(t *testing.T)
relay/channel/claude/relay_claude_test.go:390
FunctionTestBuildOpenAIStyleUsageFromClaudeUsagePreservesCacheCreationRemainder
(t *testing.T)
relay/channel/claude/relay_claude_test.go:340
FunctionTestBuildResponsesWSCreateEventIsFlat
(t *testing.T)
relay/responses_websocket_test.go:492
FunctionTestBuildResponsesWSErrorPayloadIncludesStatus
(t *testing.T)
relay/responses_websocket_test.go:538
FunctionTestBuildTaskArtifactContentURLFallsBackOnlyToServerAddress
(t *testing.T)
service/task_artifact_access_test.go:57
FunctionTestBuildTaskArtifactContentURLUsesConfiguredAddressAndPreservesPrefix
(t *testing.T)
service/task_artifact_access_test.go:31
FunctionTestBuildTaskPluginRouteRequestBodyUnion
(t *testing.T)
middleware/task_plugin_test.go:384
FunctionTestBuildTaskPluginRouteRequestRejectsUnsafeBodies
(t *testing.T)
middleware/task_plugin_test.go:477
FunctionTestBuildTaskPluginViewEncodesKeysInMapOrder
(t *testing.T)
service/task_plugin_view_test.go:87
FunctionTestBuildTaskPluginViewOmitsPrivatePollState
(t *testing.T)
service/task_plugin_view_test.go:66
FunctionTestBuildTaskPluginViewRewritesOnlyStructuredTaskIDFields
(t *testing.T)
service/task_plugin_view_test.go:13
FunctionTestBuildTestLogOtherInjectsTieredInfo
(t *testing.T)
controller/channel_test_internal_test.go:281
FunctionTestBuildTieredTokenParams_ClaudeUnsplitCacheWrites
(t *testing.T)
service/tiered_settle_test.go:951
FunctionTestBuildTieredTokenParams_Claude_WithCache
(t *testing.T)
service/tiered_settle_test.go:799
FunctionTestBuildTieredTokenParams_GPT_AudioOutput
(t *testing.T)
service/tiered_settle_test.go:817
FunctionTestBuildTieredTokenParams_GPT_AudioOutputNoVar
(t *testing.T)
service/tiered_settle_test.go:835
FunctionTestBuildTieredTokenParams_GPT_NoCacheVar
(t *testing.T)
service/tiered_settle_test.go:727
FunctionTestBuildTieredTokenParams_GPT_WithCache
(t *testing.T)
service/tiered_settle_test.go:709
FunctionTestBuildTieredTokenParams_GPT_WithImage
(t *testing.T)
service/tiered_settle_test.go:745
FunctionTestBuildTieredTokenParams_Len_Claude
(t *testing.T)
service/tiered_settle_test.go:924
FunctionTestBuildTieredTokenParams_Len_GPT
--------------------------------------------------------------------------- BuildTieredTokenParams: Len computation tests ----------------------------
service/tiered_settle_test.go:901
FunctionTestBuildTieredTokenParams_Len_TierCondition
(t *testing.T)
service/tiered_settle_test.go:1031
FunctionTestBuildTieredTokenParams_ParityWithRatio
(t *testing.T)
service/tiered_settle_test.go:853
← previousnext →11,901–12,000 of 15,409, ranked by callers