fix: address review findings for channel restriction refactoring

- Fix 7 stale comments still mentioning "限制检查" in handlers/services
- Make billingModelForRestriction explicitly list channel_mapped case
- Add slog.Warn for error swallowing in ResolveChannelMapping and
  needsUpstreamChannelRestrictionCheck
- Document sticky session upstream check exemption
This commit is contained in:
erio
2026-04-02 13:36:58 +08:00
parent ce41afb756
commit 1fca2bfab1
8 changed files with 24 additions and 12 deletions

View File

@@ -414,8 +414,8 @@ func (s *OpenAIGatewayService) IsModelRestricted(ctx context.Context, groupID in
return s.channelService.IsModelRestricted(ctx, groupID, model)
}
// ResolveChannelMappingAndRestrict 解析渠道映射并检查模型限制
// 返回映射结果和是否被限制
// ResolveChannelMappingAndRestrict 解析渠道映射。
// 模型限制检查已移至调度阶段restricted 始终返回 false
func (s *OpenAIGatewayService) ResolveChannelMappingAndRestrict(ctx context.Context, groupID *int64, model string) (ChannelMappingResult, bool) {
if s.channelService == nil {
return ChannelMappingResult{MappedModel: model}, false