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
b33b3c4f
authored
Jun 19, 2025
by
Calcium-Ion
Committed by
GitHub
Jun 19, 2025
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1253 from TopickAI/main
Fix Vertex channel global region format for claude models
parents
423796e7
302ca0b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
relay/channel/vertex/adaptor.go
+17
-8
No files found.
relay/channel/vertex/adaptor.go
View file @
b33b3c4f
...
@@ -123,14 +123,23 @@ func (a *Adaptor) GetRequestURL(info *relaycommon.RelayInfo) (string, error) {
...
@@ -123,14 +123,23 @@ func (a *Adaptor) GetRequestURL(info *relaycommon.RelayInfo) (string, error) {
if
v
,
ok
:=
claudeModelMap
[
info
.
UpstreamModelName
];
ok
{
if
v
,
ok
:=
claudeModelMap
[
info
.
UpstreamModelName
];
ok
{
model
=
v
model
=
v
}
}
return
fmt
.
Sprintf
(
if
region
==
"global"
{
"https://%s-aiplatform.googleapis.com/v1/projects/%s/locations/%s/publishers/anthropic/models/%s:%s"
,
return
fmt
.
Sprintf
(
region
,
"https://aiplatform.googleapis.com/v1/projects/%s/locations/global/publishers/anthropic/models/%s:%s"
,
adc
.
ProjectID
,
adc
.
ProjectID
,
region
,
model
,
model
,
suffix
,
suffix
,
),
nil
),
nil
}
else
{
return
fmt
.
Sprintf
(
"https://%s-aiplatform.googleapis.com/v1/projects/%s/locations/%s/publishers/anthropic/models/%s:%s"
,
region
,
adc
.
ProjectID
,
region
,
model
,
suffix
,
),
nil
}
}
else
if
a
.
RequestMode
==
RequestModeLlama
{
}
else
if
a
.
RequestMode
==
RequestModeLlama
{
return
fmt
.
Sprintf
(
return
fmt
.
Sprintf
(
"https://%s-aiplatform.googleapis.com/v1beta1/projects/%s/locations/%s/endpoints/openapi/chat/completions"
,
"https://%s-aiplatform.googleapis.com/v1beta1/projects/%s/locations/%s/endpoints/openapi/chat/completions"
,
...
...
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