Skip to content

Conversation

@kalvinnchau
Copy link
Contributor

@kalvinnchau kalvinnchau commented Mar 12, 2025

goose can be interrupted during tool responses as well, previously it would fall into the first conditional and just remove the last user message and get the following:

Ran into this error: Request failed: Request failed with status: 400 Bad Request. Message: {"external_model_provider":"amazon-bedrock","external_model_error":{"message":"messages.140: Did not find 1 tool_result block(s) at the beginning of this message. Messages following tool_use blocks must begin with a matching number of tool_result blocks."}}.

at some point before the message apis changes we were checking that

if (lastMessage.role === 'user' && lastMessage.toolInvocations === undefined) {

there were no "toolInvocations" in the user message.

this PR adds that check back in for the updated api messages.

Copy link

@wendytang wendytang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes!!! 🎉

@kalvinnchau kalvinnchau merged commit e268fb4 into main Mar 13, 2025
6 checks passed
@kalvinnchau kalvinnchau deleted the kalvin/ui-interrup-tool-call branch March 13, 2025 19:51
michaelneale added a commit that referenced this pull request Mar 14, 2025
* main: (32 commits)
  ui: load builtins (#1679)
  chore(release): release version 1.0.14 (#1676)
  Revert "feat: handling larger more complex PDF docs (and fix) (#1663)" (#1675)
  fix: uvshim default to existing uv configuration (#1670)
  fix: handle interruptions during tool responses (#1651)
  feat: Copy error message button in toast (#1658)
  feat: handling larger more complex PDF docs (and fix) (#1663)
  Add Filesystem Tutorial (#1666)
  docs: figma blog post (#1647)
  docs: updating goose modes doc (#1665)
  docs: Add running tasks guide (#1626)
  docs: Add experimental features (#1644)
  feat(cli): add better error message, support stdin via -i - or just no args (#1660)
  feat: extensions read config (#1637)
  fix: trigger words for memory (#1654)
  fix: cleanup keyboard shortcut indication (#1642)
  Extensions load in background and show pending state (#1657)
  Extension error toast stays until dismissed, and error message cleanup (#1653)
  fix: remove other category in settings (#1641)
  fix: restore image outputs from tool calls (#1640)
  ...
kalvinnchau added a commit that referenced this pull request Mar 14, 2025
* origin/main: (29 commits)
  ui: reorganize extensions settings (#1702)
  feat: google_drive write tools and read comment tool (#1650)
  fix: developer builtin name (#1699)
  chore: update extensions section to work with new endpoints (#1696)
  chore: move things around (#1662)
  ui: extensions state updates (#1674)
  docs: goose ollama blog, updated (#1691)
  ui: load builtins (#1679)
  chore(release): release version 1.0.14 (#1676)
  Revert "feat: handling larger more complex PDF docs (and fix) (#1663)" (#1675)
  fix: uvshim default to existing uv configuration (#1670)
  fix: handle interruptions during tool responses (#1651)
  feat: Copy error message button in toast (#1658)
  feat: handling larger more complex PDF docs (and fix) (#1663)
  Add Filesystem Tutorial (#1666)
  docs: figma blog post (#1647)
  docs: updating goose modes doc (#1665)
  docs: Add running tasks guide (#1626)
  docs: Add experimental features (#1644)
  feat(cli): add better error message, support stdin via -i - or just no args (#1660)
  ...
laanak08 added a commit that referenced this pull request Mar 16, 2025
* main: (31 commits)
  feat: add default metrics for core evals (#1602)
  feat(google_drive): use oauth2 crate for PKCE support, make token storage generic over Serializable (#1645)
  ui: reorganize extensions settings (#1702)
  feat: google_drive write tools and read comment tool (#1650)
  fix: developer builtin name (#1699)
  chore: update extensions section to work with new endpoints (#1696)
  chore: move things around (#1662)
  ui: extensions state updates (#1674)
  docs: goose ollama blog, updated (#1691)
  ui: load builtins (#1679)
  chore(release): release version 1.0.14 (#1676)
  Revert "feat: handling larger more complex PDF docs (and fix) (#1663)" (#1675)
  fix: uvshim default to existing uv configuration (#1670)
  fix: handle interruptions during tool responses (#1651)
  feat: Copy error message button in toast (#1658)
  feat: handling larger more complex PDF docs (and fix) (#1663)
  Add Filesystem Tutorial (#1666)
  docs: figma blog post (#1647)
  docs: updating goose modes doc (#1665)
  docs: Add running tasks guide (#1626)
  ...
cbruyndoncx pushed a commit to cbruyndoncx/goose that referenced this pull request Jul 20, 2025
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

Successfully merging this pull request may close these issues.

3 participants