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
740fe8c2
authored
Jul 13, 2025
by
CaIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: comment out model validation in ConvertClaudeRequest method
parent
a2f7c876
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
relay/channel/openai/adaptor.go
+3
-3
No files found.
relay/channel/openai/adaptor.go
View file @
740fe8c2
...
@@ -35,9 +35,9 @@ type Adaptor struct {
...
@@ -35,9 +35,9 @@ type Adaptor struct {
}
}
func
(
a
*
Adaptor
)
ConvertClaudeRequest
(
c
*
gin
.
Context
,
info
*
relaycommon
.
RelayInfo
,
request
*
dto
.
ClaudeRequest
)
(
any
,
error
)
{
func
(
a
*
Adaptor
)
ConvertClaudeRequest
(
c
*
gin
.
Context
,
info
*
relaycommon
.
RelayInfo
,
request
*
dto
.
ClaudeRequest
)
(
any
,
error
)
{
if
!
strings
.
Contains
(
request
.
Model
,
"claude"
)
{
//
if !strings.Contains(request.Model, "claude") {
return
nil
,
fmt
.
Errorf
(
"you are using openai channel type with path /v1/messages, only claude model supported convert, but got %s"
,
request
.
Model
)
//
return nil, fmt.Errorf("you are using openai channel type with path /v1/messages, only claude model supported convert, but got %s", request.Model)
}
//
}
aiRequest
,
err
:=
service
.
ClaudeToOpenAIRequest
(
*
request
,
info
)
aiRequest
,
err
:=
service
.
ClaudeToOpenAIRequest
(
*
request
,
info
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
...
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