#19871: fix(feishu): support multi-account config in bitable tools
channel: feishu
size: XS
Cluster:
Feishu Integration Enhancements
## Problem
The bitable tools (introduced in #17963) were not registering when using the new multi-account Feishu configuration format.
**Root cause**: `registerFeishuBitableTools` was directly reading `config.channels.feishu.appId` and `config.channels.feishu.appSecret`, which only works for the legacy single-account format.
## Solution
Updated `registerFeishuBitableTools` to align with the pattern used by other Feishu tool modules (docx, wiki, drive):
- Use `listEnabledFeishuAccounts()` to get configured accounts
- Use `resolveToolsConfig()` to support `tools.bitable` enable/disable option
- Pass `firstAccount` directly to `createFeishuClient` for consistency
- Add `bitable` to `FeishuToolsConfig` type, schema, and defaults
## Changes
```diff
extensions/feishu/src/bitable.ts | 26 insertions(+), 5 deletions(-)
extensions/feishu/src/types.ts | 1 +
extensions/feishu/src/tools-config.ts | 1 +
extensions/feishu/src/config-schema.ts | 1 +
```
## Testing
Verified that:
- ✅ Bitable tools now register correctly with multi-account config
- ✅ Successfully created bitable apps, fields, and records
- ✅ Pattern is consistent with other Feishu tool modules
- ✅ `tools.bitable` config option works correctly
<img width="2428" height="598" alt="image" src="https://github.com/user-attachments/assets/ee2b91af-adad-4de6-ad04-3362661bad5b" />
## Related
- Fixes tool registration for users on the new multi-account config format
- Builds on #17963
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Fixes bitable tool registration for users on the multi-account Feishu config format. The previous implementation directly accessed `config.channels.feishu.appId`/`appSecret`, which only worked with the legacy single-account format. Now uses `listEnabledFeishuAccounts()` and `resolveToolsConfig()`, consistent with how docx, wiki, drive, and perm tool modules are registered. Also adds `bitable` to `FeishuToolsConfig` type, schema, and defaults so it can be toggled via config.
- Two minor style nits: the disable check uses `=== false` rather than the `!toolsCfg.xxx` pattern used by other modules, and the `DEFAULT_TOOLS_CONFIG` JSDoc doesn't mention bitable.
<h3>Confidence Score: 4/5</h3>
- This PR is safe to merge — it aligns bitable tool registration with an established, well-tested pattern used by other Feishu tool modules.
- The changes are straightforward and follow the exact same pattern as docx, wiki, drive, and perm tool registration. The only findings are minor style inconsistencies. No logic bugs or security issues identified.
- No files require special attention.
<sub>Last reviewed commit: f3278f6</sub>
<!-- greptile_other_comments_section -->
<sub>(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#23261: fix(feishu): bitable tools fail to register with accounts config pa...
by stakeswky · 2026-02-22
92.9%
#15671: fix(feishu): Credentials check bug of Feishu bitable tools when usi...
by zxh0916 · 2026-02-13
89.3%
#16284: fix(feishu): route tool credentials by account parameter
by Yaxuan42 · 2026-02-14
87.4%
#23255: fix(feishu): use listEnabledFeishuAccounts for bitable tool registr...
by SidQin-cyber · 2026-02-22
84.9%
#16337: feat(feishu): sync community plugin updates from clawdbot-feishu v0...
by graydawnc · 2026-02-14
79.9%
#14674: feat(feishu): add feishu_chat tool for chat info/member queries
by liuweifly · 2026-02-12
78.7%
#10513: feat(feishu): add quota optimization flags
by BigUncle · 2026-02-06
71.5%
#20973: Fix: Feishu duplicate plugin ID, Docker pairing docs, broken formal...
by neipor · 2026-02-19
71.3%
#16064: feat: add contact-based tool permissions with verification
by jamiequint · 2026-02-14
71.3%
#21484: fix(feishu): scope message deduplication by accountId to support mu...
by guanyu-zhang · 2026-02-20
71.2%