Skip to content

Support Lark international (larksuite.com) tenants in Feishu Bot QR-onboarding #106

Closed as not planned

Description

@vokasug

Summary

When adding the Feishu (Lark) mobile channel through the QR-bind flow in MiniMax Code, tenants hosted on accounts.larksuite.com / open.larksuite.com (Lark international) are rejected with a hard error before onboarding completes. Only feishu.cn tenants work. Other AI agents we use (ZCode, Hermes Agent) handle both brand endpoints transparently, so this puts MiniMax Code at a disadvantage for any user whose organization is on the international Lark stack.

User-visible behaviour

  1. Open the "Bind Feishu Bot via QR" dialog in MiniMax Code.

  2. Scan the QR with the Lark mobile app while signed into an international tenant (e.g. yourcorp.larksuite.com).

  3. Approve the PersonalAgent consent on the mobile side.

  4. MiniMax Code shows a dialog with the literal message:

    Lark international tenant detected — current onboarding only supports feishu.cn

    with a "Retry" button that loops back to the same error.

Expected: the bot is bound, the runner connects, and the channel works — same as it does for feishu.cn.

Root cause (from daemon.js in current build)

The QR-onboarding pipeline is hard-wired to the Feishu (China) endpoints and refuses any tenant whose tenant_brand comes back as "lark":

  • packages/daemon/src/channel-bridge/plugins/feishu/app-registration.ts
    • requestAppRegistration() ignores options.brand and always hits https://accounts.feishu.cn/oauth/v1/app/registration (line ~117287 in the bundled daemon.js).
    • verificationUriComplete is hard-coded to https://open.feishu.cn/page/cli?user_code=... (line ~117303), even though the URL table right next to it already defines a lark entry pointing at https://open.larksuite.com.
  • packages/daemon/src/channel-bridge/plugins/feishu/auth.ts → FeishuAuthAdapter.registerNewApp() calls requestAppRegistration({ brand: "feishu" }) with a hard-coded "feishu" (line ~117485).
  • FeishuAuthAdapter.completeAppRegistration() throws on result.tenantBrand === "lark" with the message Restart the registration on accounts.larksuite.com (not yet implemented) (lines ~117531-117535).
  • The HTTP route that drives the onboarding UI (POST /api/lark/onboard/start) already accepts a brand field in its request body and forwards it to reqApp({ brand }) (lines ~369654, ~369664), but the underlying requestAppRegistration ignores it, so the field is effectively dead.

The bundled URLs (ACCOUNTS_BASE, OPEN_BASE) and the comment "a follow-up will switch to accounts.larksuite.com" (line ~117515) confirm the limitation is intentional and tracked in-tree, just not implemented.

Suggested approach

A few options, ordered from smallest to largest change:

  1. Honour options.brand end-to-end. Two-line fix in app-registration.ts:

    • ACCOUNTS_BASE[options.brand ?? "feishu"] instead of ACCOUNTS_BASE.feishu.
    • OPEN_BASE[options.brand ?? "feishu"] instead of OPEN_BASE.feishu.
      Then expose a brand selector (or auto-detect from the response) in the "Bind Feishu Bot via QR" dialog so the user can pick feishu.cn vs larksuite.com.
  2. Auto-detect brand. The app-registration begin endpoint actually returns tenant info; have the UI first probe the user's logged-in identity (or read it from a config flag) and route to the matching URL set automatically — this is what ZCode / Hermes Agent appear to do.

  3. Remove the early-return on tenantBrand === "lark". Currently runOnboard() aborts the session the moment it sees "lark" (line ~369532). Once option 1 is in place, that branch can just propagate the chosen apiBase (https://open.larksuite.com) downstream into the Feishu plugin so subsequent IM calls hit the right host — apiBaseUrl is already a configurable field per the schema at line ~97307 ("Override API base URL (e.g., https://open.larksuite.com for Lark)").

Option 1 + propagating apiBase from the chosen brand is the minimum to unblock international users; option 2 is what would make MiniMax Code competitive with the agents that already handle this transparently.

Environment

  • MiniMax Code: latest stable build installed via the macOS app bundle (/Applications/MiniMax Code.app).
  • Tenant: Lark international (<org>.larksuite.com), authenticated in the Lark mobile app at scan time.
  • Repro'd on macOS 15.

Happy to test a fix or supply more details from the bundled daemon.js if useful.

Activity

  1. added
    desktopMiniMax Code desktop app
    enhancementNew feature or request
    needs-triageAwaiting maintainer assessment
    and removed
    desktopMiniMax Code desktop app
    on Sep 19, 2026
  2. hetaoBackend commented on Sep 21, 2026

    @hetaoBackend
    Collaborator

    This was generated by AI during triage.

    Acknowledged: the QR-onboarding flow currently pins feishu.cn endpoints and hard-rejects larksuite.com (international) tenants. Supporting both brand endpoints is a fair ask and is recorded as an enhancement — no committed date yet, but the dual-endpoint direction is agreed.

  3. hetaoBackend commented on Oct 19, 2026

    @hetaoBackend
    Collaborator

    Closing as part of a backlog cleanup: this issue was filed more than a month ago against an older release, and the codebase has changed substantially since then. If it still reproduces on the latest version, please open a new issue with the current version and reproduction steps. Thank you for the report!

    批量清理积压:该 issue 创建已超过一个月,针对的是较旧版本,代码已有较大变化。如果在最新版本上仍能复现,欢迎附上当前版本号和复现步骤重新提交 issue。感谢反馈!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    desktopMiniMax Code desktop appenhancementNew feature or requestneeds-triageAwaiting maintainer assessment

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions