Skip to content

fix: incorrect async type checking and pydantic version conflict in function.py #4074

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kausmeows
Copy link
Contributor

@kausmeows kausmeows commented Aug 1, 2025

(#3790)

Instead we now gracefully handle this conflict and log it for reference.

image
  • Fixed comment to accurately reflect code logic: now mentions both async generators and coroutines
  • Fixed incorrect usage of isasyncgen() vs isasyncgenfunction() when checking function objects
  • Fixed incorrect usage of isgenerator() vs isgeneratorfunction() when checking function objects
  • Added missing imports for iscoroutinefunction and isgeneratorfunction
  • Removed unused isasyncgen import in _build_nested_execution_chain_async

These fixes ensure proper type checking for async/generator functions and improve cache handling logic.[修复] 修正函数异步类型检查错误并更新注释,并改进了缓存处理逻辑。

Summary

These fixes ensure proper type checking for async/generator functions and improve cache handling logic.

Type of change

  • [ *] Bug fix
  • New feature
  • Breaking change
  • Improvement
  • Model update
  • Other:

Checklist

  • [*] Code complies with style guidelines
  • [*] Ran format/validation scripts (./scripts/format.sh and ./scripts/validate.sh)
  • [*] Self-review completed
  • [*] Documentation updated (comments, docstrings)
  • [*] Examples and guides: Relevant cookbook examples have been included or updated (if applicable)
  • [*] Tested in clean environment
  • [*] Tests added/updated (if applicable)

Additional Notes

none

Summary

Describe key changes, mention related issues or motivation for the changes.

(If applicable, issue number: #____)

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Improvement
  • Model update
  • Other:

Checklist

  • Code complies with style guidelines
  • Ran format/validation scripts (./scripts/format.sh and ./scripts/validate.sh)
  • Self-review completed
  • Documentation updated (comments, docstrings)
  • Examples and guides: Relevant cookbook examples have been included or updated (if applicable)
  • Tested in clean environment
  • Tests added/updated (if applicable)

Additional Notes

Add any important context (deployment instructions, screenshots, security considerations, etc.)

…n.py (#3790)

- Fixed comment to accurately reflect code logic: now mentions both
async generators and coroutines
- Fixed incorrect usage of isasyncgen() vs isasyncgenfunction() when
checking function objects
- Fixed incorrect usage of isgenerator() vs isgeneratorfunction() when
checking function objects
- Added missing imports for iscoroutinefunction and isgeneratorfunction
- Removed unused isasyncgen import in
_build_nested_execution_chain_async

These fixes ensure proper type checking for async/generator functions
and improve cache handling logic.[修复] 修正函数异步类型检查错误并更新注释,并改进了缓存处理逻辑。

## Summary
These fixes ensure proper type checking for async/generator functions
and improve cache handling logic.


## Type of change

- [ *] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Improvement
- [ ] Model update
- [ ] Other:

---

## Checklist

- [*] Code complies with style guidelines
- [*] Ran format/validation scripts (`./scripts/format.sh` and
`./scripts/validate.sh`)
- [*] Self-review completed
- [*] Documentation updated (comments, docstrings)
- [*] Examples and guides: Relevant cookbook examples have been included
or updated (if applicable)
- [*] Tested in clean environment
- [*] Tests added/updated (if applicable)

---

## Additional Notes
none

Co-authored-by: Kaustubh <[email protected]>
@kausmeows kausmeows requested a review from a team as a code owner August 1, 2025 21:36
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.

3 participants