fix: The detected filetype is PLAIN_TEXT, but the provided filetype was HTML#6885
Open
github-actions[bot] wants to merge 2 commits intomainfrom
Open
fix: The detected filetype is PLAIN_TEXT, but the provided filetype was HTML#6885github-actions[bot] wants to merge 2 commits intomainfrom
github-actions[bot] wants to merge 2 commits intomainfrom
Conversation
katzdave
approved these changes
Feb 6, 2026
Collaborator
katzdave
left a comment
There was a problem hiding this comment.
Seems fine to delete since scoped to bedrock.
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.
Closes #6873
Summary
Issue #6873 Fix Summary
Problem
When using Goose with the AWS Bedrock provider, viewing
.htmlfiles containing template syntax (Jinja2, Django, etc.) caused aValidationExceptionerror:"The detected filetype is PLAIN_TEXT, but the provided filetype was HTML."
This occurred because the
to_bedrock_document()function determined the document format based on file extension. When it encountered.htmlfiles, it declared them asHtmlformat to Bedrock's API. However, Bedrock validates content against the declared format, and template files containing{{ }}or{% %}syntax aren't valid HTML according to Bedrock's content validator.Solution
Removed HTML from the list of supported document formats in the
to_bedrock_document()function. HTML files now fall through to the default case (_ => return Ok(None)), which means they are handled as plain text content instead of being declared as HTML documents.Change Made
File:
crates/goose/src/providers/formats/bedrock.rsRemoved line:
From the match statement at line 258-263:
Verification
cargo check- passedcargo fmt- passed./scripts/clippy-lint.sh- passed (pre-existing warnings only)Impact
Generated by goose Issue Solver