Skip to content

fix(deepagents): handle dotfile MIME detection#652

Draft
PetarVukovicFormify wants to merge 1 commit into
langchain-ai:mainfrom
PetarVukovicFormify:agent/fix-dotfile-mime-types
Draft

fix(deepagents): handle dotfile MIME detection#652
PetarVukovicFormify wants to merge 1 commit into
langchain-ai:mainfrom
PetarVukovicFormify:agent/fix-dotfile-mime-types

Conversation

@PetarVukovicFormify

Copy link
Copy Markdown

Summary

Fix MIME detection for text config files whose names do not have normal extensions, including .env.example, .env.local, .gitignore, .dockerignore, .editorconfig, Dockerfile, Makefile, and LICENSE.

Root cause

getMimeType() only checked extname(filePath). For filenames like .env.example, the detected extension is .example, so DeepAgents treated the file as application/octet-stream. When read_file returned that as a generic file content block, Anthropic-compatible model adapters could forward it as a non-PDF document and hit provider validation errors.

Changes

  • Check known full basenames before falling back to extension-based MIME detection.
  • Treat .env variants and common extensionless config filenames as text/plain.
  • Add regression coverage for these filenames.
  • Add a patch changeset for deepagents.

Validation

  • corepack pnpm --filter deepagents exec vitest run src/backends/utils.test.ts
  • corepack pnpm --filter deepagents exec vitest run src/backends/utils.test.ts src/backends/filesystem.test.ts src/backends/local-shell.test.ts
  • corepack pnpm --filter @langchain/sandbox-standard-tests build
  • corepack pnpm --filter deepagents typecheck
  • corepack pnpm format:check
  • corepack pnpm --filter deepagents test:unit
  • corepack pnpm lint
  • corepack pnpm --filter deepagents build

@changeset-bot

changeset-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ccbfcd2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
deepagents Patch
deepagents-acp Patch
@deepagents/evals Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

Petar Vuković (@PetarVukovic) is attempting to deploy a commit to the LangChain Team on Vercel.

A member of the Team first needs to authorize it.

@PetarVukovicFormify PetarVukovicFormify changed the title Fix dotfile MIME detection fix(deepagents): handle dotfile MIME detection Jul 7, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 7, 2026

Copy link
Copy Markdown

Open in StackBlitz

deepagents-acp

npm i https://pkg.pr.new/deepagents-acp@652

deepagents

npm i https://pkg.pr.new/deepagents@652

@langchain/sandbox-standard-tests

npm i https://pkg.pr.new/@langchain/sandbox-standard-tests@652

@langchain/daytona

npm i https://pkg.pr.new/@langchain/daytona@652

@langchain/deno

npm i https://pkg.pr.new/@langchain/deno@652

@langchain/modal

npm i https://pkg.pr.new/@langchain/modal@652

@langchain/node-vfs

npm i https://pkg.pr.new/@langchain/node-vfs@652

@langchain/quickjs

npm i https://pkg.pr.new/@langchain/quickjs@652

commit: ccbfcd2

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.

2 participants