Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Response When Using gptel-make-tool with Zero Arguments #688

Open
norisuke3 opened this issue Mar 8, 2025 · 3 comments
Open

No Response When Using gptel-make-tool with Zero Arguments #688

norisuke3 opened this issue Mar 8, 2025 · 3 comments
Labels
question Further information is requested

Comments

@norisuke3
Copy link

Description

I'm trying to create a simple tool with gptel-make-tool that takes no arguments, but I'm not getting any response when attempting to use it. When I try a similar tool that takes arguments, it works fine.

Environment

  • gptel package-version: 20250306.310
  • Provider: OpenRouter
  • Model: anthropic/claude-3.7-sonnet

Reproduction Steps

  1. Created a tool with arguments that works fine:
(gptel-make-tool
 :name "greeting_with_a_name"
 :function (lambda (name) (concat name " Hello World!"))
 :description "A simple tool that returns a greeting message."
 :args (list '(:name "name"
               :type string
               :description "the name of the person to which the greeting is made for"))
 :category "debug")
  1. Created a similar tool with no arguments:
(gptel-make-tool
 :name "greeting_witout_a_name"
 :function (lambda () "Hello World!")
 :description "A simple tool that returns a greeting message."
 :args nil
 :category "debug")

Expected Behavior

The tool without arguments should respond with "Hello World!" when invoked.

Actual Behavior

When trying to use the zero-argument tool, there's no response. The OpenRouter Activity page shows no activity either, suggesting the request isn't being sent or is being rejected.

Additional Information

I suspect there might be an issue with the :args nil setting, as the only difference between the working and non-working tools is the argument handling.

Any guidance would be appreciated.

Additional context
Emacs version: GNU Emacs 30.1 (build 1, aarch64-apple-darwin21.6.0, NS appkit-2113.65 Version 12.7.6 (Build 21H1320)) of 2025-02-24
Operating system: MacOS sequoia 15.3.1

@norisuke3 norisuke3 added the question Further information is requested label Mar 8, 2025
@norisuke3
Copy link
Author

norisuke3 commented Mar 8, 2025

Just found that it's a model issue, not gptel. It works with the following models:
openai/gpt-4o-2024-11-20
google/gemini-2.0-flash-001

Somehow openai/o3-mini go into a loop until killing a gtpel session (OpenRouter).

The prompt used: Hello! My name is Bob!. Just show a string returned from a tool 'greeting_without_a_name' withtout any change. No additional sentence is required.

A screen shot of Openrouter activity
Image

*gptel-curl*

HTTP/2 200 
date: Sat, 08 Mar 2025 20:32:34 GMT
content-type: text/event-stream
access-control-allow-origin: *
cache-control: no-cache
x-clerk-auth-message: Invalid JWT form. A JWT consists of three parts separated by dots. (reason=token-invalid, token-carrier=header)
x-clerk-auth-reason: token-invalid
x-clerk-auth-status: signed-out
vary: Accept-Encoding
server: cloudflare
cf-ray: 91d51a436fb9cf0e-SJC

: OPENROUTER PROCESSING

: OPENROUTER PROCESSING

: OPENROUTER PROCESSING

: OPENROUTER PROCESSING

: OPENROUTER PROCESSING

: OPENROUTER PROCESSING

: OPENROUTER PROCESSING

: OPENROUTER PROCESSING

: OPENROUTER PROCESSING

: OPENROUTER PROCESSING

: OPENROUTER PROCESSING

It also might not be an issue of gptel.

@norisuke3
Copy link
Author

Hi there,

One question remaining is that somehow I don't see any activity log on OpenRouter when choosing anthropic/claude-3.7-sonnet and anthropic/claude-3.5-sonnet. I did the same thing with gemini flash 2.0 and gpt-4o which are recorded there.

Thanks!

@karthink
Copy link
Owner

karthink commented Mar 9, 2025

Could be gptel+OpenAI specific. Does the no-args tool work with gpt-4o-mini?

One question remaining is that somehow I don't see any activity log on OpenRouter when choosing anthropic/claude-3.7-sonnet and anthropic/claude-3.5-sonnet. I did the same thing with gemini flash 2.0 and gpt-4o which are recorded there.

I don't use OpenRouter so I don't know what you mean, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants