Skip to content

fix: add subscriptionLimits to Call response object#3

Closed
adhamvapi wants to merge 1 commit intomainfrom
tasker/pro-1773-tasker-add-subscriptionlimits-to-net-call-response-object
Closed

fix: add subscriptionLimits to Call response object#3
adhamvapi wants to merge 1 commit intomainfrom
tasker/pro-1773-tasker-add-subscriptionlimits-to-net-call-response-object

Conversation

@adhamvapi
Copy link
Copy Markdown

Summary

  • Add SubscriptionLimits property to the Call record so the .NET SDK surfaces the subscriptionLimits block returned by the REST API on individual call responses (e.g. POST /call, GET /call/{id})
  • The SubscriptionLimits type already existed in the SDK (used by CallBatchResponse) but was missing from the Call model, causing customers to lose access to concurrency limit data when using the SDK
  • Add 4 unit tests covering deserialization, serialization roundtrip, null handling, and edge case (blocked concurrency)

Problem

When using the Vapi REST API directly, the CreateCall response includes:

{
    "subscriptionLimits": {
        "concurrencyBlocked": false,
        "concurrencyLimit": 500,
        "remainingConcurrentCalls": 499
    }
}

But the .NET SDK's Call class did not have a SubscriptionLimits property, so this data was silently dropped during deserialization.

Changes

  • src/Vapi.Net/Types/Call.cs -- Added SubscriptionLimits? SubscriptionLimits property with [JsonPropertyName("subscriptionLimits")] attribute, following the exact same pattern as CallBatchResponse.cs
  • src/Vapi.Net.Test/Core/Json/CallSubscriptionLimitsTests.cs -- 4 new tests:
    • Deserialize Call with subscriptionLimits present
    • Deserialize Call without subscriptionLimits (null, backward compat)
    • Serialize/deserialize roundtrip
    • Deserialize with concurrencyBlocked=true edge case

Test Plan

  • All 168 tests pass (164 existing + 4 new), 0 failures
  • dotnet build succeeds with 0 errors across all target frameworks (net462, net8.0, net9.0, netstandard2.0)
  • Backward compatible -- existing responses without subscriptionLimits deserialize correctly (property is nullable)

References

  • Linear: PRO-1773

@adhamvapi adhamvapi added the merge-queue Ready for merge queue label Apr 22, 2026
@adhamvapi
Copy link
Copy Markdown
Author

Closing this PR — the SDK is auto-generated by Fern. The correct fix is to update the OpenAPI spec in VapiAI/docs instead. Reopening as a fix to the source spec.

@adhamvapi adhamvapi closed this Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-queue Ready for merge queue tasked-to-tasker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant