Skip to content

[Bug]API Error when calling tools #62

@cocolinfff

Description

@cocolinfff

What happened?

It meet errors when calling function tools.

And sometimes ,it just think for a long long long time and error,and, retry. I have lost a lot of token because of this shit bug.
oh my,it's much more expensive than claude-code because of this bug

What did you expect to happen?

It should read the file and solve my work.

Client information

Details
 ✔  ReadFile config.json  │
 ╰──────────────────────────╯
✕ [API Error: OpenAI API error: 400 <400>
  InternalError.Algo.InvalidParameter: An assistant message with
  "tool_calls" must be followed by tool messages responding to each
  "tool_call_id". The following tool_call_ids did not have response
  messages: message[7].role]

✦ Now let's look at the main entry point of the application:

 ╭──────────────────────╮
 │ ✔  ReadFile main.py  │
 ╰──────────────────────╯
✕ [API Error: OpenAI API error: 400 <400>
  InternalError.Algo.InvalidParameter: An assistant message with
  "tool_calls" must be followed by tool messages responding to each
  "tool_call_id". The following tool_call_ids did not have response
  messages: message[7].role]

another error log:

Details
 ✖  Error flushing log events: AggregateError [ETIMEDOUT]:    │
│        at internalConnectMultiple (node:net:1122:18)         │
│        at afterConnectMultiple (node:net:1689:7) {           │
│      code: 'ETIMEDOUT',                                      │
│      [errors]: [                                             │
│        Error: connect ETIMEDOUT 216.239.32.223:443           │
│            at createConnectionError (node:net:1652:14)       │
│            at Timeout.internalConnectMultipleTimeout         │
│    (node:net:1711:38)                                        │
│            at listOnTimeout (node:internal/timers:583:11)    │
│            at process.processTimers                          │
│    (node:internal/timers:519:7) {                            │
│          errno: -4039,                                       │
│          code: 'ETIMEDOUT',                                  │
│          syscall: 'connect',                                 │
│          address: '216.239.32.223',                          │
│          port: 443                                           │
│        },                                                    │
│        Error: connect ETIMEDOUT 216.239.36.223:443           │
│            at createConnectionError (node:net:1652:14)       │
│            at Timeout.internalConnectMultipleTimeout         │
│    (node:net:1711:38)                                        │
│            at listOnTimeout (node:internal/timers:583:11)    │
│            at process.processTimers                          │
│    (node:internal/timers:519:7) {                            │
│          errno: -4039,                                       │
│          code: 'ETIMEDOUT',                                  │
│          syscall: 'connect',                                 │
│          address: '216.239.36.223',                          │
│          port: 443                                           │
│        },                                                    │
│        Error: connect ETIMEDOUT 216.239.34.223:443           │
│            at createConnectionError (node:net:1652:14)       │
│            at Timeout.internalConnectMultipleTimeout         │
│    (node:net:1711:38)                                        │
│            at listOnTimeout (node:internal/timers:583:11)    │
│            at process.processTimers                          │
│    (node:internal/timers:519:7) {                            │
│          errno: -4039,                                       │
│          code: 'ETIMEDOUT',                                  │
│          syscall: 'connect',                                 │
│          address: '216.239.34.223',                          │
│          port: 443                                           │
│        },                                                    │
│        Error: connect ETIMEDOUT 216.239.38.223:443           │
│            at createConnectionError (node:net:1652:14)       │
│            at afterConnectMultiple (node:net:1682:16) {      │
│          errno: -4039,                                       │
│          code: 'ETIMEDOUT',                                  │
│          syscall: 'connect',                                 │
│          address: '216.239.38.223',                          │
│          port: 443                                           │
│        }                                                     │
│      ]                                                       │
│    } (x9)   

Anything else we need to know?

I'm not sure if I need to use VPN?
Gemini-cli need a clean VPN env, but in qwen-code I'm not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions