Skip to content

fix: preserve tool argument whitespace#8131

Merged
harshsinha03 merged 3 commits into
agno-agi:mainfrom
he-yufeng:fix/preserve-tool-argument-whitespace-7871
Jun 9, 2026
Merged

fix: preserve tool argument whitespace#8131
harshsinha03 merged 3 commits into
agno-agi:mainfrom
he-yufeng:fix/preserve-tool-argument-whitespace-7871

Conversation

@he-yufeng

Copy link
Copy Markdown
Contributor

Summary

  • preserve non-sentinel string arguments exactly in get_function_call
  • keep the existing string-to-None/True/False normalization based on trimmed comparison text
  • add regression coverage for leading/trailing whitespace and whitespace-only strings

Closes #7871

To verify

  • python -m pytest libs/agno/tests/unit/utils/test_functions.py -q
  • python -m ruff check libs/agno/agno/utils/functions.py libs/agno/tests/unit/utils/test_functions.py
  • python -m py_compile libs/agno/agno/utils/functions.py libs/agno/tests/unit/utils/test_functions.py
  • git diff --check

@he-yufeng he-yufeng requested a review from a team as a code owner May 27, 2026 20:48
@github-actions

Copy link
Copy Markdown
Contributor

PR Triage

Issue assigned to someone else: This PR references an issue that is already assigned:

Please confirm with the assignee or a maintainer in the issue comments before proceeding.


This PR has been automatically closed. The linked issue is already assigned to someone else. If you believe your contribution is valuable, please comment on the original issue explaining your approach and why it might be preferred. A maintainer can reopen this PR if appropriate.

@github-actions github-actions Bot closed this May 27, 2026
@harshsinha03 harshsinha03 reopened this Jun 9, 2026

@harshsinha03 harshsinha03 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for contributing and appreciate you using Agno!

@harshsinha03 harshsinha03 merged commit f3c3037 into agno-agi:main Jun 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] get_function_call strips intentional whitespace from string arguments, breaking tools that rely on newlines

2 participants