Fix composite route lint issues

This commit is contained in:
Heatherm Huang
2026-07-23 09:20:18 +08:00
parent a008b63c16
commit ff666be530
2 changed files with 4 additions and 11 deletions
@@ -177,16 +177,6 @@ func (s *GatewayService) resolveCompositeRouteDecision(ctx context.Context, grou
return decision, decision.Matched, nil
}
func resolveCompositeTargetPlatform(ctx context.Context, group *Group, requestedModel string) (string, bool) {
if platform, ok := ResolvedTargetPlatformFromContext(ctx); ok {
return platform, true
}
if group == nil || group.Platform != PlatformComposite {
return "", false
}
return DetectModelPlatform(requestedModel)
}
func isConcreteRequestPlatform(platform string) bool {
switch platform {
case PlatformAnthropic, PlatformOpenAI, PlatformGemini, PlatformAntigravity, PlatformGrok:
@@ -42,10 +42,13 @@ func (s *GatewayService) SelectAccountForModelWithExclusions(ctx context.Context
if err != nil {
return nil, err
}
if group == nil {
return nil, ErrGroupNotFound
}
groupID = resolvedGroupID
ctx = s.withGroupContext(ctx, group)
platform = group.Platform
if group != nil && group.Platform == PlatformComposite {
if group.Platform == PlatformComposite {
decision, ok, err := s.resolveCompositeRouteDecision(ctx, group, requestedModel, CompositeRouteEndpointAny)
if err != nil {
return nil, err