@@ -490,17 +490,30 @@ public CompletableFuture<AuditSearchResponse> getAuditLogsByTenantAsync(String t
490490 // ========================================================================
491491
492492 /**
493- * Executes a query through AxonFlow (Proxy Mode).
493+ * Sends a query through AxonFlow with full policy enforcement (Proxy Mode).
494+ *
495+ * <p>This is Proxy Mode - AxonFlow acts as an intermediary, making the LLM call on your behalf.
494496 *
495- * <p>In Proxy Mode, AxonFlow handles both policy enforcement and LLM routing.
496- * This is the simplest integration pattern but adds latency.
497+ * <p>Use this when you want AxonFlow to:
498+ * <ul>
499+ * <li>Evaluate policies before the LLM call</li>
500+ * <li>Make the LLM call to the configured provider</li>
501+ * <li>Filter/redact sensitive data from responses</li>
502+ * <li>Automatically track costs and audit the interaction</li>
503+ * </ul>
504+ *
505+ * <p>For Gateway Mode (lower latency, you make the LLM call), use:
506+ * <ul>
507+ * <li>{@link #getPolicyApprovedContext} before your LLM call</li>
508+ * <li>{@link #auditLLMCall} after your LLM call</li>
509+ * </ul>
497510 *
498511 * @param request the client request
499512 * @return the response from AxonFlow
500513 * @throws PolicyViolationException if the request is blocked by policy
501514 * @throws AuthenticationException if authentication fails
502515 */
503- public ClientResponse executeQuery (ClientRequest request ) {
516+ public ClientResponse proxyLLMCall (ClientRequest request ) {
504517 Objects .requireNonNull (request , "request cannot be null" );
505518
506519 // Check cache first
@@ -528,7 +541,7 @@ public ClientResponse executeQuery(ClientRequest request) {
528541
529542 return result ;
530543 }
531- }, "executeQuery " );
544+ }, "proxyLLMCall " );
532545
533546 // Cache successful responses
534547 if (response .isSuccess () && !response .isBlocked ()) {
@@ -539,14 +552,42 @@ public ClientResponse executeQuery(ClientRequest request) {
539552 });
540553 }
541554
555+ /**
556+ * Asynchronously sends a query through AxonFlow with full policy enforcement (Proxy Mode).
557+ *
558+ * @param request the client request
559+ * @return a future containing the response
560+ * @see #proxyLLMCall(ClientRequest)
561+ */
562+ public CompletableFuture <ClientResponse > proxyLLMCallAsync (ClientRequest request ) {
563+ return CompletableFuture .supplyAsync (() -> proxyLLMCall (request ), asyncExecutor );
564+ }
565+
566+ /**
567+ * Executes a query through AxonFlow (Proxy Mode).
568+ *
569+ * @param request the client request
570+ * @return the response from AxonFlow
571+ * @deprecated Use {@link #proxyLLMCall(ClientRequest)} instead. This method will be removed in v3.0.0.
572+ */
573+ @ Deprecated
574+ public ClientResponse executeQuery (ClientRequest request ) {
575+ if (config .isDebug ()) {
576+ logger .warn ("DEPRECATION WARNING: executeQuery() is deprecated. Use proxyLLMCall() instead. This method will be removed in v3.0.0." );
577+ }
578+ return proxyLLMCall (request );
579+ }
580+
542581 /**
543582 * Asynchronously executes a query through AxonFlow.
544583 *
545584 * @param request the client request
546585 * @return a future containing the response
586+ * @deprecated Use {@link #proxyLLMCallAsync(ClientRequest)} instead. This method will be removed in v3.0.0.
547587 */
588+ @ Deprecated
548589 public CompletableFuture <ClientResponse > executeQueryAsync (ClientRequest request ) {
549- return CompletableFuture . supplyAsync (() -> executeQuery ( request ), asyncExecutor );
590+ return proxyLLMCallAsync ( request );
550591 }
551592
552593 // ========================================================================
0 commit comments