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
dfe3fdc1
Commit
dfe3fdc1
authored
Mar 31, 2026
by
erio
Browse files
fix(channel): 模型限制以原始请求模型检查定价列表,而非映射后模型
开启 restrict_models 时,应用原始模型名查定价列表; 定价列表未命中即拒绝,不因通配符映射而绕过限制。
parent
705131e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
backend/internal/service/channel_service.go
View file @
dfe3fdc1
...
...
@@ -429,8 +429,9 @@ func (s *ChannelService) ResolveChannelMappingAndRestrict(ctx context.Context, g
if
groupID
==
nil
{
return
mapping
,
false
}
// 先用原始模型检查定价列表限制,再做映射
restricted
:=
s
.
IsModelRestricted
(
ctx
,
*
groupID
,
model
)
mapping
=
s
.
ResolveChannelMapping
(
ctx
,
*
groupID
,
model
)
restricted
:=
s
.
IsModelRestricted
(
ctx
,
*
groupID
,
mapping
.
MappedModel
)
return
mapping
,
restricted
}
...
...
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