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
b16eb881
authored
Feb 27, 2026
by
Seefs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: support vertex multi-key task fetch in content proxy
parent
7d382fff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
2 deletions
+27
-2
controller/video_proxy_gemini.go
+25
-1
model/task.go
+2
-1
No files found.
controller/video_proxy_gemini.go
View file @
b16eb881
...
@@ -166,7 +166,12 @@ func getVertexVideoURL(channel *model.Channel, task *model.Task) (string, error)
...
@@ -166,7 +166,12 @@ func getVertexVideoURL(channel *model.Channel, task *model.Task) (string, error)
return
""
,
fmt
.
Errorf
(
"vertex task adaptor not found"
)
return
""
,
fmt
.
Errorf
(
"vertex task adaptor not found"
)
}
}
resp
,
err
:=
adaptor
.
FetchTask
(
baseURL
,
channel
.
Key
,
map
[
string
]
any
{
key
:=
getVertexTaskKey
(
channel
,
task
)
if
key
==
""
{
return
""
,
fmt
.
Errorf
(
"vertex key not available for task"
)
}
resp
,
err
:=
adaptor
.
FetchTask
(
baseURL
,
key
,
map
[
string
]
any
{
"task_id"
:
task
.
GetUpstreamTaskID
(),
"task_id"
:
task
.
GetUpstreamTaskID
(),
"action"
:
task
.
Action
,
"action"
:
task
.
Action
,
},
channel
.
GetSetting
()
.
Proxy
)
},
channel
.
GetSetting
()
.
Proxy
)
...
@@ -193,6 +198,25 @@ func getVertexVideoURL(channel *model.Channel, task *model.Task) (string, error)
...
@@ -193,6 +198,25 @@ func getVertexVideoURL(channel *model.Channel, task *model.Task) (string, error)
return
""
,
fmt
.
Errorf
(
"vertex video url not found"
)
return
""
,
fmt
.
Errorf
(
"vertex video url not found"
)
}
}
func
getVertexTaskKey
(
channel
*
model
.
Channel
,
task
*
model
.
Task
)
string
{
if
task
!=
nil
{
if
key
:=
strings
.
TrimSpace
(
task
.
PrivateData
.
Key
);
key
!=
""
{
return
key
}
}
if
channel
==
nil
{
return
""
}
keys
:=
channel
.
GetKeys
()
for
_
,
key
:=
range
keys
{
key
=
strings
.
TrimSpace
(
key
)
if
key
!=
""
{
return
key
}
}
return
strings
.
TrimSpace
(
channel
.
Key
)
}
func
extractVertexVideoURLFromTaskData
(
task
*
model
.
Task
)
string
{
func
extractVertexVideoURLFromTaskData
(
task
*
model
.
Task
)
string
{
if
task
==
nil
||
len
(
task
.
Data
)
==
0
{
if
task
==
nil
||
len
(
task
.
Data
)
==
0
{
return
""
return
""
...
...
model/task.go
View file @
b16eb881
...
@@ -173,7 +173,8 @@ func InitTask(platform constant.TaskPlatform, relayInfo *commonRelay.RelayInfo)
...
@@ -173,7 +173,8 @@ func InitTask(platform constant.TaskPlatform, relayInfo *commonRelay.RelayInfo)
properties
:=
Properties
{}
properties
:=
Properties
{}
privateData
:=
TaskPrivateData
{}
privateData
:=
TaskPrivateData
{}
if
relayInfo
!=
nil
&&
relayInfo
.
ChannelMeta
!=
nil
{
if
relayInfo
!=
nil
&&
relayInfo
.
ChannelMeta
!=
nil
{
if
relayInfo
.
ChannelMeta
.
ChannelType
==
constant
.
ChannelTypeGemini
{
if
relayInfo
.
ChannelMeta
.
ChannelType
==
constant
.
ChannelTypeGemini
||
relayInfo
.
ChannelMeta
.
ChannelType
==
constant
.
ChannelTypeVertexAi
{
privateData
.
Key
=
relayInfo
.
ChannelMeta
.
ApiKey
privateData
.
Key
=
relayInfo
.
ChannelMeta
.
ApiKey
}
}
if
relayInfo
.
UpstreamModelName
!=
""
{
if
relayInfo
.
UpstreamModelName
!=
""
{
...
...
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