From ee8bb42afa638e263b91b45493ae52c94d781a26 Mon Sep 17 00:00:00 2001 From: alfadb Date: Tue, 29 Sep 2026 21:33:01 +0800 Subject: [PATCH] fix(scheduler): restore account_model ownership veto in shared eligibility gate --- backend/internal/service/openai_gateway_scheduling.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/internal/service/openai_gateway_scheduling.go b/backend/internal/service/openai_gateway_scheduling.go index 03c528a78c..d7efe32fdc 100644 --- a/backend/internal/service/openai_gateway_scheduling.go +++ b/backend/internal/service/openai_gateway_scheduling.go @@ -457,6 +457,11 @@ func openAICompatibleAccountEligibilityFailureReasonBeforeProfit(ctx context.Con if account == nil { return "account_nil" } + if source, ok := CompositeRouteSourceFromContext(ctx); ok && source == CompositeRouteSourceAccount { + if publicModel, modelOK := RequestedPublicModelFromContext(ctx); modelOK && !CompositeAccountClaimsModel(account, publicModel) { + return "account_model_not_owned" + } + } if !account.IsOpenAICompatible() || !openAISchedulingPlatformMatchesAccount(ctx, account, platform) { return "platform_mismatch" }