René's URL Explorer Experiment


Title: ServerMessageEndOfCallReport can't parse payloads from Voice Agent because camelCase fields aren't honored · Issue #18 · VapiAI/server-sdk-python · GitHub

Open Graph Title: ServerMessageEndOfCallReport can't parse payloads from Voice Agent because camelCase fields aren't honored · Issue #18 · VapiAI/server-sdk-python

X Title: ServerMessageEndOfCallReport can't parse payloads from Voice Agent because camelCase fields aren't honored · Issue #18 · VapiAI/server-sdk-python

Description: Description When receiving a payload from a Vapi Voice Agent, the ServerMessageEndOfCallReport model in the server-sdk-python fails to parse the incoming JSON. The payload uses camelCase field names (e.g., endedReason, endTime, secondsFr...

Open Graph Description: Description When receiving a payload from a Vapi Voice Agent, the ServerMessageEndOfCallReport model in the server-sdk-python fails to parse the incoming JSON. The payload uses camelCase field name...

X Description: Description When receiving a payload from a Vapi Voice Agent, the ServerMessageEndOfCallReport model in the server-sdk-python fails to parse the incoming JSON. The payload uses camelCase field name...

Opengraph URL: https://github.com/VapiAI/server-sdk-python/issues/18

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ServerMessageEndOfCallReport can't parse payloads from Voice Agent because camelCase fields aren't honored","articleBody":"**Description**  \nWhen receiving a payload from a Vapi Voice Agent, the `ServerMessageEndOfCallReport` model in the `server-sdk-python` fails to parse the incoming JSON. The payload uses **camelCase field names** (e.g., `endedReason`, `endTime`, `secondsFromStart`), but the SDK model expects **snake_case** (`ended_reason`, `end_time`, `seconds_from_start`).  \n\nAlthough the generated model defines aliases using `FieldMetadata(alias=\"...\")`, those aliases are not actually used during model validation. As a result, the SDK throws large validation errors stating that required fields are missing.\n\n---\n\n**Example**\n\n```python\nfrom vapi_server_sdk.models import ServerMessageEndOfCallReport\n\nmsg = {\n    \"timestamp\": 1762133576209,\n    \"type\": \"end-of-call-report\",\n    \"endedReason\": \"customer-ended-call\",\n    \"analysis\": {\"summary\": \"...\", \"successEvaluation\": \"true\"},\n    \"artifact\": {\n        \"messages\": [\n            {\n                \"role\": \"bot\",\n                \"message\": \"Hi, this is a test.\",\n                \"time\": 1762133501000.0,\n                \"endTime\": 1762133502000.0,\n                \"secondsFromStart\": 1.0,\n            }\n        ],\n        \"transcript\": \"AI: Hi, this is a test.\"\n    }\n}\n\nServerMessageEndOfCallReport.model_validate(msg)\n```\n\n**Actual behavior**\n\n```bash\n80 validation errors for ServerMessageEndOfCallReport  \nended_reason  \n  Field required [type=missing, input_value={...}, input_type=dict]  \nartifact.messages.0.BotMessage.end_time  \n  Field required [type=missing, input_value={...}, input_type=dict]  \nartifact.messages.0.BotMessage.seconds_from_start  \n  Field required [type=missing, input_value={...}, input_type=dict]  \n...\n```\n\n---\n\n**Expected behavior**  \nThe SDK should correctly parse the Voice Agent’s camelCase JSON payload, populating the corresponding snake_case model fields using Pydantic’s alias handling.\n\n---\n\n**Root cause**  \nThe generated models use Fern’s custom `FieldMetadata(alias=\"...\")` annotations instead of Pydantic’s native `Field(alias=\"...\")`.  \nPydantic v2 does **not** honor those aliases when parsing input (`model_validate`, `__init__`), only when serializing output (`model_dump(by_alias=True)`).  \n\nThis means that incoming camelCase payloads from the Voice Agent (which follow the documented API schema) cannot be deserialized without manual key remapping.\n\n---\n\n**Workarounds**\n\nConvert the incoming JSON keys from camelCase → snake_case before validation:\n\n```python\nimport re  \nfrom typing import Any, Mapping\n\nCAMEL_RE = re.compile(r'(?\u003c!^)(?=[A-Z])')\n\ndef camel_to_snake(name: str) -\u003e str:\n    return CAMEL_RE.sub('_', name).lower()\n\ndef normalize_keys(obj: Any) -\u003e Any:\n    if isinstance(obj, Mapping):\n        return {camel_to_snake(k): normalize_keys(v) for k, v in obj.items()}\n    elif isinstance(obj, list):\n        return [normalize_keys(x) for x in obj]\n    else:\n        return obj\n\nnormalized = normalize_keys(msg)  \nServerMessageEndOfCallReport.model_validate(normalized)\n```\n\nOr manually subclass the model to redeclare fields using `pydantic.Field(alias=\"...\")`.\n\n---\n\n**Proposed fix**  \n- Update code generation for `server-sdk-python` to use **`pydantic.Field(alias=...)`** rather than `FieldMetadata(alias=...)`, ensuring proper alias resolution during validation.  \n- Alternatively, update the SDK’s `UncheckedBaseModel` to include:  \n\n```python\nmodel_config = ConfigDict(populate_by_name=True)\n```\n\nand propagate real Pydantic alias definitions into the generated models.\n\n---\n\n**Environment**  \n- SDK: `vapi/server-sdk-python`\n- SDK Version: 1.7.3\n- Pydantic: 2.12.3 \n- Python: 3.11\n- Platform: macOS\n\n---\n\n**Impact**  \nPayloads received from Voice Agents fail validation because camelCase fields aren’t recognized. This breaks out-of-the-box use of the server SDK for handling voice agent events.\n","author":{"url":"https://github.com/pratyushsahay","@type":"Person","name":"pratyushsahay"},"datePublished":"2025-11-03T07:08:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/18/server-sdk-python/issues/18"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d64c0aa7-fbb3-73c6-3abe-126acc582040
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD56E:256AE2:5897EF:79E938:697BC484
html-safe-nonceb3317b179e227df68c296505fabf80cfb96e474997896fa8caf56f03cf32126a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENTZFOjI1NkFFMjo1ODk3RUY6NzlFOTM4OjY5N0JDNDg0IiwidmlzaXRvcl9pZCI6IjgyMjI4MzU3ODQ3MDExNjY3MjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac9d77a339abeabeee7474ceac06744cf40317e6864f98c48befa1063c405f8b56
hovercard-subject-tagissue:3580841784
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/VapiAI/server-sdk-python/18/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a0b6b8e3e764bdac7f383e4f2a7076157fc7de1a7c9b2fd50909ffb3b2794b79/VapiAI/server-sdk-python/issues/18
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a0b6b8e3e764bdac7f383e4f2a7076157fc7de1a7c9b2fd50909ffb3b2794b79/VapiAI/server-sdk-python/issues/18
og:image:altDescription When receiving a payload from a Vapi Voice Agent, the ServerMessageEndOfCallReport model in the server-sdk-python fails to parse the incoming JSON. The payload uses camelCase field name...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepratyushsahay
hostnamegithub.com
expected-hostnamegithub.com
None300bc1c13c6b7e78c073c9264c722c624187bbdfc3b25a5b021396c805f56978
turbo-cache-controlno-preview
go-importgithub.com/VapiAI/server-sdk-python git https://github.com/VapiAI/server-sdk-python.git
octolytics-dimension-user_id144965430
octolytics-dimension-user_loginVapiAI
octolytics-dimension-repository_id858207722
octolytics-dimension-repository_nwoVapiAI/server-sdk-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id858207722
octolytics-dimension-repository_network_root_nwoVapiAI/server-sdk-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
releasef571aa04a5e12a930e3b781f4b1c4b4408e5ba61
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/VapiAI/server-sdk-python/issues/18#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FVapiAI%2Fserver-sdk-python%2Fissues%2F18
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FVapiAI%2Fserver-sdk-python%2Fissues%2F18
Sign up https://patch-diff.githubusercontent.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=VapiAI%2Fserver-sdk-python
Reloadhttps://patch-diff.githubusercontent.com/VapiAI/server-sdk-python/issues/18
Reloadhttps://patch-diff.githubusercontent.com/VapiAI/server-sdk-python/issues/18
Reloadhttps://patch-diff.githubusercontent.com/VapiAI/server-sdk-python/issues/18
VapiAI https://patch-diff.githubusercontent.com/VapiAI
server-sdk-pythonhttps://patch-diff.githubusercontent.com/VapiAI/server-sdk-python
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2FVapiAI%2Fserver-sdk-python
Fork 18 https://patch-diff.githubusercontent.com/login?return_to=%2FVapiAI%2Fserver-sdk-python
Star 39 https://patch-diff.githubusercontent.com/login?return_to=%2FVapiAI%2Fserver-sdk-python
Code https://patch-diff.githubusercontent.com/VapiAI/server-sdk-python
Issues 8 https://patch-diff.githubusercontent.com/VapiAI/server-sdk-python/issues
Pull requests 0 https://patch-diff.githubusercontent.com/VapiAI/server-sdk-python/pulls
Actions https://patch-diff.githubusercontent.com/VapiAI/server-sdk-python/actions
Projects 0 https://patch-diff.githubusercontent.com/VapiAI/server-sdk-python/projects
Security 0 https://patch-diff.githubusercontent.com/VapiAI/server-sdk-python/security
Insights https://patch-diff.githubusercontent.com/VapiAI/server-sdk-python/pulse
Code https://patch-diff.githubusercontent.com/VapiAI/server-sdk-python
Issues https://patch-diff.githubusercontent.com/VapiAI/server-sdk-python/issues
Pull requests https://patch-diff.githubusercontent.com/VapiAI/server-sdk-python/pulls
Actions https://patch-diff.githubusercontent.com/VapiAI/server-sdk-python/actions
Projects https://patch-diff.githubusercontent.com/VapiAI/server-sdk-python/projects
Security https://patch-diff.githubusercontent.com/VapiAI/server-sdk-python/security
Insights https://patch-diff.githubusercontent.com/VapiAI/server-sdk-python/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/VapiAI/server-sdk-python/issues/18
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/VapiAI/server-sdk-python/issues/18
ServerMessageEndOfCallReport can't parse payloads from Voice Agent because camelCase fields aren't honoredhttps://patch-diff.githubusercontent.com/VapiAI/server-sdk-python/issues/18#top
https://github.com/pratyushsahay
https://github.com/pratyushsahay
pratyushsahayhttps://github.com/pratyushsahay
on Nov 3, 2025https://github.com/VapiAI/server-sdk-python/issues/18#issue-3580841784
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.