Skip to content

fix(pydantic-ai): avoid duplicate request customization - #749

Merged
Abhijeet Prasad (AbhiPrasad) merged 1 commit into
mainfrom
abhi-fix-pydantic-ai-request-customization
Sep 9, 2026
Merged

Abhijeet Prasad (AbhiPrasad) merged 1 commit into
mainfrom
abhi-fix-pydantic-ai-request-customization

Conversation

@AbhiPrasad

@AbhiPrasad Abhijeet Prasad (AbhiPrasad) commented Sep 8, 2026 •

Copy link
Copy Markdown
Member

Capture tool metadata from the normal prepare_request result instead of calling customize_request_parameters.

customize_request_parameters causes a side effect, which is no beuno for us (we can't be affecting customer code during our instrumentation).

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-08T18:35:09.777918Z 327aedd PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Capture tool metadata from the normal `prepare_request` result instead of
calling `customize_request_parameters` during span construction. This preserves
provider-adjusted tool schemas while avoiding side effects and divergent trace
metadata.

Add VCR-backed coverage for direct and streaming requests with a stateful
customization hook.
@AbhiPrasad
Abhijeet Prasad (AbhiPrasad) force-pushed the abhi-fix-pydantic-ai-request-customization branch from 327aedd to 98041ec Compare September 8, 2026 18:28
@AbhiPrasad
Abhijeet Prasad (AbhiPrasad) merged commit 6d5ce9d into main Sep 9, 2026
83 checks passed
@AbhiPrasad
Abhijeet Prasad (AbhiPrasad) deleted the abhi-fix-pydantic-ai-request-customization branch September 9, 2026 01:55
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