docs/alibaba-coding-plan.md
Alibaba Coding Plan supports both browser-session and API-key paths, but the supported baseline is browser-session fetching from the Model Studio/Bailian console. API mode remains secondary and may still be limited by account/region behavior.
ALIBABA_CODING_PLAN_COOKIE.When the RPC endpoint returns ConsoleNeedLogin, CodexBar treats that as a console-session requirement. In API mode it is surfaced as an explicit API-path limitation; in auto mode fallback remains observable through the fetch-attempt chain.
~/.codexbar/config.json -> providers[].apiKey for provider alibaba).ALIBABA_CODING_PLAN_API_KEYALIBABA_QWEN_API_KEYDASHSCOPE_API_KEYhttps://modelstudio.console.alibabacloud.comhttps://bailian.console.aliyun.comPOST /data/api.json?action=zeldaEasy.broadscope-bailian.codingPlan.queryCodingPlanInstanceInfoV2&product=broadscope-bailian&api=queryCodingPlanInstanceInfoV2/data/api.json coding-plan endpoint can still return console-login-required responses (ConsoleNeedLogin) even when an API key is configured.ALIBABA_CODING_PLAN_HOST
ALIBABA_CODING_PLAN_HOST=modelstudio.console.alibabacloud.comALIBABA_CODING_PLAN_QUOTA_URL
ALIBABA_CODING_PLAN_QUOTA_URL=https://example.com/data/api.json?action=...Authorization: Bearer <api_key>x-api-key: <api_key>X-DashScope-API-Key: <api_key>Content-Type: application/jsonAccept: application/jsoncodingPlanInstanceInfos[].planName / instanceName / packageNamecodingPlanQuotaInfo):
per5HourUsedQuota + per5HourTotalQuota + per5HourQuotaNextRefreshTime -> primary (5-hour)perWeekUsedQuota + perWeekTotalQuota + perWeekQuotaNextRefreshTime -> secondary (weekly)perBillMonthUsedQuota + perBillMonthTotalQuota + perBillMonthQuotaNextRefreshTime -> tertiary (monthly)usedPercent = used / total * 100 (bounded to valid range).0% usage.https://modelstudio.console.alibabacloud.com/ap-southeast-1/?tab=globalset#/efm/coding_planhttps://bailian.console.aliyun.com/cn-beijing/?tab=model#/efm/coding_planSources/CodexBarCore/Providers/Alibaba/AlibabaCodingPlanProviderDescriptor.swiftSources/CodexBarCore/Providers/Alibaba/AlibabaCodingPlanUsageFetcher.swiftSources/CodexBarCore/Providers/Alibaba/AlibabaCodingPlanUsageSnapshot.swiftSources/CodexBar/Providers/Alibaba/AlibabaCodingPlanProviderImplementation.swift