Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0a78d103
authored
Jun 20, 2025
by
Calcium-Ion
Committed by
GitHub
Jun 20, 2025
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1271 from RedwindA/feat/vertex-budgetControl
feat: vertex budget control in model name
parents
c74a86d1
4f84fd6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
relay/channel/vertex/adaptor.go
+6
-3
No files found.
relay/channel/vertex/adaptor.go
View file @
0a78d103
...
@@ -83,10 +83,13 @@ func (a *Adaptor) GetRequestURL(info *relaycommon.RelayInfo) (string, error) {
...
@@ -83,10 +83,13 @@ func (a *Adaptor) GetRequestURL(info *relaycommon.RelayInfo) (string, error) {
suffix
:=
""
suffix
:=
""
if
a
.
RequestMode
==
RequestModeGemini
{
if
a
.
RequestMode
==
RequestModeGemini
{
if
model_setting
.
GetGeminiSettings
()
.
ThinkingAdapterEnabled
{
if
model_setting
.
GetGeminiSettings
()
.
ThinkingAdapterEnabled
{
// suffix -thinking and -nothinking
// 新增逻辑:处理 -thinking-<budget> 格式
if
strings
.
HasSuffix
(
info
.
OriginModelName
,
"-thinking"
)
{
if
strings
.
Contains
(
info
.
UpstreamModelName
,
"-thinking-"
)
{
parts
:=
strings
.
Split
(
info
.
UpstreamModelName
,
"-thinking-"
)
info
.
UpstreamModelName
=
parts
[
0
]
}
else
if
strings
.
HasSuffix
(
info
.
UpstreamModelName
,
"-thinking"
)
{
// 旧的适配
info
.
UpstreamModelName
=
strings
.
TrimSuffix
(
info
.
UpstreamModelName
,
"-thinking"
)
info
.
UpstreamModelName
=
strings
.
TrimSuffix
(
info
.
UpstreamModelName
,
"-thinking"
)
}
else
if
strings
.
HasSuffix
(
info
.
Origin
ModelName
,
"-nothinking"
)
{
}
else
if
strings
.
HasSuffix
(
info
.
Upstream
ModelName
,
"-nothinking"
)
{
info
.
UpstreamModelName
=
strings
.
TrimSuffix
(
info
.
UpstreamModelName
,
"-nothinking"
)
info
.
UpstreamModelName
=
strings
.
TrimSuffix
(
info
.
UpstreamModelName
,
"-nothinking"
)
}
}
}
}
...
...
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