Skip to content

Commit ecbc11e

Browse files
committed
more
1 parent a6fcf61 commit ecbc11e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/semantic-router/pkg/extproc/request_handler.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,8 @@ func (r *OpenAIRouter) handleModelRouting(openAIRequest *openai.ChatCompletionNe
941941
}
942942

943943
// Check if route cache should be cleared (only for auto models, non-auto models handle this in their own path)
944-
if originalModel == "auto" && r.shouldClearRouteCache() {
944+
// isAutoModel already determined at the beginning of this function using IsAutoModelName
945+
if isAutoModel && r.shouldClearRouteCache() {
945946
// Access the CommonResponse that's already created in this function
946947
if response.GetRequestBody() != nil && response.GetRequestBody().GetResponse() != nil {
947948
response.GetRequestBody().GetResponse().ClearRouteCache = true

0 commit comments

Comments
 (0)