René's URL Explorer Experiment


Title: feat(types): nested model_dump() resolution in response models · Issue #615 · adcontextprotocol/adcp-client-python · GitHub

Open Graph Title: feat(types): nested model_dump() resolution in response models · Issue #615 · adcontextprotocol/adcp-client-python

X Title: feat(types): nested model_dump() resolution in response models · Issue #615 · adcontextprotocol/adcp-client-python

Description: Problem Pydantic doesn't auto-call custom model_dump() on nested models — if a parent's children have model_dump() overrides, the parent's super().model_dump() produces the children via the default Pydantic serialization, not via the chi...

Open Graph Description: Problem Pydantic doesn't auto-call custom model_dump() on nested models — if a parent's children have model_dump() overrides, the parent's super().model_dump() produces the children via the default...

X Description: Problem Pydantic doesn't auto-call custom model_dump() on nested models — if a parent's children have model_dump() overrides, the parent's super().model_dump() produces the children via...

Opengraph URL: https://github.com/adcontextprotocol/adcp-client-python/issues/615

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat(types): nested model_dump() resolution in response models","articleBody":"## Problem\n\nPydantic doesn't auto-call custom `model_dump()` on nested models — if a parent's children have `model_dump()` overrides, the parent's `super().model_dump()` produces the children via the default Pydantic serialization, not via the children's overrides. Adopters that need custom serialization on a child class (most commonly: tenant-internal fields excluded with `exclude=True`, or AdCP-spec-shaped overrides on extended types) end up writing this in every response model:\n\n```python\nclass GetCreativesResponse(AdCPBaseModel):\n    creatives: list[Creative]\n\n    def model_dump(self, **kwargs):\n        result = super().model_dump(**kwargs)\n        if \\\"creatives\\\" in result and self.creatives:\n            result[\\\"creatives\\\"] = [c.model_dump(**kwargs) for c in self.creatives]\n        return result\n```\n\nWe have **~59 such overrides** across [src/core/schemas/](https://github.com/prebid/salesagent/tree/main/src/core/schemas). Every override is mechanical: walk the children, call their `model_dump`. Adding a new response type means writing one again. Forgetting one is silent — the test fails on a serialization-difference, but only if the test exercises the nested path.\n\n## Proposed SDK shape\n\nEither of:\n\n**A) `AdCPBaseModel` recursively dispatches custom `model_dump()` on children.** Walk `__pydantic_fields__`, detect when a field's annotated type has a custom `model_dump`, and call it directly instead of relying on Pydantic's default child serialization. Same for lists/dicts of models.\n\n**B) Codegen flag** that emits nested-aware `model_dump()` on the generated response types — adopters extending those types via inheritance get the nested-walking for free.\n\n(A) is broader; (B) is narrower but ships with no risk to non-adopters.\n\n## Why this is the highest-LOC win on our open list\n\nThe other open framework gaps (spec defaults, agent-card URL, transport contextvar, test app builder) each kill 50-275 LOC of middleware. This one kills hundreds of LOC of mechanical override boilerplate spread across the schema package.\n\n## Files\n\n- Our overrides live across [src/core/schemas/_base.py](https://github.com/prebid/salesagent/blob/main/src/core/schemas/_base.py), product.py, creative.py, delivery.py, account.py.\n- Pattern documented in our CLAUDE.md as \"Critical Pattern #4: Pydantic Explicit Nested Serialization\" — we'd love to delete the section.","author":{"url":"https://github.com/bokelley","@type":"Person","name":"bokelley"},"datePublished":"2026-05-10T12:17:55Z","url":"https://github.com/adcontextprotocol/adcp-client-python/issues/615"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:5f6abc77-4824-a2c1-bc04-88334877ac54
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE14A:1C94F:FED93:1473D1:6B00F85C
html-safe-nonce2dbb441771281dcf1edba3997ba8bcbc568802da8a1b59812942bd2faaea0052
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTRBOjFDOTRGOkZFRDkzOjE0NzNEMTo2QjAwRjg1QyIsInZpc2l0b3JfaWQiOiI2ODE2NTg1MzM2NDk2Mzg4MTg4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacf0b9333fe446829603a2a6076e50470be59c712f3c2ec5245df3604ebf1bc321
hovercard-subject-tagissue:4415583069
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/adcontextprotocol/adcp-client-python/615/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d5c53c2cdbb31d9a741f9e7e65b7c7d8880e032481d5bd01c15e69b585d14ae6/adcontextprotocol/adcp-client-python/issues/615
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d5c53c2cdbb31d9a741f9e7e65b7c7d8880e032481d5bd01c15e69b585d14ae6/adcontextprotocol/adcp-client-python/issues/615
og:image:altProblem Pydantic doesn't auto-call custom model_dump() on nested models — if a parent's children have model_dump() overrides, the parent's super().model_dump() produces the children via the default...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebokelley
hostnamegithub.com
expected-hostnamegithub.com
Nonee208d86428ec00a57ade75058166297440e8128a01e5287c31a53dc042bbf187
turbo-cache-controlno-preview
go-importgithub.com/adcontextprotocol/adcp-client-python git https://github.com/adcontextprotocol/adcp-client-python.git
octolytics-dimension-user_id221690821
octolytics-dimension-user_loginadcontextprotocol
octolytics-dimension-repository_id1090305973
octolytics-dimension-repository_nwoadcontextprotocol/adcp-client-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1090305973
octolytics-dimension-repository_network_root_nwoadcontextprotocol/adcp-client-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7dafd017fb7809a839c443dba08622af38e63c09
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/adcontextprotocol/adcp-client-python/issues/615#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fadcontextprotocol%2Fadcp-client-python%2Fissues%2F615
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fadcontextprotocol%2Fadcp-client-python%2Fissues%2F615
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=adcontextprotocol%2Fadcp-client-python
Reloadhttps://github.com/adcontextprotocol/adcp-client-python/issues/615
Reloadhttps://github.com/adcontextprotocol/adcp-client-python/issues/615
Reloadhttps://github.com/adcontextprotocol/adcp-client-python/issues/615
adcontextprotocolhttps://github.com/adcontextprotocol
adcp-client-pythonhttps://github.com/adcontextprotocol/adcp-client-python
Codehttps://github.com/adcontextprotocol/adcp-client-python
Issues44 (44)https://github.com/adcontextprotocol/adcp-client-python/issues
Pull requests13 (13)https://github.com/adcontextprotocol/adcp-client-python/pulls
Actionshttps://github.com/adcontextprotocol/adcp-client-python/actions
Projectshttps://github.com/adcontextprotocol/adcp-client-python/projects
Security and qualityhttps://github.com/adcontextprotocol/adcp-client-python/security
Insightshttps://github.com/adcontextprotocol/adcp-client-python/insights
https://github.com/adcontextprotocol/adcp-client-python
New issuehttps://github.com/login?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/615
New issuehttps://github.com/login?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/615
#620https://github.com/adcontextprotocol/adcp-client-python/pull/620
#639https://github.com/adcontextprotocol/adcp-client-python/pull/639
feat(types): nested model_dump() resolution in response modelshttps://github.com/adcontextprotocol/adcp-client-python/issues/615#top
#620https://github.com/adcontextprotocol/adcp-client-python/pull/620
#639https://github.com/adcontextprotocol/adcp-client-python/pull/639
claude-triagedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaged%22
enhancementNew feature or requesthttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com/bokelley
bokelleyhttps://github.com/bokelley
on May 10, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/615#issue-4415583069
src/core/schemas/https://github.com/prebid/salesagent/tree/main/src/core/schemas
src/core/schemas/_base.pyhttps://github.com/prebid/salesagent/blob/main/src/core/schemas/_base.py
chore(main): release 1.0.0 #4https://github.com/adcontextprotocol/adcp-client-python/pull/4
bokelleyhttps://github.com/bokelley
claude-triagingTriage routine is actively working on this issue (1-3 min)https://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaging%22
on May 10, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/615#event-25353051973
https://github.com/bokelley
bokelleyhttps://github.com/bokelley
on May 10, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/615#issuecomment-4415341851
#630https://github.com/adcontextprotocol/adcp-client-python/pull/630
#630https://github.com/adcontextprotocol/adcp-client-python/pull/630
#630https://github.com/adcontextprotocol/adcp-client-python/pull/630
https://claude.ai/code/session_01P7MQW9tW7z4rYm13zghrVChttps://claude.ai/code/session_01P7MQW9tW7z4rYm13zghrVC
Claude Codehttps://claude.ai/code
bokelleyhttps://github.com/bokelley
enhancementNew feature or requesthttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22enhancement%22
claude-triagedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaged%22
claude-triagingTriage routine is actively working on this issue (1-3 min)https://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaging%22
on May 10, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/615#event-25353461522
bokelleyhttps://github.com/bokelley
completedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#639https://github.com/adcontextprotocol/adcp-client-python/pull/639
on May 10, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/615#event-25355860860
KonstantinMirinhttps://github.com/KonstantinMirin
on May 13, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/615#event-25486673399
feat(types)!: default serialize_as_any=True in AdCPBaseModel.model_du…https://github.com/KonstantinMirin/adcp-client-python/commit/3160ace6fed398b738d24d3d101e82a54caedc93
https://docs.github.com/articles/closing-issues-via-commit-messages
3160acehttps://github.com/KonstantinMirin/adcp-client-python/commit/3160ace6fed398b738d24d3d101e82a54caedc93
Sign up for freehttps://github.com/signup?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/615
Sign in to commenthttps://github.com/login?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/615
claude-triagedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaged%22
enhancementNew feature or requesthttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.