fix(sdk,code): use file_path kwarg in read_file examples - #3630
Merged
Conversation
file_path kwarg in read_file examplesfile_path kwarg in read_file examples
This was referenced May 27, 2026
Mason Daugherty (mdrxy)
added a commit
that referenced
this pull request
May 28, 2026
> [!CAUTION] > Merging this PR will automatically publish to **PyPI** and create a **GitHub release**. For the full release process, see [`.github/RELEASING.md`](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md). --- _Everything below this line will be the GitHub release body._ --- ## [0.6.5](deepagents==0.6.4...deepagents==0.6.5) (2026-05-28) ### Features * `RubricMiddleware` for self-evaluated agent iteration ([#3529](#3529)) ([5b8d44d](5b8d44d)) * Log when grep falls back from ripgrep ([#3593](#3593)) ([379b1ff](379b1ff)) ### Bug Fixes * Use `file_path` kwarg in `read_file` examples ([#3630](#3630)) ([97946ee](97946ee)) * `read_file` pagination skipping lines after wrapping ([#3641](#3641)) ([390551d](390551d)) * Handle `None` state in messages delta reducer ([#3636](#3636)) ([5a6d920](5a6d920)) * Return grep errors for sandbox exec failures ([#3637](#3637)) ([f87d61f](f87d61f)) --- _Everything above this line will be the GitHub release body._ --- > [!NOTE] > A **New Contributors** section is appended to the GitHub release notes automatically at publish time (see [Release Pipeline](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md#release-pipeline), step 2). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Mason Daugherty <github@mdrxy.com>
Marcelo5444
pushed a commit
to Marcelo5444/deepagents
that referenced
this pull request
Jul 30, 2026
…in-ai#3630) Closes langchain-ai#3568 --- Tool description and system-prompt examples for `read_file` showed the kwarg as `path` (`read_file(path, limit=100)`) while the underlying `ReadFileSchema` requires `file_path`. Frontier models tolerate the contradiction by deferring to the schema; open-weight models (qwen3, gemma4) copy the example verbatim and every call fails with `file_path: Field required`. ## Changes - Rewrite the three text-mode example signatures in `READ_FILE_TOOL_DESCRIPTION` to `read_file(file_path="...", …)`, matching the multimodal example already present. - Update the workflow line in `SKILLS_SYSTEM_PROMPT` (`SkillsMiddleware`) to use `read_file(file_path="...", limit=1000)`. - Apply the same fix to `deepagents-code`'s `system_prompt.md` and the `format_tool_display` docstring example.
Marcelo5444
pushed a commit
to Marcelo5444/deepagents
that referenced
this pull request
Jul 30, 2026
> [!CAUTION] > Merging this PR will automatically publish to **PyPI** and create a **GitHub release**. For the full release process, see [`.github/RELEASING.md`](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md). --- _Everything below this line will be the GitHub release body._ --- ## [0.6.5](langchain-ai/deepagents@deepagents==0.6.4...deepagents==0.6.5) (2026-05-28) ### Features * `RubricMiddleware` for self-evaluated agent iteration ([langchain-ai#3529](langchain-ai#3529)) ([5b8d44d](langchain-ai@5b8d44d)) * Log when grep falls back from ripgrep ([langchain-ai#3593](langchain-ai#3593)) ([379b1ff](langchain-ai@379b1ff)) ### Bug Fixes * Use `file_path` kwarg in `read_file` examples ([langchain-ai#3630](langchain-ai#3630)) ([97946ee](langchain-ai@97946ee)) * `read_file` pagination skipping lines after wrapping ([langchain-ai#3641](langchain-ai#3641)) ([390551d](langchain-ai@390551d)) * Handle `None` state in messages delta reducer ([langchain-ai#3636](langchain-ai#3636)) ([5a6d920](langchain-ai@5a6d920)) * Return grep errors for sandbox exec failures ([langchain-ai#3637](langchain-ai#3637)) ([f87d61f](langchain-ai@f87d61f)) --- _Everything above this line will be the GitHub release body._ --- > [!NOTE] > A **New Contributors** section is appended to the GitHub release notes automatically at publish time (see [Release Pipeline](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md#release-pipeline), step 2). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Mason Daugherty <github@mdrxy.com>
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 #3568
Tool description and system-prompt examples for
read_fileshowed the kwarg aspath(read_file(path, limit=100)) while the underlyingReadFileSchemarequiresfile_path. Frontier models tolerate the contradiction by deferring to the schema; open-weight models (qwen3, gemma4) copy the example verbatim and every call fails withfile_path: Field required.Changes
READ_FILE_TOOL_DESCRIPTIONtoread_file(file_path="...", …), matching the multimodal example already present.SKILLS_SYSTEM_PROMPT(SkillsMiddleware) to useread_file(file_path="...", limit=1000).deepagents-code'ssystem_prompt.mdand theformat_tool_displaydocstring example.