Version
adcp==8.0.0b9
Reproduction
from adcp.types import AccountReference, GetProductsRequest
request = GetProductsRequest(
buying_mode="wholesale",
brief="test",
account={"account_id": "acc_123"},
)
print(AccountReference)
print(GetProductsRequest.model_fields["account"].annotation)
print(type(request.account), request.account)
Observed:
- Public
AccountReference is the new composable union alias.
GetProductsRequest.model_fields["account"].annotation is still the generated outer RootModel type.
request.account is AccountReference(root=AccountReference1(...)), not AccountReferenceById.
The same stale annotation is present on make_versioned_base("3.1", "GetProductsRequest").
Expected
SDK request models that expose an account field should use the public composable union and return its concrete arms, consistent with the beta.9 migration contract in #1084. Otherwise adopter code must support both the new public union and the removed wrapper depending on whether it validates the field directly or through an SDK request model.
Context
This surfaced while applying the beta.9 object-union migration from #1084.
Version
adcp==8.0.0b9Reproduction
Observed:
AccountReferenceis the new composable union alias.GetProductsRequest.model_fields["account"].annotationis still the generated outer RootModel type.request.accountisAccountReference(root=AccountReference1(...)), notAccountReferenceById.The same stale annotation is present on
make_versioned_base("3.1", "GetProductsRequest").Expected
SDK request models that expose an account field should use the public composable union and return its concrete arms, consistent with the beta.9 migration contract in #1084. Otherwise adopter code must support both the new public union and the removed wrapper depending on whether it validates the field directly or through an SDK request model.
Context
This surfaced while applying the beta.9 object-union migration from #1084.