mirror of
https://github.com/alibaba/higress.git
synced 2026-05-27 06:07:27 +08:00
feat(ai-proxy): add consumer affinity for stateful APIs (#3499)
This commit is contained in:
@@ -605,7 +605,7 @@ func (c *ProviderConfig) SetApiTokenInUse(ctx wrapper.HttpContext) {
|
||||
if c.isFailoverEnabled() {
|
||||
apiToken = c.GetGlobalRandomToken()
|
||||
} else {
|
||||
apiToken = c.GetRandomToken()
|
||||
apiToken = c.GetOrSetTokenWithContext(ctx)
|
||||
}
|
||||
log.Debugf("Use apiToken %s to send request", apiToken)
|
||||
ctx.SetContext(c.failover.ctxApiTokenInUse, apiToken)
|
||||
|
||||
Reference in New Issue
Block a user