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

ERROR goose::agents::truncate: Error: Request failed: Request failed with status: 400 Bad Request #945

Open
digitalbuddha opened this issue Jan 30, 2025 · 4 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@digitalbuddha
Copy link

Describe the bug
After interacting with Goose for few hours, I get the following error

ERROR goose::agents::truncate: Error: Request failed: Request failed with status: 400 Bad Request

It doesn't seem to be transient as once I get stuck I need to close my session. Up until the error everything works perfectly. Let me know if there are any logs I can grab

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
Not to get stuck in an error state

Please provide following information:

  • OS & Arch: OSx
  • Interface: CLI
  • Version: 1.0.0
  • Extensions enabled: Jetbrains
  • Provider & Model: Sonnet 3.5 through litellm (open ai compat)
@salman1993
Copy link
Collaborator

@digitalbuddha can you try the latest canary version? we also print out the payload when that error happens so it might be easier to debug.

curl -fsSL https://github.com/block/goose/releases/download/stable/download_cli.sh | CANARY=true bash 

since you mentioned its happening after few hours of usage, i wonder if you're hitting context limits but litellm is doing error handling differently and we're not raising ProviderError::ContextLengthExceeded appropriately so that means we don't attempt to truncate

return Err(ProviderError::ContextLengthExceeded(error_msg.to_string()));

@salman1993 salman1993 added the help wanted Extra attention is needed label Jan 30, 2025
@digitalbuddha
Copy link
Author

Sure will try later today. I'm definitely hitting context limits earlier as my usage is in the tens of dollars during a session. Can I grab additional logs anywhere?

@salman1993
Copy link
Collaborator

if you're using the CLI, then you should see logs in ~/.config/goose/logs/cli
for GUI: ~/.config/goose/logs/server/

@wendytang wendytang self-assigned this Jan 30, 2025
@armstrys
Copy link

armstrys commented Feb 1, 2025

Unsure if it is the same cause, but I am also running into this error when trying to run mcp-obsidian. Goose works fine until I enable this extension and then crashes immediately.

( O)> test
◒  Taming tensors...                                                                                                                           2025-02-01T18:15:21.628479Z ERROR goose::agents::truncate: Error: Request failed: Request failed with status: 400 Bad Request. Message: * GenerateContentRequest.tools[0].function_declarations[2].parameters.properties[filepath].format: only 'enum' is supported for STRING type
* GenerateContentRequest.tools[0].function_declarations[4].parameters.properties[filepath].format: only 'enum' is supported for STRING type
* GenerateContentRequest.tools[0].function_declarations[5].parameters.properties[filepath].format: only 'enum' is supported for STRING type
* GenerateContentRequest.tools[0].function_declarations[6].parameters.properties[query].properties: should be non-empty for OBJECT type

    at crates/goose/src/agents/truncate.rs:279

Ran into this error: Request failed: Request failed with status: 400 Bad Request. Message: * GenerateContentRequest.tools[0].function_declara
tions[2].parameters.properties[filepath].format: only 'enum' is supported for STRING type
* GenerateContentRequest.tools[0].function_declarations[4].parameters.properties[filepath].format: only 'enum' is supported for STRING type
* GenerateContentRequest.tools[0].function_declarations[5].parameters.properties[filepath].format: only 'enum' is supported for STRING type
* GenerateContentRequest.tools[0].function_declarations[6].parameters.properties[query].properties: should be non-empty for OBJECT type
.

Please retry if you think this is a transient or recoverable error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants