about summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac2026-04-13 18:35:52 +0100
committerArun Isaac2026-04-13 18:35:52 +0100
commite1304cb5f943aebf796aa52fcb256b2efe0f47b1 (patch)
treeb11f0b276c4be147d0f03f0bf52d77e64222d502
parentbd4b7bdf0d8b5c34497a9d67986d405bbd675f75 (diff)
downloadkaagum-e1304cb5f943aebf796aa52fcb256b2efe0f47b1.tar.gz
kaagum-e1304cb5f943aebf796aa52fcb256b2efe0f47b1.tar.lz
kaagum-e1304cb5f943aebf796aa52fcb256b2efe0f47b1.zip
Recognize that OpenRouter and OpenAI have different URI path prefixes.
-rwxr-xr-xbin/kaagum4
-rw-r--r--kaagum/openai.scm2
2 files changed, 3 insertions, 3 deletions
diff --git a/bin/kaagum b/bin/kaagum
index 8e2a189..b8ee084 100755
--- a/bin/kaagum
+++ b/bin/kaagum
@@ -61,7 +61,7 @@ to invoke kaagum."
 Run kaagum AI agent.
 
   --api-base-uri=URI             base API URI of LLM provider
-                                 (default: \"https://openrouter.ai\")
+                                 (default: \"https://openrouter.ai/api\")
   --api-key-command=COMMAND      command to run to get API key
   --model=MODEL                  LLM model name to start new sessions with
                                  (default: \"anthropic/claude-opus-4.6\")
@@ -93,7 +93,7 @@ Run kaagum AI agent.
                             invalid-option
                             invalid-argument
                             '((model . "anthropic/claude-opus-4.6")
-                              (api-base-uri . "https://openrouter.ai")))))
+                              (api-base-uri . "https://openrouter.ai/api")))))
        (when (assq-ref args 'help)
          (print-usage program)
          (exit #t))
diff --git a/kaagum/openai.scm b/kaagum/openai.scm
index 64bda72..937a1de 100644
--- a/kaagum/openai.scm
+++ b/kaagum/openai.scm
@@ -71,7 +71,7 @@ and need not be specified in @var{headers}. Return JSON response."
 is the API key for authentication. @var{model} is a supported LLM model.
 @var{messages} and @var{tools} are respectively lists of JSON messages and tools
 compatible with the OpenAI API specification."
-  (json-post (uri-join base-uri "/api/v1/chat/completions")
+  (json-post (uri-join base-uri "/v1/chat/completions")
              #:headers `((authorization
                           . ,(string-append "Bearer " api-key)))
              #:json `(("model" . ,model)