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
TestIsClickHouseDSN
(t *testing.T)
model/clickhouse_log_test.go:14
Function
TestIsOpenAIGPT5Model
(t *testing.T)
relaykit/dto/openai_request_zero_value_test.go:217
Function
TestIsQwenThinkingBudgetModel
(t *testing.T)
relaykit/dto/openai_request_zero_value_test.go:99
Function
TestIsResponsesEventStreamContentType
(t *testing.T)
relay/chat_completions_via_responses_test.go:78
Function
TestJSONBodyAsTheGatewayParsesIt
(t *testing.T)
relay/requestplugin/requestplugin_test.go:1890
Function
TestJSONColumnDatabaseRoundTrip
(t *testing.T)
model/json_column_test.go:104
Function
TestJSONColumnScannersAcceptStringAndBytes
保护契约:json 列的 Scan 必须同时接受 []byte 与 string——不同驱动/协议 模式返回类型不同,静默丢弃 string 会把已有数据清零。
model/json_column_test.go:78
Function
TestJSONColumnValuersReturnString
保护契约:PostgreSQL 走 simple protocol(PrepareStmt 关闭)时,driver.Valuer 返回 []byte 会被 pgx 按 bytea 十六进制字面量编码,写入 json 列触发 SQLSTATE 22P02。所有 json 列的 Value() 必须返回
model/json_column_test.go:22
Function
TestJSONColumnValuersZeroValueIsNil
空值仍返回 nil,保持列的 NULL 语义。
model/json_column_test.go:62
Function
TestJSONHelpersRouteThroughInjectedCodec
(t *testing.T)
relaykit/relayconvert/kitutil/json_test.go:39
Function
TestJSONModelRoutingUsesReadersForDiskBodies
(t *testing.T)
middleware/distributor_test.go:33
Function
TestJSONPatchNeedsJSONBody
(t *testing.T)
pkg/requestpatch/patch_test.go:215
Function
TestJSONStateChangesAndEncodedLimits
(t *testing.T)
pkg/jsplugin/engine_test.go:368
Function
TestJSONStateUTF8Normalization
(t *testing.T)
pkg/jsplugin/engine_test.go:463
Function
TestJimengBearerAPIDecoders
Jimeng's Bearer API takes the bodies of the signed actions: submit_task_v2 creates a task, get_result_v2 reads one by req_key and task_id.
plugins/jimeng_responses_test.go:97
Function
TestJimengNativeBodiesAndReplies
The Bearer API sends Jimeng's own body as is and answers with Jimeng's own replies: no shorthands, no gateway fields, Jimeng's statuses.
plugins/jimeng_responses_test.go:131
Function
TestJimengParseTaskResultUnknownStatus
(t *testing.T)
plugins/jimeng_responses_test.go:79
Function
TestJimengResponsesProtocol
(t *testing.T)
plugins/jimeng_responses_test.go:13
Function
TestJimengSubmitStateDrivesQueryReqKey
(t *testing.T)
plugins/jimeng_responses_test.go:46
Function
TestJsonRawMessageToString
(t *testing.T)
common/json_test.go:18
Function
TestKeywordsField
A keywords field reads as its count and longest length in hooks and in validateConfig; utils.keywords matches it in Go, in either letter case.
pkg/jsplugin/keywords_test.go:42
Function
TestKeywordsSearchStopsAtTheLimit
A search stops once it has found the limit of keywords: the text after them is not searched, however often the keywords repeat in it. A keyword across
pkg/jsplugin/keywords_test.go:129
Function
TestKeywordsTenThousandOnALargePrompt
10,000 keywords and a 20 KiB prompt: the matcher is built once, on the first match, and every later call reuses the parsed list by address; a reloaded
pkg/jsplugin/keywords_test.go:71
Function
TestKeywordsUnusedBuildNothing
A hook that never matches costs no matcher, and a plugin without a keywords field reads its config as it is.
pkg/jsplugin/keywords_test.go:147
Function
TestKling4
(t *testing.T)
plugins/kling_responses_test.go:245
Function
TestKlingNativeRouteSubmitPollSettleAndQuery
(t *testing.T)
controller/plugin_native_e2e_test.go:89
Function
TestKlingResponsesProtocol
(t *testing.T)
plugins/kling_responses_test.go:20
Function
TestLanguageFromUserSetting
The web console saves its own language codes (zhCN, zhTW, fr, ...) in the user setting; backend messages must follow them, and languages without a bac
i18n/i18n_test.go:26
Function
TestLegacyAccessTokenRetireAtIsWrittenOnceAndReadOnly
(t *testing.T)
model/user_update_test.go:433
Function
TestLegacyConsoleListMigrationCapsAPIInfoAndFAQ
(t *testing.T)
model/frontend_option_migration_test.go:75
Function
TestLegacyDalleValidationAndPricesRemainCompatible
(t *testing.T)
relay/helper/openai_image_request_test.go:24
Function
TestLegacyLogOtherVisibilityIsRoleSeparated
(t *testing.T)
model/log_format_test.go:88
Function
TestLegacyRejectReasonDoesNotOverrideScopedValue
(t *testing.T)
model/log_format_test.go:170
Function
TestLegacyRejectReasonHandlesNullAdminInfo
(t *testing.T)
model/log_format_test.go:189
Function
TestLegacyScopedPoliciesDoNotExpandPermissions
(t *testing.T)
service/authz/authz_test.go:80
Function
TestLegacyVideoArtifactContentUsesGetResultURL
(t *testing.T)
controller/task_generic_test.go:317
Function
TestLen_BoundaryExact
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:1100
Function
TestLen_BoundaryPlusOne
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:1111
Function
TestLen_LongContextTier
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:1084
Function
TestLen_StandardTier
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:1069
Function
TestLen_ZeroDefaultsToZero
(t *testing.T)
pkg/billingexpr/billingexpr_test.go:1122
Function
TestListActiveUserSessionsKeepsCurrentAndBoundsOtherSessions
(t *testing.T)
model/user_session_test.go:427
Function
TestListModelsIncludesTieredBillingModel
(t *testing.T)
controller/model_list_test.go:268
Function
TestListModelsSupportsOpenAIAndGeminiAuthentication
(t *testing.T)
router/relay_router_test.go:21
Function
TestListModelsTokenLimitIncludesTieredBillingModel
(t *testing.T)
controller/model_list_test.go:395
Function
TestListModelsTokenLimitUsesResolvedCustomAutoGroups
(t *testing.T)
controller/model_list_test.go:434
Function
TestListModelsUsesAdvancedCustomEndpointTypesFromPricingCache
(t *testing.T)
controller/model_list_test.go:324
Function
TestListTaskPluginsIncludesFactoryWithoutDatabaseRows
(t *testing.T)
controller/task_plugin_test.go:406
Function
TestLoadTaskArtifactAccessLimitsFallsBackForInvalidValues
(t *testing.T)
setting/system_setting/task_artifact_test.go:22
Function
TestLoadTaskArtifactAccessLimitsUsesPositiveEnvironmentValues
(t *testing.T)
setting/system_setting/task_artifact_test.go:9
Function
TestLoadTaskArtifactStoreConfigFallsBackToUpstream
(t *testing.T)
setting/system_setting/task_artifact_store_test.go:57
Function
TestLoadToolPricesFromJSONStringReplacesMapAndKeepsValidSiblings
(t *testing.T)
setting/operation_setting/tools_price_test.go:140
Function
TestLocalesRenderEveryKey
A key missing from a locale, or a template that does not parse, reaches clients as the raw key.
i18n/i18n_test.go:118
Function
TestLocalizedTextContract
(t *testing.T)
pkg/jsplugin/registry_test.go:643
Function
TestLocalizedTextFallbackIsDeterministic
(t *testing.T)
pkg/jsplugin/provider_test.go:1223
Function
TestLockForUpdateEmitsRowLock
lockForUpdate must emit FOR UPDATE on databases that support it and skip it on SQLite, where the syntax does not exist. The dummy dialector is used b
model/locking_test.go:18
Function
TestLogExportDatabaseMatrix
(t *testing.T)
controller/log_export_test.go:84
Function
TestLogExportRules
(t *testing.T)
controller/log_export_test.go:153
Function
TestLogFormattingPreservesLargeIntegerLexemes
(t *testing.T)
model/log_format_test.go:202
Function
TestLogOtherJSONStringDoesNotMutateReceiver
(t *testing.T)
model/log_other_test.go:72
Function
TestLogOtherRejectsSensitivePublicFields
(t *testing.T)
model/log_other_test.go:48
Function
TestLogOtherScopesAndMerges
(t *testing.T)
model/log_other_test.go:10
Function
TestLogQuotaDataSplitsRowsByUseGroupTokenChannelAndNode
(t *testing.T)
model/usedata_flow_test.go:135
Function
TestLogTaskConsumptionIncludesTieredSnapshotUsageFacts
(t *testing.T)
service/task_billing_test.go:305
Function
TestLogTaskConsumptionMarksInlineResultsAndDiscardedArtifacts
Task logs distinguish jobs the client polls from requests whose HTTP call returned the deliverable itself, and flag results the gateway did not keep.
service/task_billing_test.go:397
Function
TestLogTaskConsumptionWithoutSnapshotKeepsRatioMode
(t *testing.T)
service/task_billing_test.go:353
Function
TestLoginContextAndInput
(t *testing.T)
pkg/jsplugin/provider_test.go:274
Function
TestLoginSessionCreateRefreshAndRevoke
(t *testing.T)
service/auth_session_test.go:340
Function
TestLoginStepsDecode
(t *testing.T)
pkg/jsplugin/provider_test.go:290
Function
TestLoginStepsRejected
(t *testing.T)
pkg/jsplugin/provider_test.go:323
Function
TestLookupBuiltinResponseConverters
(t *testing.T)
relaykit/relayconvert/response_registry_test.go:14
Function
TestLookupBuiltinTextConverters
(t *testing.T)
relaykit/relayconvert/text_converter_registry_test.go:11
Function
TestLookupHostProtocolOperationExcludesRetrieveWithoutModelField
(t *testing.T)
pkg/jsplugin/routing_test.go:93
Function
TestMain
(m *testing.M)
service/task_billing_test.go:30
Function
TestMain
(m *testing.M)
model/task_cas_test.go:19
Function
TestMain
TestMain installs a deterministic media resolver so image-bearing fixtures convert without network access.
relaykit/relayconvert/golden_test.go:29
Function
TestManageUserDeleteReturnsImmediatelyAndUnknownActionFails
(t *testing.T)
controller/user_manage_test.go:204
Function
TestManageUserDemoteAdvancesAuthVersionAndRevokesSessionsOnce
(t *testing.T)
controller/user_manage_test.go:157
Function
TestManageUserDisableAdvancesAuthVersionOnceAndRevokesSession
(t *testing.T)
controller/user_manage_test.go:129
Function
TestManageUserQuotaCacheUsesCommittedIntegerDifference
(t *testing.T)
controller/user_manage_test.go:576
Function
TestManageUserQuotaConcurrentSnapshots
(t *testing.T)
controller/user_manage_test.go:524
Function
TestManageUserQuotaFailuresDoNotRecordTopup
(t *testing.T)
controller/user_manage_test.go:318
Function
TestManageUserQuotaLogFailureKeepsSuccessfulAdjustment
(t *testing.T)
controller/user_manage_test.go:371
Function
TestManageUserQuotaMiddlewareKeepsOneOperationPerRequest
(t *testing.T)
controller/user_manage_test.go:468
Function
TestManageUserQuotaRecordsTopupAndAudit
(t *testing.T)
controller/user_manage_test.go:241
Function
TestManageUserQuotaTargetsAndWalletBounds
(t *testing.T)
controller/user_manage_test.go:401
Function
TestMantleCanceledRequestSkipsRetry
(t *testing.T)
relay/channel/aws/relay_aws_test.go:998
Function
TestMantleDoesNotFollowRedirectsOrFallbackOnAuthFailure
(t *testing.T)
relay/channel/aws/relay_aws_test.go:759
Function
TestMantleEndpointAndCredentialValidation
(t *testing.T)
relay/channel/aws/relay_aws_test.go:663
Function
TestMantleHTTPResponsesPreserveCacheUsage
(t *testing.T)
relay/channel/aws/relay_aws_test.go:696
Function
TestMantleRejectsInvalidRequestsAndPreservesExplicitModelIDs
(t *testing.T)
relay/channel/aws/relay_aws_test.go:821
Function
TestMantleRequestPreservesNativeFieldsAndSignsFinalPayload
(t *testing.T)
relay/channel/aws/relay_aws_test.go:601
Function
TestMantleSignatureMatchesWireHeaders
(t *testing.T)
relay/channel/aws/relay_aws_test.go:860
Function
TestMaskSensitiveInfoMasksOnlyTheUpstreamAddress
(t *testing.T)
relaykit/relayconvert/kitutil/mask_test.go:9
Function
TestMasterFinishesSyncTasksEveryOnlineNodeApplied
The master marks a topic's sync tasks done once every online node that keeps the topic has applied them. The newest waiting task shows how many have,
service/node_sync_test.go:219
Function
TestMasterSwitchEmptiesOptionsAndKeepsList
(t *testing.T)
controller/task_plugin_test.go:433
Function
TestMasterSwitchKeepsRequestProcessingPlugins
The master switch covers task and provider plugin channels only: with it off, a plugin's request processing part is still offered and its instances ar
controller/task_plugin_test.go:451
Function
TestMasterSwitchOffKeepsRequestProcessing
The plugin master switch covers task and provider plugin channels only: with it off, an enabled instance still processes relay requests.
relay/requestplugin/requestplugin_test.go:1960
Function
TestMathHelpers
--------------------------------------------------------------------------- Math helper functions ----------------------------------------------------
pkg/billingexpr/billingexpr_test.go:226
Function
TestMaxTokensBounds
TestMaxTokensBounds guards the billing invariant that user-supplied max token fields are bounded on every relay format. These values feed pre-consume
relay/helper/max_tokens_bounds_test.go:19
← previous
next →
12,701–12,800 of 15,409, ranked by callers