[PR #9276] fix(tool): treat .fbs files as text instead of images #13049

Closed
opened 2026-02-16 18:17:55 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/9276

State: closed
Merged: Yes


Summary

Fixes #9210

The .fbs file extension (commonly used for FlatBuffers schema files) was being detected as image/vnd.fastbidsheet due to Bun's MIME type mapping. This caused these text files to be treated as images, leading to errors with providers that don't support this obscure image format (e.g., Bedrock with Anthropic models returns "Unsupported image mime type: image/vnd.fastbidsheet").

Changes

  • Added image/vnd.fastbidsheet to the exclusion list alongside image/svg+xml in the read tool's image detection logic
  • Added test case to verify .fbs files are read as text, not images

Test plan

  • Added test case that verifies .fbs files are read as text content
  • Test passes with bun test test/tool/read.test.ts --test-name-pattern "fbs"

🤖 Generated with Claude Code

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/9276 **State:** closed **Merged:** Yes --- ## Summary Fixes #9210 The `.fbs` file extension (commonly used for FlatBuffers schema files) was being detected as `image/vnd.fastbidsheet` due to Bun's MIME type mapping. This caused these text files to be treated as images, leading to errors with providers that don't support this obscure image format (e.g., Bedrock with Anthropic models returns "Unsupported image mime type: image/vnd.fastbidsheet"). ## Changes - Added `image/vnd.fastbidsheet` to the exclusion list alongside `image/svg+xml` in the read tool's image detection logic - Added test case to verify `.fbs` files are read as text, not images ## Test plan - [x] Added test case that verifies `.fbs` files are read as text content - [x] Test passes with `bun test test/tool/read.test.ts --test-name-pattern "fbs"` --- 🤖 Generated with [Claude Code](https://claude.com/claude-code)
yindo added the pull-request label 2026-02-16 18:17:55 -05:00
yindo closed this issue 2026-02-16 18:17:55 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13049