branch: externals/minuet
commit 7a620b845fb5cf97f73e589bd58372b7ce4b7816
Author: Milan Glacier <d...@milanglacier.com>
Commit: Milan Glacier <d...@milanglacier.com>

    refactor: Use x-goog-api-key header for Gemini requests.
    
    This change updates the web request format to align with recent upstream
    change.
---
 minuet.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/minuet.el b/minuet.el
index 691c1b5cd2..fabe1fe651 100644
--- a/minuet.el
+++ b/minuet.el
@@ -1172,11 +1172,11 @@ CONTEXT is to be used to build the prompt.  CALLBACK is 
the function
 to be called when completion items arrive."
   (minuet--with-temp-response
     (push
-     (plz 'post (format "%s/%s:streamGenerateContent?alt=sse&key=%s"
+     (plz 'post (format "%s/%s:streamGenerateContent?alt=sse"
                         (plist-get minuet-gemini-options :end-point)
-                        (plist-get minuet-gemini-options :model)
-                        (minuet--get-api-key (plist-get minuet-gemini-options 
:api-key)))
+                        (plist-get minuet-gemini-options :model))
        :headers `(("Content-Type" . "application/json")
+                  ("x-goog-api-key" . ,(minuet--get-api-key (plist-get 
minuet-gemini-options :api-key)))
                   ("Accept" . "application/json"))
        :timeout minuet-request-timeout
        :body

Reply via email to