Skip to content

Commit f0ba6d2

Browse files
committed
Simplify AI query parameter encoding
1 parent 8b25996 commit f0ba6d2

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

pkg/testing/remote/grpc_store.go

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -485,18 +485,9 @@ func (g *gRPCLoader) handleAIQuery(query map[string]string) (testing.DataResult,
485485
return g.convertAIResponse(dataResult), nil
486486
}
487487

488-
// encodeAIGenerateParams filters and encodes AI generation parameters into JSON string.
489-
// This function intentionally creates a new map to exclude the "method" field from the query,
490-
// as "method" is used for routing decisions and should not be forwarded to AI plugins.
491-
// Only the actual AI parameters (model, prompt, config) are encoded and sent via the SQL field.
488+
// encodeAIGenerateParams encodes the original query parameters into JSON.
492489
func (g *gRPCLoader) encodeAIGenerateParams(query map[string]string) string {
493-
// Extract only AI-specific parameters, excluding the routing field "method"
494-
params := map[string]string{
495-
"model": query["model"],
496-
"prompt": query["prompt"],
497-
"config": query["config"],
498-
}
499-
data, _ := json.Marshal(params)
490+
data, _ := json.Marshal(query)
500491
return string(data)
501492
}
502493

0 commit comments

Comments
 (0)