#23255: fix(feishu): use listEnabledFeishuAccounts for bitable tool registration
channel: feishu
size: XS
Cluster:
Feishu Integration Enhancements
## Summary
- **Problem:** \`registerFeishuBitableTools\` reads credentials directly from \`config.channels.feishu.appId/appSecret\`, but when Feishu is configured using the \`accounts\` sub-object (e.g., \`accounts.main\`), these top-level fields are absent and bitable tools silently fail to register.
- **Why it matters:** Doc, drive, and wiki tools work fine with accounts mode, but bitable tools don't — creating an inconsistent experience.
- **What changed:** Switched \`extensions/feishu/src/bitable.ts\` to use \`listEnabledFeishuAccounts(api.config)\` for credential resolution, matching the pattern in \`docx.ts\`, \`drive.ts\`, \`wiki.ts\`, and \`perm.ts\`.
- **What did NOT change:** Top-level config mode still works (backward compatible). No changes to bitable tool behavior or API calls.
## Change Type (select all)
- [x] Bug fix
- [ ] Feature
- [ ] Refactor
- [ ] Docs
- [ ] Security hardening
- [ ] Chore/infra
## Scope (select all touched areas)
- [ ] Gateway / orchestration
- [x] Skills / tool execution
- [ ] Auth / tokens
- [ ] Memory / storage
- [x] Integrations
- [ ] API / contracts
- [ ] UI / DX
- [ ] CI/CD / infra
## Linked Issue/PR
- Closes #23243
## User-visible / Behavior Changes
- Feishu bitable tools now register correctly when using \`accounts\` configuration mode
- No config changes required
## Security Impact (required)
- New permissions/capabilities? \`No\`
- Secrets/tokens handling changed? \`No\`
- New/changed network calls? \`No\`
- Command/tool execution surface changed? \`No\`
- Data access scope changed? \`No\`
## Repro + Verification
### Environment
- OS: macOS 15.3 (arm64)
- Runtime: Node v22+
- Integration/channel: Feishu
### Steps
1. Configure Feishu with accounts sub-object (\`channels.feishu.accounts.main\`)
2. Start gateway
3. Check if bitable tools register (no "credentials not configured" log)
### Expected
- Bitable tools register successfully alongside doc/drive/wiki tools
### Actual
- Before fix: Bitable tools silently skip registration (top-level \`appId\`/\`appSecret\` not found)
- After fix: \`listEnabledFeishuAccounts\` resolves credentials from accounts sub-object
## Evidence
The fix aligns bitable with the established pattern used by 4 other Feishu tool modules:
| File | Uses \`listEnabledFeishuAccounts\` |
|------|----------------------------------|
| \`docx.ts\` | Yes |
| \`drive.ts\` | Yes |
| \`wiki.ts\` | Yes |
| \`perm.ts\` | Yes |
| \`bitable.ts\` | **No → Yes (this PR)** |
## Human Verification (required)
- Verified scenarios: Compared bitable.ts against docx.ts, drive.ts, wiki.ts — confirmed the credential resolution pattern is identical after fix
- Edge cases checked: \`listEnabledFeishuAccounts\` returns empty array when no accounts configured (early return preserved); top-level config still works via the same helper function
- What I did **not** verify: Live Feishu bitable API calls (no Feishu test account)
## Compatibility / Migration
- Backward compatible? \`Yes\` — \`listEnabledFeishuAccounts\` handles both config patterns
- Config/env changes? \`No\`
- Migration needed? \`No\`
## Failure Recovery (if this breaks)
- How to disable/revert this change quickly: Revert \`extensions/feishu/src/bitable.ts\`
- Files/config to restore: \`extensions/feishu/src/bitable.ts\`
- Known bad symptoms: Bitable tools not appearing in tool list
## Risks and Mitigations
None — the change reuses a proven helper function already used by 4 other modules in the same extension.
Most Similar PRs
#23261: fix(feishu): bitable tools fail to register with accounts config pa...
by stakeswky · 2026-02-22
89.5%
#19871: fix(feishu): support multi-account config in bitable tools
by linbojin · 2026-02-18
84.9%
#16284: fix(feishu): route tool credentials by account parameter
by Yaxuan42 · 2026-02-14
81.3%
#15671: fix(feishu): Credentials check bug of Feishu bitable tools when usi...
by zxh0916 · 2026-02-13
78.9%
#16337: feat(feishu): sync community plugin updates from clawdbot-feishu v0...
by graydawnc · 2026-02-14
71.5%
#19615: fix(discord): include default account when sub-accounts are configured
by prue-starfield · 2026-02-18
69.0%
#14674: feat(feishu): add feishu_chat tool for chat info/member queries
by liuweifly · 2026-02-12
67.3%
#20415: fix(extensions): use dist/ import paths for bundled extensions
by 88plug · 2026-02-18
66.5%
#9268: Fix: Register feishu as official channel in CHAT_CHANNEL_ORDER
by vishaltandale00 · 2026-02-05
66.5%
#20973: Fix: Feishu duplicate plugin ID, Docker pairing docs, broken formal...
by neipor · 2026-02-19
66.4%