8000 Tool is not invoked when response returns tool_calls message · Issue #2177 · block/goose · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Tool is not invoked when response returns tool_calls message #2177

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

Open
ljie-PI opened this issue Apr 13, 2025 · 2 comments
Open

Tool is not invoked when response returns tool_calls message #2177

ljie-PI opened this issue Apr 13, 2025 · 2 comments

Comments

@ljie-PI
Copy link
ljie-PI commented Apr 13, 2025

Describe the bug

The LLM returns tool_calls messages like below:

Received response:  {
  "success": true,
  "data": {
    "choices": [
      {
        "finish_reason": "tool_calls",
        "message": {
          "content": "# Creating a 2048 Game\n\nI'll create a 2048 game for you and save it to the specified path. First, let's make sure the directory exists:",
          "role": "assistant"
        }
      },
      {
        "finish_reason": "tool_calls",
        "message": {
          "role": "assistant",
          "tool_calls": [
            {
              "function": {
                "arguments": "{\"command\":\"mkdir -p /home/ljie/Workspace/playground/claude\"}",
                "name": "developer__shell"
              },
              "id": "tooluse_kSXwsIw8SOChwcTnianLSQ",
              "type": "function"
            }
          ]
        }
      }
    ],
    "created": 1744510147,
    "id": "fbb6d468-219d-424d-8968-605b793f2aa6",
    "model": "Claude 3.7 Sonnet",
    "usage": {
      "completion_tokens": 106,
      "prompt_tokens": 2172,
      "total_tokens": 2278
    }
  }
}

But the command in developer__shell is not executed.

To Reproduce
Steps to reproduce the behavior:

  1. Start goose session
  2. Input query "Write a 2048 game and save the code into /home/ljie/Workspace/playground"

Expected behavior
The command is executed and should continue to write the file with generated code.

Please provide following information:

  • OS & Arch: [Ubuntu 24.04 x86]
  • Interface: [CLI]
  • Version: [v1.0.17]
  • Extensions enabled: [No extension]
  • Provider & Model: [claude-3.7-sonnet (provided by Github Copilot)]

Additional context
I have a local service which follows Ollama API protocal. https://github.com/ljie-PI/ghcp-ollama. It redirect the requests to Github Copilot. But the response I printed seems correct. And I can make it work if I select gpt-4o model provided by Github Copilot

@yingjiehe-xyz
Copy link
Collaborator

@ljie-PI is it consistent? because I cannot reproduce it

@ljie-PI
Copy link
Author
ljie-PI commented Apr 19, 2025

Yes, I can constantly repro. But I'm not using the Anthropic official claude model. Please do check if the response format is correct.

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

No branches or pull requests

2 participants
0