Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions plugins/governance/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,13 @@ func (p *GovernancePlugin) EvaluateGovernanceRequest(ctx *schemas.BifrostContext
// Handle decision
switch result.Decision {
case DecisionAllow:
// Clear any prior rejection flag (e.g. from a failed primary attempt
// before a fallback retry). Without this, PostLLMHook would see the
// stale flag and skip budget/rate-limit ID collection for the
// successful fallback attempt.
if ctx != nil {
ctx.ClearValue(governanceRejectedContextKey)
}
return result, nil
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Comment thread
danpiths marked this conversation as resolved.

case DecisionVirtualKeyNotFound, DecisionVirtualKeyBlocked, DecisionModelBlocked, DecisionProviderBlocked:
Expand Down
Loading