Add Alibaba Token Plan Personal/Solo variants (mainland + international) - #2487
Conversation
Co-authored-by: Rohit Sabu <13933510+rohitsabu@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 20d54c0094
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| switch self { | ||
| case .international, .internationalPersonal: | ||
| // This is Alibaba's live console contract, including its historical spelling. | ||
| "MODELSTUDIO_ALBABACLOUD" |
There was a problem hiding this comment.
Use the Model Studio consoleSite spelling
When a user selects the International — Personal/Solo variant, the Personal request body sends this consoleSite value through IntlBroadScopeAspnGateway, but the existing Model Studio OneConsole path in AlibabaCodingPlanAPIRegion.consoleSite uses MODELSTUDIO_ALIBABACLOUD. The new tests only assert the mainland Personal request body, so this typo can leave the international Personal gateway receiving an unrecognized site id while the mainland variant still works.
Useful? React with 👍 / 👎.
|
Reporter of #2370 here — thanks for the coordinated rewrite and the credit. China-mainland Personal/Solo: confirmed working against a live account. I wired the same routing locally (a The two things this PR calls out both hold up in practice:
+1 on the Codex review's I can only speak to the mainland variant end-to-end (I'm a mainland Solo account); I can't authenticate the international gateway myself. Happy to re-run mainland against the shipped build once it lands to close out #2370. |
|
Merged after full verification (owner-approved architecture: Personal/Solo as explicit variants inside the Alibaba provider). Mainland Personal targets the |
Summary
GetSubscriptionSummarysec_tokenBased on the investigation by @LeoLin990405 (#2370) and @halilertekin (#2349). The international endpoint work from @rohitsabu's closed #2437 also informed the coordinated rewrite, with contributor credit preserved in the commit.
Verification
swift test --filter AlibabaTokenPlan— 46 tests passedmake check— passed (format, strict lint, locale/docs/package gates)Live provider authentication was not run here, so this intentionally relies on the reporters confirming both variants in the next release, mirroring the #2361 approach. Issues #2370 and #2349 should remain open until that confirmation.