Skip to content

feat: add Tencent Token Plan support - #914

Merged
Astro-Han merged 6 commits into
mainfrom
feat/tencent-token-plan-support
Jul 13, 2026
Merged

Astro-Han merged 6 commits into
mainfrom
feat/tencent-token-plan-support

Conversation

@Astro-Han

Copy link
Copy Markdown
Contributor

Summary

  • Add Tencent Token Plan as the independent persisted provider tencent-token-plan, with its own Token Plan credential, endpoint, model snapshot, and fallback-only discovery contract.
  • Wire the provider through Core, Runtime, Storage, CLI, Headless fake-boundary coverage, and Desktop, including deterministic two-stage reasoning/tool-call replay.
  • Reuse the existing Tencent Cloud brand asset and provenance path introduced by feat: add Tencent Coding Plan support #904 without vendoring or licensing changes.

Why

Tencent Token Plan is a separate personal subscription product from Tencent Coding Plan and Tencent's direct API. Maka needs a stable identity and product-specific transport contract so saved connections cannot drift between those access paths. Refs #860.

Scope

This PR is limited to Phase 4 Tencent Token Plan. It does not add other Tencent products, providers, or Phase 7 work. Because Tencent documents Token Plan for interactive AI tools rather than scripts, backend services, or batch API use, Headless coverage proves only explicit fake wiring and intentionally does not load a Token Plan key from environment variables. Model discovery uses an honest registry snapshot because no public Token Plan model-list endpoint is documented.

Verification

  • npm run typecheck
  • Rebase-sensitive Core/Runtime/Headless tests: 16/16 passed, covering registry/order/auth, both HY 3 reasoning variants, Tencent and Volcengine two-stage tool loops, provider env, and Harbor boundaries.
  • Storage/CLI host tests: 2/2 passed for exact persisted provider/model and credential resolution.
  • Desktop icon governance: 2/2 passed for the shared Tencent Cloud and Volcengine asset-mask routes.
  • npm run build and final clean npm run rebuild (including overlay and renderer production builds)
  • npm run check:stale
  • node scripts/check-third-party-notices.mjs via the renderer build
  • git diff --check
  • Tencent Cloud SVG provenance rechecked against lobehub/lobe-icons, @lobehub/[email protected], immutable commit e4302041fbb3039608d25f9f618bd462783b875e, packages/static-svg/icons/tencentcloud.svg, MIT, and SHA-256 0563b1dbaa01aff4f20352bc9eb49bec17debeb3901a9ee80b044ac4d792c97d; catalog and detail tests prove both Tencent plans consume the shared ProviderAssetMask / currentColor path.
  • Live smoke was not run: no safe user-owned Token Plan key was available, and Tencent restricts the subscription to interactive AI-tool use. Deterministic fake transport tests cover the complete two-turn wire contract without logging secrets or raw responses.
  • Static screenshots are not applicable: this adds an existing shared provider mark and catalog/detail metadata rather than a new visual design. Desktop contract/E2E coverage verifies the rendered catalog/detail route, mask URL, and computed currentColor behavior; CI E2E is the merge gate.

Impact

Users can save and select Tencent Token Plan independently with the exact provider ID and supported model IDs. Existing Tencent direct API and Tencent Coding Plan connections are unchanged. There is no storage migration, new asset, new third-party notice, or secret-handling change outside this provider.

Reviewer notes

Please focus on provider identity separation, fallback-only discovery, the reasoning/tool replay payload, the deliberate Headless credential boundary, and reuse of #904's shared Tencent Cloud SVG path.

Ready for review

  • Verification is complete and the results above are current
  • Impact, compatibility, migration, documentation, and release-note needs are addressed
  • User-visible UI/UX changes include visual evidence, or Verification explains why it is not applicable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant