MCPcopy Create free account

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

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

FunctionTestNormalizeCacheCreationSplit
(t *testing.T)
relaykit/relayconvert/internal/oai_chat/to_claude_messages_resp_test.go:418
FunctionTestNormalizeChannelModelMapping
(t *testing.T)
controller/channel_upstream_update_test.go:494
FunctionTestNormalizeClickHouseDSN
(t *testing.T)
model/clickhouse_log_test.go:34
FunctionTestNormalizeGeminiThinkingConfigRewritesNativeConfig
(t *testing.T)
relaykit/relayconvert/reasoning/gemini_test.go:144
FunctionTestNormalizeHTTPTransportPolicyClampsWithoutPanic
(t *testing.T)
service/http_client_transport_test.go:572
FunctionTestNormalizeModelNames
(t *testing.T)
controller/channel_upstream_update_test.go:421
FunctionTestNormalizeOpenAIUsageMapsOutputImageTokens
(t *testing.T)
relay/channel/openai/image_stream_test.go:121
FunctionTestNormalizeResponsesUsagePreservesImageCacheDetails
(t *testing.T)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_resp_test.go:12
FunctionTestNormalizeResponsesWSCreateEventFlat
(t *testing.T)
relay/responses_websocket_test.go:441
FunctionTestNormalizeResponsesWSCreateEventWrapper
(t *testing.T)
relay/responses_websocket_test.go:402
FunctionTestNormalizeResponsesWSMaxOutputTokens
(t *testing.T)
relay/responses_websocket_test.go:44
FunctionTestNormalizeTaskAction
(t *testing.T)
constant/task_test.go:9
FunctionTestOAuth2JWTAuthCachesAndRefreshes
(t *testing.T)
relay/channel/task/jsplugin/auth_test.go:23
FunctionTestOAuth2JWTContextDoesNotExposeServiceAccountKey
(t *testing.T)
relay/channel/task/jsplugin/auth_test.go:49
FunctionTestOAuthBindIgnoresLegacyGitHubUsernames
(t *testing.T)
controller/auth_flow_test.go:1069
FunctionTestOAuthBindProviderErrorConsumesSessionBoundFlow
(t *testing.T)
controller/auth_flow_test.go:795
FunctionTestOAuthLoginConsumesFlowAfterProviderIdentityAndOnProviderError
(t *testing.T)
controller/auth_flow_test.go:761
FunctionTestOAuthLoginConsumesFlowOnlyAfterProviderIdentity
(t *testing.T)
controller/auth_flow_test.go:725
FunctionTestOAuthLoginLegacyGitHubBindingMigratesAfterLoginVerification
(t *testing.T)
controller/auth_flow_test.go:991
FunctionTestOAuthLoginLegacyGitHubBindingRequiresAccountEvidence
(t *testing.T)
controller/auth_flow_test.go:886
FunctionTestOAuthProviderWritesBumpTheirTopicInTheSameTransaction
An OAuth provider write and its topic bump share a transaction, as nothing else reloads the providers on other nodes: a write whose bump fails is not
service/node_sync_test.go:329
FunctionTestOAuthRegistrationPersistsInviter
(t *testing.T)
controller/auth_flow_test.go:1127
FunctionTestOIDCProvider_GetName
(t *testing.T)
oauth/oidc_test.go:10
FunctionTestOIDCSettings_DisplayNamePersistenceRoundTrip
(t *testing.T)
setting/system_setting/oidc_test.go:31
FunctionTestOIDCSettings_GetEffectiveDisplayName
(t *testing.T)
setting/system_setting/oidc_test.go:11
FunctionTestOaiChatToResponsesStreamHandlerConvertsSSEOrderAndUsage
(t *testing.T)
relay/channel/openai/chat_via_responses_test.go:221
FunctionTestOaiChatToResponsesStreamHandlerRestoresCodexCustomToolCall
(t *testing.T)
relay/channel/openai/chat_via_responses_test.go:273
FunctionTestOaiResponsesHandlerCountsCompletedImageGenerationOutputs
(t *testing.T)
relay/channel/openai/relay_responses_billing_test.go:315
FunctionTestOaiResponsesHandlerCountsImageGenerationOnIncompleteStatus
(t *testing.T)
relay/channel/openai/relay_responses_billing_test.go:361
FunctionTestOaiResponsesHandlerCountsOutputCallsNotDeclarations
(t *testing.T)
relay/channel/openai/relay_responses_billing_test.go:224
FunctionTestOaiResponsesHandlerDeclaredToolsWithoutOutputCountZero
(t *testing.T)
relay/channel/openai/relay_responses_billing_test.go:275
FunctionTestOaiResponsesHandlerRewritesSGLangCreatedAtToInt
(t *testing.T)
relay/channel/openai/relay_responses_billing_test.go:526
FunctionTestOaiResponsesHandlersKeepCacheWriteTTLSplit
The 12h cache-write split reaches billing from JSON, stream and compaction responses. The usage is the OpenAI prompt caching guide example.
relay/channel/openai/relay_responses_billing_test.go:474
FunctionTestOaiResponsesStreamHandlerCompletionLifecycle
(t *testing.T)
relay/channel/openai/relay_responses_billing_test.go:105
FunctionTestOaiResponsesStreamHandlerCountsImageOutputOnIncomplete
(t *testing.T)
relay/channel/openai/relay_responses_billing_test.go:452
FunctionTestOaiResponsesStreamHandlerDeduplicatesCompletedImageOutput
(t *testing.T)
relay/channel/openai/relay_responses_billing_test.go:441
FunctionTestOaiResponsesStreamHandlerDoesNotCountPartialImageEvent
(t *testing.T)
relay/channel/openai/relay_responses_billing_test.go:462
FunctionTestOaiResponsesStreamHandlerKeepsNonSGLangCreatedAt
(t *testing.T)
relay/channel/openai/relay_responses_billing_test.go:584
FunctionTestOaiResponsesStreamHandlerRewritesSGLangCreatedAtToInt
(t *testing.T)
relay/channel/openai/relay_responses_billing_test.go:548
FunctionTestOaiResponsesToChatBufferedStreamHandlerPreservesInterleavedClaudeContent
(t *testing.T)
relay/channel/openai/chat_via_responses_test.go:177
FunctionTestOaiResponsesToChatBufferedStreamHandlerReturnsJSONFromSSE
(t *testing.T)
relay/channel/openai/chat_via_responses_test.go:147
FunctionTestOaiResponsesToChatStreamHandlerConvertsClaudeSSETerminalsAndUsage
(t *testing.T)
relay/channel/openai/chat_via_responses_test.go:93
FunctionTestOaiResponsesToChatStreamHandlerConvertsSSEOrderAndUsage
(t *testing.T)
relay/channel/openai/chat_via_responses_test.go:45
FunctionTestObserveChannelAffinityUsageCacheByRelayFormat_ClaudeMode
(t *testing.T)
service/channel_affinity_usage_cache_test.go:36
FunctionTestObserveChannelAffinityUsageCacheByRelayFormat_MixedMode
(t *testing.T)
service/channel_affinity_usage_cache_test.go:62
FunctionTestObserveChannelAffinityUsageCacheByRelayFormat_UnsupportedModeKeepsEmpty
(t *testing.T)
service/channel_affinity_usage_cache_test.go:91
FunctionTestObserveResponsesOutcomeRecordsProtocolFacts
(t *testing.T)
service/responses_usage_test.go:114
FunctionTestObserveStreamChoicesDedupesFunctionCallNames
(t *testing.T)
relay/channel/openai/stream_tool_billing_test.go:11
FunctionTestOllamaChatHandlerNonStreamToolCalls
(t *testing.T)
relay/channel/ollama/stream_test.go:20
FunctionTestOllamaStreamHandlerDoneToolCalls
(t *testing.T)
relay/channel/ollama/stream_test.go:189
FunctionTestOnePluginMayOwnMultipleMethodsForSamePath
(t *testing.T)
router/plugin_router_test.go:660
FunctionTestOnlyRelayHooksNeedRelayRoutes
(t *testing.T)
pkg/jsplugin/provider_test.go:99
FunctionTestOpenAIChatRequestToClaudeMessagesMergesAdjacentAssistantToolCalls
(t *testing.T)
relaykit/relayconvert/internal/oai_chat/to_claude_messages_req_test.go:115
FunctionTestOpenAIChatRequestToClaudeMessagesNormalizesToolInputSchema
(t *testing.T)
relaykit/relayconvert/internal/oai_chat/to_claude_messages_req_test.go:47
FunctionTestOpenAIChatRequestToClaudeMessagesOmitsEmptyTools
(t *testing.T)
relaykit/relayconvert/claude_default_max_tokens_test.go:132
FunctionTestOpenAIChatRequestToClaudeMessagesStopSequences
(t *testing.T)
relaykit/relayconvert/internal/oai_chat/to_claude_messages_req_test.go:14
FunctionTestOpenAIChatRequestToClaudeMessages_ClaudeOpus48HighUsesAdaptiveThinking
(t *testing.T)
relay/channel/claude/relay_claude_test.go:427
FunctionTestOpenAIChatRequestToClaudeMessages_ClaudeOpus48ThinkingUsesAdaptiveHighEffort
(t *testing.T)
relay/channel/claude/relay_claude_test.go:454
FunctionTestOpenAIChatSamplingCompatibility
(t *testing.T)
controller/channel_test_request_test.go:120
FunctionTestOpenAIChatTokenLimitCompatibility
(t *testing.T)
controller/channel_test_request_test.go:203
FunctionTestOpenAIImageProtocolClaimBindsBothEndpointsAndRequiresRender
The OpenAI Images protocol is claimed in bare-string form, binds both image endpoints for every declared model, and requires the render hook that shap
pkg/jsplugin/routing_test.go:110
FunctionTestOpenAIPivotExplicitEffortOverridesPivotWithDiagnostic
(t *testing.T)
relaykit/relayconvert/reasoning/intent_test.go:258
FunctionTestOpenAIPivotRetainsExactStrengthAndBudget
(t *testing.T)
relaykit/relayconvert/reasoning/intent_test.go:227
FunctionTestOpenAIResponsesRequestDropsThinkingBudgetForNonQwenModel
(t *testing.T)
relaykit/dto/openai_request_zero_value_test.go:174
FunctionTestOpenAIResponsesRequestPreserveExplicitZeroValues
(t *testing.T)
relaykit/dto/openai_request_zero_value_test.go:120
FunctionTestOpenAIResponsesRequestPreserveQwQThinkingBudget
(t *testing.T)
relaykit/dto/openai_request_zero_value_test.go:160
FunctionTestOpenAIResponsesRequestPreserveQwenThinkingBudget
(t *testing.T)
relaykit/dto/openai_request_zero_value_test.go:146
FunctionTestOpenAIToGeminiSafetySettings
(t *testing.T)
relaykit/relayconvert/safety_settings_test.go:14
FunctionTestOpenaiImageDoResponseUsesInfoIsStream
(t *testing.T)
relay/channel/openai/image_stream_test.go:148
FunctionTestOpenaiImageHandlerUsesPositiveActualCountForFixedPrice
(t *testing.T)
relay/channel/openai/image_stream_test.go:427
FunctionTestOpenaiImageHandlersReturnJSONError
TestOpenaiImageHandlersReturnJSONError covers JSON error responses for both entry points: the non-streaming handler and the stream handler's non-SSE f
relay/channel/openai/image_stream_test.go:551
FunctionTestOpenaiImageStreamHandlerClientDisconnectKeepsRequestedCount
TestOpenaiImageStreamHandlerClientDisconnectKeepsRequestedCount guards the billing invariant: completed-event counting must not lower the charge when
relay/channel/openai/image_stream_test.go:333
FunctionTestOpenaiImageStreamHandlerClientDisconnectRaisesCount
TestOpenaiImageStreamHandlerClientDisconnectRaisesCount covers the other direction of the abort guard: when completed events already exceed the record
relay/channel/openai/image_stream_test.go:364
FunctionTestOpenaiImageStreamHandlerForwardsSSEAndUsage
TestOpenaiImageStreamHandlerForwardsSSEAndUsage covers the core SSE path: chunks are forwarded with rebuilt event lines, usage is extracted and normal
relay/channel/openai/image_stream_test.go:183
FunctionTestOpenaiImageStreamHandlerRecordsUpstreamErrorEvent
TestOpenaiImageStreamHandlerRecordsUpstreamErrorEvent verifies that an error event inside the SSE stream is recorded as a soft error while the payload
relay/channel/openai/image_stream_test.go:600
FunctionTestOpenaiImageStreamHandlerUsesCompletedEventCount
(t *testing.T)
relay/channel/openai/image_stream_test.go:221
FunctionTestOpenaiImageStreamHandlerWrapsJSONResponse
TestOpenaiImageStreamHandlerWrapsJSONResponse covers the non-SSE fallback: a JSON upstream response is wrapped into pseudo-SSE completed events.
relay/channel/openai/image_stream_test.go:397
FunctionTestOpenaiImageStreamHandlerWrapsNonStandardDataShapes
TestOpenaiImageStreamHandlerWrapsNonStandardDataShapes covers the JSON-to-SSE fallback when upstream returns data as an object, splits one image acros
relay/channel/openai/image_stream_test.go:496
FunctionTestOptInSafeToolLossRejectedAsBadRequestWithAdminDiagnostics
(t *testing.T)
relay/convert_request_error_test.go:178
FunctionTestOptionalManifestField
meta.optional is a boolean of a plugin with a request processing part.
pkg/jsplugin/registry_test.go:1418
FunctionTestOriginKeyUsesSchemeAndHost
(t *testing.T)
service/http_client_transport_test.go:95
FunctionTestOutboundEffectsAndAudit
(t *testing.T)
relay/requestplugin/requestplugin_test.go:149
FunctionTestPDFStreamDecodeBounds
A stream is decoded only when the filters and decode parameters the library reads for it, through references too, stay within the bounds: a buffer siz
relay/requestplugin/pdf_test.go:158
FunctionTestPDFToUnicodeBounds
A ToUnicode map is read in bounded work: a range expands to at most maxPDFCMapCodes codes in all, whether or not its target names text, and decoding s
relay/requestplugin/pdf_test.go:301
FunctionTestParamOverridePlugin
(t *testing.T)
plugins/request_plugins_test.go:315
FunctionTestParamOverrideReply
(t *testing.T)
relay/requestplugin/requestplugin_test.go:533
FunctionTestParamProbeArrayLength
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:290
FunctionTestParamProbeNestedBool
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:273
FunctionTestParseCredentialLeavesOtherKeysAlone
(t *testing.T)
pkg/jsplugin/provider_test.go:245
FunctionTestParseGeminiModelSuffixNoThinkingDisablesReasoning
(t *testing.T)
relaykit/relayconvert/reasoning/suffix_test.go:10
FunctionTestParseHTTPStatusCodeRanges_CommaSeparated
(t *testing.T)
setting/operation_setting/status_code_ranges_test.go:9
FunctionTestParseHTTPStatusCodeRanges_Invalid
(t *testing.T)
setting/operation_setting/status_code_ranges_test.go:28
FunctionTestParseHTTPStatusCodeRanges_MergeAndNormalize
(t *testing.T)
setting/operation_setting/status_code_ranges_test.go:19
FunctionTestParseHTTPStatusCodeRanges_NoComma_IsInvalid
(t *testing.T)
setting/operation_setting/status_code_ranges_test.go:33
FunctionTestParseKnownProviderModelSuffix
(t *testing.T)
relaykit/relayconvert/reasoning/suffix_test.go:22
FunctionTestParseOpenAIModelIDsStrictResponseContract
(t *testing.T)
controller/channel_upstream_update_test.go:41
FunctionTestParseOpenAIReasoningEffortPreservesCodexMax
(t *testing.T)
setting/reasoning/suffix_test.go:113
FunctionTestParsePasskeyFinishRequestDoesNotRewriteRequestBody
(t *testing.T)
controller/passkey_test.go:765
FunctionTestParseThinkingModifier
(t *testing.T)
relaykit/relayconvert/reasoning/suffix_test.go:153
FunctionTestParseVLLMMetricsPreservesSeriesAndHistogramTotals
(t *testing.T)
controller/channel_inference_test.go:112
← previousnext →12,901–13,000 of 15,409, ranked by callers