Skip to content

feat: Adding pydantic validation for strong typing in anthropic.#4475

Closed
eternalcuriouslearner wants to merge 3 commits intoopen-telemetry:mainfrom
eternalcuriouslearner:pr/suryateja/add-pydantic-validation-around-anthropic-types
Closed

feat: Adding pydantic validation for strong typing in anthropic.#4475
eternalcuriouslearner wants to merge 3 commits intoopen-telemetry:mainfrom
eternalcuriouslearner:pr/suryateja/add-pydantic-validation-around-anthropic-types

Conversation

@eternalcuriouslearner
Copy link
Copy Markdown
Contributor

@eternalcuriouslearner eternalcuriouslearner commented Apr 22, 2026

Description

Add pydantic validation around Anthropic sdk's types.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Ran the test suite to check if the current change is breaking the instrumentation or not.

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@herin049
Copy link
Copy Markdown
Contributor

Based on discussion from the SIG, it would be preferable to limit the dependence on pydantic as much as possible to avoid making the instrumentation tightly coupled to the anthropic implementation details and its dependencies.

@eternalcuriouslearner
Copy link
Copy Markdown
Contributor Author

Based on our discussion during SIG meeting and @herin049's suggestion I am closing this pr as current codebase uses pydantic models for server side responses and handles the request attributes as TypedDicts.

@eternalcuriouslearner eternalcuriouslearner deleted the pr/suryateja/add-pydantic-validation-around-anthropic-types branch April 24, 2026 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants