Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
8d4d3b03
Commit
8d4d3b03
authored
Mar 12, 2026
by
ius
Browse files
fix: remove unused gateway usage helpers
parent
addefe79
Changes
1
Show whitespace changes
Inline
Side-by-side
backend/internal/service/gateway_service.go
View file @
8d4d3b03
...
@@ -107,22 +107,6 @@ func GatewayModelsListCacheStats() (cacheHit, cacheMiss, store int64) {
...
@@ -107,22 +107,6 @@ func GatewayModelsListCacheStats() (cacheHit, cacheMiss, store int64) {
return
modelsListCacheHitTotal
.
Load
(),
modelsListCacheMissTotal
.
Load
(),
modelsListCacheStoreTotal
.
Load
()
return
modelsListCacheHitTotal
.
Load
(),
modelsListCacheMissTotal
.
Load
(),
modelsListCacheStoreTotal
.
Load
()
}
}
func
claudeUsageHasAnyTokens
(
usage
*
ClaudeUsage
)
bool
{
return
usage
!=
nil
&&
(
usage
.
InputTokens
>
0
||
usage
.
OutputTokens
>
0
||
usage
.
CacheCreationInputTokens
>
0
||
usage
.
CacheReadInputTokens
>
0
||
usage
.
CacheCreation5mTokens
>
0
||
usage
.
CacheCreation1hTokens
>
0
)
}
func
openAIUsageHasAnyTokens
(
usage
*
OpenAIUsage
)
bool
{
return
usage
!=
nil
&&
(
usage
.
InputTokens
>
0
||
usage
.
OutputTokens
>
0
||
usage
.
CacheCreationInputTokens
>
0
||
usage
.
CacheReadInputTokens
>
0
)
}
func
openAIStreamEventIsTerminal
(
data
string
)
bool
{
func
openAIStreamEventIsTerminal
(
data
string
)
bool
{
trimmed
:=
strings
.
TrimSpace
(
data
)
trimmed
:=
strings
.
TrimSpace
(
data
)
if
trimmed
==
""
{
if
trimmed
==
""
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment