Handle Bedrock 'prompt is too long' error#7550
Merged
jh-block merged 1 commit intoblock:mainfrom Feb 27, 2026
Merged
Conversation
Extend Bedrock provider validation handling to treat messages containing "prompt is too long" as a context-length-exceeded error. The code now extracts the validation message into a local variable and checks both the existing "Input is too long for requested model." phrase and the new "prompt is too long" phrase, mapping either to ProviderError::ContextLengthExceeded. Signed-off-by: Oleg Levchenko <[email protected]> Remove build.sh from tracking Signed-off-by: Oleg Levchenko <[email protected]>
Contributor
Author
|
@ jamadeo, please kindly review |
jamadeo
approved these changes
Feb 27, 2026
Collaborator
|
thanks @u35tpus ! |
tlongwell-block
added a commit
that referenced
this pull request
Feb 27, 2026
…m-extension-pr * origin/main: Update CODEOWNERS for team restructuring (#7574) Add snapshot test with platform extensions (#7573) Handle Bedrock 'prompt is too long' error (#7550) feat: make pctx/Code Mode an optional dependency via 'code-mode' feature (#7567) chore(release): release version 1.26.0 (minor) (#7512) feat: allow goose askai bot to search goose codebase (#7508) Revert "Reapply "fix: prevent crashes in long-running Electron sessions"" Reapply "fix: prevent crashes in long-running Electron sessions" Revert "fix: prevent crashes in long-running Electron sessions" fix: replace unwrap() with graceful error in scheduler execute_job (#7436) fix: Dictation API error message shows incorrect limit (#7423) fix(acp): Use ACP schema types for session/list (#7409) fix(desktop): make bundle and updater asset naming configurable (#7337) fix(openai): preserve order in Responses API history (#7500) Use the correct Goose emoji 🪿 instead of Swan in README.md (#7485) fix: prevent crashes in long-running Electron sessions
craigwalkeruk
pushed a commit
to craigwalkeruk/custom-goose
that referenced
this pull request
Mar 5, 2026
Signed-off-by: Oleg Levchenko <[email protected]> Co-authored-by: Oleg Levchenko <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extend Bedrock provider validation handling to treat messages containing "prompt is too long" as a context-length-exceeded error. The code now extracts the validation message into a local variable and checks both the existing "Input is too long for requested model." phrase and the new "prompt is too long" phrase, mapping either to ProviderError::ContextLengthExceeded.
Remove build.sh from tracking
Summary
Type of Change
AI Assistance
Testing
Tested it locally to ensure bug is not reproduced after fix fix
Related Issues
Relates to #7442
Discussion: LINK (if any)
Screenshots/Demos (for UX changes)
Before:
After: