Conversation
Implement Alibaba provider settings, region-aware console RPC parsing, tests, and docs; also fix cookie header normalization to avoid truncating values containing '-b', which caused false login-required failures for valid manual cookies.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9ff131a167
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sources/CodexBarCore/Providers/Alibaba/AlibabaCodingPlanUsageFetcher.swift
Outdated
Show resolved
Hide resolved
Sources/CodexBarCore/Providers/Alibaba/AlibabaCodingPlanUsageFetcher.swift
Outdated
Show resolved
Hide resolved
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 54f175658e
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sources/CodexBarCore/Providers/Alibaba/AlibabaCodingPlanUsageFetcher.swift
Outdated
Show resolved
Hide resolved
Sources/CodexBar/Providers/Alibaba/AlibabaCodingPlanProviderImplementation.swift
Outdated
Show resolved
Hide resolved
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fbd1d60940
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sources/CodexBarCore/Providers/Alibaba/AlibabaCodingPlanUsageFetcher.swift
Outdated
Show resolved
Hide resolved
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 247129b1a7
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sources/CodexBarCore/Providers/Alibaba/AlibabaCodingPlanCookieImporter.swift
Outdated
Show resolved
Hide resolved
Sources/CodexBarCore/Providers/Alibaba/AlibabaCodingPlanCookieImporter.swift
Show resolved
Hide resolved
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 72bc65c293
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sources/CodexBarCore/Providers/Alibaba/AlibabaCodingPlanProviderDescriptor.swift
Show resolved
Hide resolved
Sources/CodexBarCore/Providers/Alibaba/AlibabaCodingPlanProviderDescriptor.swift
Show resolved
Hide resolved
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b4589dcee9
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "domain": "modelstudio.console.alibabacloud.com", | ||
| "consoleSite": "MODELSTUDIO_ALBABACLOUD", |
There was a problem hiding this comment.
Align console metadata with the selected Alibaba region
The console RPC body is hard-coded to domain = modelstudio.console.alibabacloud.com and consoleSite = MODELSTUDIO_ALBABACLOUD regardless of the region argument. When users select .chinaMainland, this payload no longer matches the CN host/region used elsewhere in the same request, so web-mode quota calls can be rejected or misrouted for CN accounts. Please derive these fields from region (and correct the ALBABACLOUD typo) so request metadata stays consistent.
Useful? React with 👍 / 👎.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cbe98fdbca
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
| // Keep web strategy available in auto mode so fetch can attempt refresh/import | ||
| // and provide a concrete error or fallback path instead of "No available fetch strategy". | ||
| return context.settings?.alibaba?.cookieSource != .manual |
There was a problem hiding this comment.
Skip web strategy when no Alibaba session is detectable
AlibabaCodingPlanWebFetchStrategy.isAvailable returns true in auto mode even after confirming there is no env cookie, no manual cookie, no cache, and no browser session, and resolveStrategies still orders web before API. For users who only configure ALIBABA_CODING_PLAN_API_KEY (the common API-only setup), every refresh will still run browser-cookie import first, causing avoidable keychain/browser access prompts and latency before the API path succeeds.
Useful? React with 👍 / 👎.
| } | ||
| } | ||
| } | ||
| return self.findFirstString(forKeys: ["planName", "plan_name", "packageName", "package_name"], in: payload) |
There was a problem hiding this comment.
Preserve instanceName when falling back to plan label lookup
findPlanName(in:) checks instanceName only when iterating codingPlanInstanceInfos, but the fallback path used for a selected instance dictionary omits instanceName. If the chosen active instance has instanceName but no planName/packageName, lookup falls back to the whole payload and can return another instance’s label, so the displayed Alibaba plan identity can be wrong.
Useful? React with 👍 / 👎.
Made-with: Cursor
Summary
mainValidation
swift test --filter AlibabaCodingPlanpnpm check./Scripts/compile_and_run.shSupersedes #453.
Thanks @jnd0 for the original Alibaba provider implementation and follow-up fixes that this PR carries forward.